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