Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ROIToMask not converting very small ROI

Attached is a sample vi of the problem that I am facing.

I have a small oval ROI that is given a Global Rectangle of [160 120 161 121] and I wish for ROIToMask to mask out a pixel or two given that ROI Descriptor. When I overlay the ROI, it can be seen from my jpg copied onto the BD that it does indeed draw the ROI that small.  It just gets lost when it is sent through ROIToMask.

May I also offer that when given a Global Rectangle of [160 120 162 122], ROIToMask does indeed draw a 1x1 mask onto the image.

TIA,
Candice
0 Kudos
Message 1 of 7
(5,627 Views)
In the previously attached VI there was a misuse of the IMAQ ROIToMask VI. By putting the image as the image model destroys the image. Also for the oval, the ROI given is too small for the algorithm the minimum would need to be [160 120 163 123]. What are you trying to accomplish?
Vince M
Applications Engineer
Message 2 of 7
(5,597 Views)
When given the Global Rectangle [160,120,161,121] I would like it to at least draw a pixel-sized ROI and have that converted to a pixel-sized mask on the image, like it does when given [160,120,162,122].

I have added a case into my program that just bumps the too-small Global Rectangle up to the appropriately large-sized one; I was just looking to see if there were something more I could do.

Thanks for the input,
Candice
0 Kudos
Message 3 of 7
(5,589 Views)
Candice,
                Y dont you resample the image and then selecct the roi.U can always downsample it and at the same time u will have a bigger roi
Message 4 of 7
(5,587 Views)
muks, I'm sorry, I don't follow your suggestion clearly. Can you elaborate?

Thanks,
Candice
0 Kudos
Message 5 of 7
(5,585 Views)
See the attachment
Message 6 of 7
(5,583 Views)
Resampling........
Message 7 of 7
(5,581 Views)