LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert the color image to array

HI , I want to convert the color image to array, but was unsuccessful,  the output U64 data is null.

 

Can you provide the example to me ?

 

I also searched this function example which does not exist in the LabVIEW examples.

 

Johnson1213_0-1647942103501.png

 

0 Kudos
Message 1 of 6
(1,915 Views)

@Johnson1213 wrote:

HI , I want to convert the color image to array, but was unsuccessful,  the output U64 data is null.

 

Can you provide the example to me ?

 

I also searched this function example which does not exist in the LabVIEW examples.

 

Johnson1213_0-1647942103501.png

 


How about the Image Pixels (U32)?

 

Also, check the error out... This VI probably works for color images only, if you insert a grayscale image, you need to use the grayscale variant.

0 Kudos
Message 2 of 6
(1,899 Views)

Input color image, the U64 is null, NI can provide the example about colorimage to array? 

Johnson1213_0-1647963508896.png

 

0 Kudos
Message 3 of 6
(1,872 Views)

The U64 2D array is empty (not null), because the image doesn't have U64 pixel values.

 

See the info of the image mentioning it's a 32-bit image...

 

If each pixel is RGB, it's 8+8+8 bits, and the array of 32 bit values is used to return the pixels.

 

Set the 2D array of 32 bit integers to hex, and you'll see the numbers represent RRGGBB (or BBGGRR).

0 Kudos
Message 4 of 6
(1,869 Views)

You could use Color To RGB.vi (use quick drop) to convert the numbers from I32 to RGB.

 

Maybe B and R are reverted... That happens.

0 Kudos
Message 5 of 6
(1,867 Views)
0 Kudos
Message 6 of 6
(1,860 Views)