Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select ROI automatically

Hello,

I wanna process and analyse images continously. But there are two problems those are confusing me. First, I wanna analysis the bottom and up region of image, it is difficult to select ROI, because the place showed in image could be change by movement of camera(It means I need a dynamic ROI, How to do it?). Second, the brightness of image is also changeable, the threshod must be dynamic. How to accomplish them? Thank you for helping me. I've posted two images.

Download All
0 Kudos
Message 1 of 15
(6,938 Views)
I will suggest you make the illumination uniform if possible first. Also can you tell me which region are you interested in?
0 Kudos
Message 2 of 15
(6,926 Views)
you can see a circule in picture. I am interested in the shining part of bottom and up in circule.I have signed in the follow picture.
0 Kudos
Message 3 of 15
(6,918 Views)
Ok is there any part of the image that doesnt considerably change (Illumination wise). If so can you threshold and detect that part. You can always define the roi based on this part of the image.
0 Kudos
Message 4 of 15
(6,912 Views)
Actually not, I am afraid. Because it is a fusion experiment with  continous reaction. The illumination of the image will always change during experiment.
Message 5 of 15
(6,909 Views)

Hi

 

I did some tests with the Vision Assistant, so one possibility I found was the following:

 

1. Open the image

2. Auto Threshold (Entropy)

3. Basic Morphology (Erode)

4. Particle Filter -> Area -> only keep objects with area from 1000 to 5000 pix^2

5. Particle Analysis -> give you all information over this two regions your looking for, after you can place a ROI in the original image automatically

 

Screenshots are attached, hope that helps ?

 

With the coordinates you can set the ROI automatically in LabVIEW.

 

OPen_Image.png

 

Thresholding.png

 

Erode_Objects.png

 

Particle_Filter_Area.png

 

Particle_Analysis_Data.png

 

Kind regards

Pixar, NI Germany

Message Edited by Pixar on 05-31-2010 07:12 AM
Message 6 of 15
(6,893 Views)

Hello,

I'm trying your method. In the second step I've got different image with you. I have clicked on entropy, but it has threshold range minimum 183 automatically. I've seen in your image, it had threshold range minimum 108. Is there a way to get over this problem? Thanks a lot.

0 Kudos
Message 7 of 15
(6,888 Views)

I have already know, because the images are different in format. The solutions are quiet different.

 

0 Kudos
Message 8 of 15
(6,887 Views)

Hello,

I got another question. Do you know how to connect the vision Assitant with grab. I am using PXI-1411 card for image acquisition and I wanna analysize the image immediately in LV

0 Kudos
Message 9 of 15
(6,877 Views)

Hi

 

Yes click on the Acquire tab

 

acquire_image.png

 

After that choose your camera driver, then go to process image and at last you can create a LabVIEW VI automatically over tools -> create LabVIEW VI

 

create_LV_VI.png

 

Perhaps you can insert after the acquisition a Histogram step, then you can measure the value for the Thresholding.

 

Regards

 

Pixar

0 Kudos
Message 10 of 15
(6,872 Views)