I'm still very new to Machine Vision myself, so take this with a grain of salt. I think that if you have found the center of the centroid you can define the rectange that you would like (based on the center point +/- where the edge should be). Then use the IMAQ Convert Rectangle to ROI.vi to create an ROI at the desired location.
I have created a ROI initially and I will find the centroid within the rectangle. Then I want to move the center of rectangle to the centroid inside the ROI. I wish to make translation instead of erasing the ROI and create a new one in the next video frame. Do you have any idea?
Unfortunately, there is no way to move the ROI without redrawing it between frames. The previous suggestion involving the use of IMAQ Convert Rectangle to ROI is the best option for you. The top, left, width, and height parameters for the rectangle can be determined based on relative positions with respect to the center of the rectangle.
Regards, Scott R. Applications Engineer National Instruments