Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Automated ROI

Hello all,
 
I currently have a vi that is able to open an image, highlight the edges, perform a threshold, manually draw an ROI, then detect edges within the ROI and give out a rating which goes through some algebra that is dependent on a custom grading technique for scratches and digs on a lens.
 
Is there any way the ROI be automated to draw or create a rectangle around detected edges at a 200+ pixel depth; everything surrounding the particle is at or around 0.  I've tried a number of things and looked at all of the examples for ROI, edge detection, and image analysis but each attempt is to no avail.
 
Any insight is greatly appreciated Smiley Tongue
0 Kudos
Message 1 of 9
(5,347 Views)
Hi!

We have written many custom VIs for automatic placement of ROIs. I am not quite certain, if I understand the specifics of your applications, to be honest. Would you mind posting an image to better illustrate that?
We have used blob analysis or particle analysis many times for that. For instance, you can find a bounding rectangle as one of the criteria you are looking for within the particle analysis. There you can specify other criteria of the things you are looking for. You can then use the bounding rectangle information and convert this to a ROI descriptor and even do some additional math on it, if you want to maybe add an additional margin to it.

Best,
Markus Tarin

0 Kudos
Message 2 of 9
(5,340 Views)
Thanks for the reply Markus,
 
I used blob/particle analysis and I am fully functional in what I manually wish to do.  However, I wish to somehow automate the ROI procedure.  I'll attach an example of the images I am working with.  This is an image of an 80-Scratch standard with imperfections on the exterior which is why there are many other white particles coming up.  It is also slightly out of focus with the illumination so some glaring is apparent.
 
Is there a way for an ROI rectangle to be automatically drawn around the scratch (horizontal line fully across the image), as well with some of the other larger, round white imperfections (which are known as digs).
 
Perhaps one of your VIs is just what I'm looking for.  I anxiously await your reply Smiley Happy
 
 
0 Kudos
Message 3 of 9
(5,337 Views)
Hi!

Please find attached a screen shot and a quick and dirty VI that I put together within the last five minutes. My existing code doesn't lend itself to this particular application very well.
Now, I understand that this may not be a 100% solution to what you want to accomplish, however, I think it should give you a good idea.

I have also attached your original image as well as a screen shot of the results. You may have to refine your particle filtering a bit to remove things you don't want.

VI provided was written in LV8.5

Best,
Markus Tarin




Download All
Message 4 of 9
(5,327 Views)

Hello again Markus,

Once again thank you for the reply...

In looking at the attached jpg of the front panel it appears to be what I am looking for, when I go down to the lab a little bit later today I'll actually check out the entire vi and work forward from there.

I see it was created in LV 8.5, I'm using LV 8.2.1 Smiley Sad.  Any possible candidates to convert this back for me?

Thanks in advance

 

0 Kudos
Message 5 of 9
(5,312 Views)

Hi Steve,

Here is the VI converted for LabVIEW 8.2 and 8.2.1.  Enjoy.

Carlton
CLA
Message 6 of 9
(5,274 Views)
Thank you very much Carlton, I was hoping someone would eventually answer my call for help (lol).
0 Kudos
Message 7 of 9
(5,262 Views)
Hi
I'm using L 7.1 someone can convert this file for me please ?
Thanks
 
0 Kudos
Message 8 of 9
(4,935 Views)
Give the attached VI a shot.
Carlton
CLA
0 Kudos
Message 9 of 9
(4,894 Views)