Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how do you mask pixels outside a region of interest

I am using Labview to perform some eye tracking, I am particularly looking at some reflections in the pupil.  I use a circular edge VI to find the pupil.  I then use the pupil parameters to construct a region of interest.  After this I use a ROI to Image mask VI then a IMAQ Mask VI to attempt to isolate the pupil.  The problem is the mask replaces all the pixels inside the region of interest rather than outside it.  How do I go about getting it to mask the pixels outside the pupil rather than inside?

 

Any help would be greatly appreciated.

 

Joe

0 Kudos
Message 1 of 6
(5,099 Views)

Hi, Joe,

 

Just try to inverse your Mask with IMAQ Inverse.

 

Andrey.

 

0 Kudos
Message 2 of 6
(5,098 Views)

The default value is to mask outside only. You can do like this

 

mask.JPG

Message 3 of 6
(5,084 Views)
solved?
0 Kudos
Message 4 of 6
(5,048 Views)

Hi,

 

Yes thank you I found another example describing how to find a circular region of interest which worked, unfortunatley I don't seem to have the VI you were refering to.  This was the solution I used in the end.

ExtractCircularScreenshot.png

0 Kudos
Message 5 of 6
(5,046 Views)
The function which i pasted was created from vision assistant. You will have IVA lib files too. Anyway glad you have a solution...:smileywink:
0 Kudos
Message 6 of 6
(5,044 Views)