cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
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

 

Attachments