Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to build a 2D color vector of an image?

Hi again..
 
If I have an image which is in HSL color space... and I wish to consider the H&S only. How to build a 2D vector (Hi+Sj) for each pixel of the image?
thx
0 Kudos
Message 1 of 2
(2,940 Views)
Hello liaw82,
 
To obtain the H and S planes separately, you can use either the IMAQ ExtractColorPlanes VI or IMAQ ExtractSingleColorPlane VI.  From here, you can convert the H and S images into 2D arrays with the IMAQ ImageToArray VI.  This would give you individual pixel data for both H and S.  Another option is to convert the HSL image to a 2D array using the IMAQ ColorImageToArray VI.  This, however, would give you L information in addition to H and S in a single 2D array.
 
From here, I'm not sure how you might go about converting the data to (Hi + Sj) vector form.  The Vision software provides VIs for working with monochrome images in the frequency domain (complex images) that may be useful.  Perhaps another internet resource could provide some additional assistance.
 
Regards,
 
Jesse D.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,922 Views)