Camera Image Registration

Image Registration identifies if the image has shifted and corrects the image by moving it in x and y coordinates. It is used to ensure that the image taken by the camera during the test is aligned correctly with regions of interest that are set up for image recognition. Image Registration uses the same algorithm used for Pattern Image Recognition. The region of interest is searched for a chosen pattern, and if the pattern location is different from the one stored during the set up, a shift in x and y coordinates is applied to the image during the test.

To set up image registration, use this procedure:

1.In MxTransIt, in the Image Registration properties of the Camera Transform, set Enabled to False.

ImageRegistration-properties-marked

2.Create a Full base image to be used for registration. (Either run a Scenario once and save an image or save an image using the Camera utility.)

3.Create a directory (such as 'Registration') under the RecoImages folder and put the full image in the Full_Image directory.

NOTE: Before proceeding, close MxVDev. If MxVDev is open it will interfere with the storage of the registration coordinates.

4.Select your camera transform.  In the Base Directory Path property under Image Registration, browse to the directory created in step 3.

5.Configure Image Registration. The Configuration form is the same as for Pattern Recognition.

a.Set the ROI around the pattern image to be searched. Make sure that ROI encompasses the pattern by the amount that you want registration to correct for. (For example: if you allow for +/- 20 pixels in x and y coordinates around your pattern, this is the region that registration will work for; if the image has shifted more than 20 pixels, then registration will not work properly and manual adjustment of system under test or camera will be needed.)

b.Create a Sample Image using the ROI set in step a.

c.In the next tab, Create a pattern to be searched for by drawing a rectangle ROI around the pattern.

d.You can test the search algorithm in Test tab.

6.Set Enabled to True, under Image Registration properties in the Camera Transform's properties. At this point, the camera captures a frame and locates the Registration Pattern in the image and stores the x and y coordinates of the pattern. From now on, before a test is run, the registration process captures a frame and compares the found x and y coordinates to the ones that are stored after this set up procedure. If x or y is different, the image shift is applied.

7.Select File->Save from the MxTransIt main menu to save your Harness.

The Use Registration Port parameter determines when registration is checked:

If the Use Registration Port parameter is False, Image Registration is checked only once before the test execution is started (when project is loaded or test harness is reconnected/reloaded in MxVDev). This setting is useful if the registration feature is visible while power to the DUT is off.

If the Use Registration Port parameter is True, then registration is not run until the Run Registration event is set in a Test Case. This is useful when the registration feature isn't visible until a test case is run, such as an LCD screen.

In either case, if the image or camera is shifted during the test, the registration will not be able to correct for the image shift.

Related Topics:

Camera Transform

Pattern Recognition

Image Recognition Overview

Image Recognition Guide