12-22-2008 08:47 AM
hi;
I want to match 8 bit image with 32 bit image in vision assistant. I have a research topic on my Phd thesis about image processing and I found an image on the internet like this but I couldn't solve this problem in vision assistant. I have attached it. The original image and its thresholded state match on the same image. Please help me, how can I do it???
Solved! Go to Solution.
12-22-2008 01:43 PM
Attached is an example script that works with the image that you uploaded. The key is to use the Mask Color Operator and image buffers. In the attached example, a thresholded image is overlayed back onto the original image. The thresholded image can also originate from a separate image file. In this case, you would open the color image, buffer the color image, use the Get Image function to open a new image of the same size, threshold the new image, buffer the result, retrieve the color image from the buffer and use the Mask Color Operate to create the overlay.
-Robert Eastlund
12-23-2008 01:06 AM
Hi Robert;
I have received your answer this morning. Thank you very much for your interest and answer. I will run your program with my other example images. If have a problem, I'll ask you. Again thank you...
Baris
12-23-2008 02:59 AM
hi robert;
after sending your message, I tried your program on a new image. after subtracting "binary image inversion" from your program, it works. but now I have new question, how can I change the color of contaminated area of the fig? (for ex. blue). I attached my new example and new image for you. see you...
baris
12-23-2008 11:50 AM
I am not sure how to go about changing the color of the binary image mask within vision builder. Anyone???
12-24-2008 03:20 AM - edited 12-24-2008 03:24 AM
The proposed script was just erasing the zone of interest, replacing the thresholded pixels with zeroes. To fill this zone with a given color, one possible way is to invert the mask, use it to make a new image of the thresholded zone, multiply by the choosed color (use a saturated color otherwise you'll get color variations), and add the result to the previous image.
That's what the attached script is doing.
12-24-2008 05:31 AM
hi chilly charly;
I want to thank you for your interest. I applied your program to my all examples and it works very well.
Again thanks,
baris
01-30-2009 03:29 AM
hi chilly charly;
I want to ask you a question about this topic. How can I put in this program pass/fail function? for example, if there are any colored areas (red areas) on the fig (like on the image), give fail decision, or if there isn't any defect on the fig (no colored area), give pass decision. how can I decided?
thank you....
02-03-2009 01:33 AM
hi chilly charly;
are you there???
08-20-2010 07:18 AM
hi chilly charlie;
after you sent your mail, as you remember it worked on all my examples. after that I improved my system and now I'm working about conveyor system. A camera (Guppy) triggered by an optical sensor sends image to the computer for every dried fig. but now I have a problem that I couldn't match your program and my program each other. I attached this file.
thanks a lot....
adanali