Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Outer Region (ROI) Concept

Hi,

I am fairly new to the LV machine vision environment, not necessary to machine vision.  Is there a way to define an "outer" region of interest in LV?

I'd like to do something with everything except the enclosed area and I do not seem to be able to do it. I like ie the masking function concept when you can choose where you want to mask the inside or outside of the region. However in this case the problem is the black & white concept of masking. Is there a way to mask out the region in white color (instead of black)? Or maybe any color? Why not?

0 Kudos
Message 1 of 5
(1,717 Views)

If you use the IMAQ ROI to MASK vi, there is inputs for Filling Value (default = 255) and Background Value (default = 0).  Just provide inputs with the values reversed and it should work.

 

Or if you use another method to generate the mask, then us the IMAQ AND vi with the And/Nand input set to TRUE and feed the image input into SRC A and SRC B.

Randall Pursley
0 Kudos
Message 2 of 5
(1,712 Views)

The Filling Value is just for the mask. It wont affect the way the image is being masked.

I found a way to create and "outer" ROI but it is weird. The ROI descriptor has a parameter Internal/External, yet it does not work that easy. Single contour wont do a thing. The External/Internal setting work only in presence of two contours - The second one is simply the whole image- not very efficient but works.

0 Kudos
Message 3 of 5
(1,691 Views)

The mask is just a binary image.  If you invert the mask and apply it to an image it does work.  I tried it myself before suggesting it.

 

Run this once with your image, draw an ROI and run it again.  Just in case this is what you wanted.

Randall Pursley
0 Kudos
Message 4 of 5
(1,688 Views)

Can you post it as an image? I use LV9.

0 Kudos
Message 5 of 5
(1,669 Views)