01-04-2014 10:27 AM - edited 01-04-2014 10:28 AM
Hi.
The "Color Utilities" function in Vision Development Modulde contains the IMAQ ColorImageToArray, which only has 32-bit unsigned integer values as an output. Is there an option to achieve an 8-bit unsigned integer value in the output ?.
Solved! Go to Solution.
01-04-2014 10:36 AM - edited 01-04-2014 10:38 AM
I would use IMAQ Cast Image
Here you can see what it does. I would cast to U8.
01-04-2014 11:07 AM
01-04-2014 11:07 AM
Thanks for the reply GuenterMueller
I'm already using this function to convert a 32-bit image to 8-bit image, but the problems is the next step. I need to convert the 8-bit image to 2D array of 8-bit unsigned integers.
01-04-2014 11:11 AM
I need this function, but as a U8 output instead of U32
01-04-2014 11:11 AM - edited 01-04-2014 11:22 AM
First convert your color image to gray scale by one of earlier methods and then Use IMAQ image to array
01-04-2014 11:19 AM
@Oesen wrote:
I need this function, but as a U8 output instead of U32
Hi Oesen. Use IMAQ Extract.
01-04-2014 12:36 PM - edited 01-04-2014 12:37 PM
Hi GuenterMueller
That function configures the image. My image is converted from 32-bit RGB to a 8-bit Grayscale as shown in the picture below. I just have to configure the data type of the 2D output array from a 32-bit to a 8 bit.
01-04-2014 12:42 PM
As uday said above, use image to array after you have extracted the red color channel.
01-04-2014 12:48 PM - edited 01-04-2014 12:51 PM
Please check this. what you have done is not correct(according to me).
-Please use proper wordings for image types
Color-32bit
Gray-8bit
-Intype casting you are using conversion to RGB(U32), Image type should be grayscale there according to your requirement. If the image is color why do you need to typecast again it to RGB??
-After extracting color plane, it is no more color(32bit) image.There is no point in using color image to array. use IMAQ image to array instead.