02-07-2012 12:55 AM - edited 02-07-2012 01:02 AM
Hellow everyone,
I am trying to convert a snapped image using usb webcam to RGB model. I have two VIs, for snapping and the other for converting JPEG to RGB as the attached VIs bellow. My problem is how to connect these two VIs in one VI to make direct conversion from snapping to RGB model. I am using LABVIEW 8.6
02-07-2012 07:49 AM
Hi,
You could use "IMAQ ColorImageToArray (4881)" which converts the image datatype to an two dimensional array, which could be converted to a pixmap using "Flatten Pixmap" as follows:
Christian
02-08-2012 01:03 AM
Thank you so much for your help, It work with me well, but I when I connect to the second program It shows me the blue color of the image in the graph only though I connect the same graph for each value it still show me blue color of the image... how I solve this problem.
02-08-2012 02:20 AM
Why should an Intensity Graph know that it's green or blue or red when you simply pass an array of numbers to it?
You have to change the color of the markers of the graph:
Christian
02-08-2012 04:42 AM
There is also an KB which shows where how to change it programmatically: How can I Change the Color of an Intensity Chart or Graph?
02-15-2012 01:41 AM
Thank you dear, hope anyone complete for me VI using the attached VIs and add for the convertor to RGB the intensity graph that show the Red, Green and Blue of the image,
Thank you
02-15-2012 10:51 AM
02-15-2012 04:03 PM
So the two VIs that you have are not directly compatible with each other. Notice that the first one uses IMAQ VIs (an add-on), while the second is using VIs from NI's Base Package. This means that the first VI (the snap) outputs an "Image" type, while the second VI is using an "imagedata" type.
To clarify, you want the histogram of each color in the image, is that right? This is what a histogram is:
http://zone.ni.com/reference/en-XX/help/372916J-01/nivisionconcepts/histogram/
If so, you can use the IMAQ ExtractColorPlanes VI to extract each individual color plane...
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_extractcolorplanes/
...and then you can use the IMAQ Histogram VI to map the histogram of that color plane.
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_histogram/