cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
ImageToDatatable JSL
JohnPonte
Staff (Retired)

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.

Comments

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.

-Nick

JohnPonte

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,

John