01-29-2012 12:42 PM
Hi,
I have a web cam which I am able to use successfully in labview (i.e.. Get images)
I have looked at the colour pattern matching examples and tried to modify them, so that I can detect a red spot, that can be seen through the webcam, but have been unsuccessful.
In essence I'm trying to do real time colour pattern matching
Can anyone steer me in the right direction? Or help me out?
Thanks
Solved! Go to Solution.
01-29-2012
05:04 PM
- last edited on
04-01-2025
08:16 AM
by
Content Cleaner
Hi kr121,
I'm trying to work on color myself right now.
What have you tried so far? What type of web camera are you using? I'm using a Microsoft Life Camera with LV 2011 on Windows 7.
I started here: http://zone.ni.com/devzone/cda/epd/p/id/5030
If you are not using an NI camera I was able to get this to work using the cmd prompt and extracting the files manually to at least run the NI-IMAQ for USB: Snap and Save Image with USB Camera and NI-IMAQ for USB: Grab and Save Image with USB Camera examples.
The command prompt command is:
ni_imaq_usb_installer_86.exe /x
Don't know if this is 100% correct but it at least allowed me to capture images and avi's.
Regards,
-SS
01-30-2012
05:07 AM
- last edited on
04-01-2025
08:17 AM
by
Content Cleaner
Hi Guys,
There is a great example which installs with the vision developement module. This example might not be EXACTLY what you are after, as it allows you to dynamically define a colour pattern to match. However, you could always save a static "pattern template" to disk, and use this within your code - if that is more relevent to you application. As an adding bonus, removing the dynamic pattern learning would simplify the code a little.
Color Pattern Matching Example
When searching ni.com or the LabVIEW example finder, remember to spell COLOUR the American way... color.
Thanks,
01-30-2012 08:47 AM
Also you can do a simple color threshold if you dont want the full blown pattern match you can do a simple color threshold in the Imaq pallette, I usually use HSL instead of RGB since it performs ofe more lighting conditions. Using Hue Red falls around 0 level with a 255 wraparound, thresholding red would be anything with a Hue of ~240-20 (Wraps around zero) restricting the Saturation and Lum will make your color threshold more selective. A second check on the binary blob size morphology can help find exactly what you are looking for.
01-30-2012 09:56 AM
06-30-2013 02:31 AM
Example using the color identified by selecting a region of interest ROI and activating indicator when there is coincidence in color