Choose Language Hide Translation Bar

ImageToDatatable JSL

This script shows you how to read in an image in JSL and generate a data table from the image data. This script will generate a row of data from each pixel. Each row will contain red, green, and blue values for the pixel, an intensity value as well as hue, lightness and saturation values.


Hi John,

I am curious what data type the pixel values are type casted as when the "getPixels" command is used? Is it 32-bit, 64-bit or other? Thanks.


Hi Nick,

If you do something like, {r, g, b} = img << getPixels("rgb"); , you will get 3 matrices (red, green and blue) where the values are in a normalized color space, between 0.0 - 1.0. Using normalized values means you don't have to worry about how many bits.

Hope this helps,



Article Tags