Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I dynamically define ROI in IMAQ?

I am trying to mask an image in IMAQ. However, the image location may vary by as much as 1/2" in the picture. Is there a way to dynamically define the ROI for image masking? I am trying to locate bad pixels etc in an lcd.
0 Kudos
Message 1 of 2
(2,787 Views)
It is fairly easy.

The first step is to figure out what coordinates you want to use. You can use Find Edge to figure out where the edges of the screen are, and line intersections will tell you where the corners are.

If you just want a simple rectangle ROI, just use rectangle to ROI in the ROI palette. If you want a general polygon, you can create your own version of the same vi.

If there is a high contrast between the screen and its surroundings, another possibility is thresholding the screen from the background, filling any spots, and using Mask to ROI.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 2
(2,787 Views)