04-10-2010 06:52 AM
Hi there,
I'm trying to write a vi using match geometric pattern which will look for a specific letter (e.g.. A, B, C.... as shown below in Image1) at a time on a live video. My code seems to do the job OK but the only way I was able to make the search work was by using imaq image cast (as shown below in Image2) and converting it to grayscale (U8). My problem is that I require the final image (which is overlayed with a red circle in the centre - see Image1) to be in color but so far my vi only works in grayscale.
Any thoughts anyone?
Image1
Image2
Solved! Go to Solution.
04-10-2010 09:58 AM
If your analysis is working fine, the solution is fairly simple. Do your analysis using the grayscale image, then display the results on the color image. Nobody will ever know...
Bruce
04-10-2010 10:00 PM
Thanks for your prompt reply Bruce. I also thought your solution was the way to go but I didn't manage to make it work that way. I modified my vi so that the color image should not have been converted for display (but overlayed with my red circle and a text message) and then not only the image changes constantly between color and grayscale but also the overlay circle and text message flicker all the time. I'm familiar with Labview but not with image processing, therefore, I am afraid I might be making a very silly mistake somewhere in my code that prevents me from displaying the color image with the overlay properly. The image below shows what I have changed from my previous post.
04-10-2010 10:44 PM
Branching a wire does not make a copy of the image. You need to create a second image for the grayscale. IMAQ Cast should have an input for a destination image - wire the grayscale image in there. If it doesn't, make a copy of the image (IMAQ Copy) then use Cast.
Bruce
04-10-2010 11:48 PM
You were absolutely right, If a make a copy before casting than it works fine.
Thank you very much for your help.