Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Mask lose original position in new window

I am trying to get a mask of a ROI Bounding Box. I am able to generate the ROIBoundingBox image as well as the mask window but the location of the ROIBoundingBox is always centralised in the mask window. Why is this so? I am using CVI.
0 Kudos
Message 1 of 2
(4,210 Views)
Are you using the imaqROIToMask function? If so, are you supplying an imageModel (one of the parameters for the imaqROIToMask function)? If you use the source image in which the ROI was drawn as the imageModel, the source image is used as a template for the final destination image. This means that the resulting image automatically acquires the size of the image and location of the ROI as found in the original source image. However, if you do not supply an imageModel, the size of the image mask generated is limited to the bounding rectangle of the ROI and the offset of the image mask is set to reflect the real position of the ROI. Therefore, if you are not supplying an imageModel, this may explain why the ROI always appears centralized.

Best regards,
Dawna P.
App
lications Engineer
National Instruments
0 Kudos
Message 2 of 2
(4,210 Views)