Etiquetas

lunes, 11 de mayo de 2015

Artificial Vision 3 Inspecting Objects for Correct Measurements

In this example we will see how the image calibration and object detection is performed. With the following instructions will see we create a
inspection to measure the distance between the holes in a board to verify
the board meets the required manufacturing specifications.

We will follow the following instructions to configure a Simulate Acquisition
step that simulates image acquisition boards.

1. Inspection Steps palette, select the tab acquire images.
2. Click the Simulate Acquisition step. The property page for step
opens.
3. Step Name control, enter Acquire Board.
4. Click the Browse button. The Select an image file dialog opens.
5. Navigate to <Vision Builder AI> \ DemoImg \ Tutorial 2 where
<Vision Builder AI> is the location in Vision Builder AI is
installed.
6. Select the first image 01.jpg image and click Open.
7. Ensure that cycle through the Control Pictures folder is enabled for Vision Builder load a different image in the folder each time the step is executed.
8. Click the Calibration tab.
9. Click Create Calibration to start the calibration wizard.
10. In the Name of the calibration check, enter calibration Board.
11. Click Next.

For this example, assume that the camera that took the inspection
images is perpendicular to the plane of the image.
Based on these assumptions, you can use Simple calibration to calibrate
their images.

12. Select the Simple calibration and click Next.
13. Make sure you select Use Current image and click Next.
14. Make sure Type is set to Color Square since the camera
acquired images for this exercise has square pixels.
15. Click Next.
16. In step of specifying the relationship Pixel, click 0 mm and
50 mm in the rule at the bottom of the image, as shown in
the picture.



17. In the Correspondence Image - Real World control, enter 50 for the
value, and select millimeter for the Unit.
18. Click Next. In the Set Calibration Axis step, you can define the origin and angle of the
calibration axis anywhere in the image. By default, the top, left pixel in the
image is the calibration axis origin, and the horizontal axis of the image is
the calibration axis angle.
19. Click OK to learn the calibration information and exit the calibration
wizard.
20. Click OK to add the step to the inspection

Locating Features to Measure


Complete the following instructions to configure a Detect Objects step that
finds small holes in the gasket.

1. In the Inspection Steps palette, select the Check for Presence tab.
2. Click the Detect Objects step. The property page for the step opens.
3. In the Step Name control, enter Detect Small Holes.
4. Using the default Rectangle Tool, draw a region of interest (ROI)
around the entire gasket, as shown in the picture.



5. In the Threshold tab, select the Bright Objects option for the Look
For control.
Notice that the blue shading highlights all bright pixels—pixels with
high intensity values that fall within the Threshold Range—in the
ROI.
6. Click the Settings tab.
The passage located four objects, listed in the following table. Depending on the location of points defined by the user in step Calibrate Image
previously configured, the values ​​for the size (mm2) may differ
slightly from the values ​​shown in the table.



Items 1 and 4 are the small holes of interest in this step. the
The following steps describe how to use the minimum object size and
Controls maximum size of objects by detecting objects step out
objects of interest based on their size.
7. Enable the size of the minimum and maximum object size objects
controls.
Based on the information in the table, the small holes have sizes
61.97 mm2 and 6104 mm2.
8. Establish minimum object size 50 and maximum object size to 70.
9. On the Limits tab, enable the minimum number of objects and
Maximum number of controls Objects. Set its value to 2.
10. Click OK to add the step to the inspection.


Complete the following instructions to find the large hole in the gasket.



1. Right-click the Detect Small Holes step in the State Configuration
window, and select Copy.
2. Right-click the Detect Small Holes step again.
3. Select Paste. A copy of the Detect Small Holes step is placed after the
original step.
4. Double-click the Detect Small Holes copy or click the Edit Step
button to launch the property page of the step for editing.
5. In the Step Name control, enter Detect Large Hole.
6. Select the Settings tab.
Based on the information in table, the large hole has a size of
1399.71 mm2.
7. Set Minimum Object Size to 1300 and Maximum Object Size
to 1450.
8. In the Limits tab, enable the Minimum Number of Objects and
Maximum Number of Objects controls. Set their values to 1.
9. Click OK to add the step to the inspection.

Measuring Parts of the Gasket


1. In the Inspection Steps palette, select the Measure Features tab.
2. Click the Geometry step. The property page for the step opens.
3. In the Step Name control, enter Check Top Distance.
4. In the Geometric Feature control, select the Distance measurement.
5. Select points 1 and 3 by clicking the points in the image or selecting
the points from the Available Points list.
6. In the Limits tab, enable the Minimum Distance control and set it
to 32. Enable the Maximum Distance control and set it to 35.
7. Click OK to add the step to the inspection.


Complete the following instructions to measure the distance from the large
hole to the bottom small hole to inspect whether the distance meets
specifications.

1. Right-click the Top Distance step in the State Configuration window,
and select Copy.
2. Right-click the Top Distance step again.
3. Select Paste. A copy of the Top Distance step is placed after the
original step.
4. Double-click the Top Distance copy or click the Edit Step button to
launch the property page of the step for editing.
5. In the Step Name control, enter Check Bottom Distance.

Setting the Inspection Status



Complete the following instructions to add a Set Inspection Status step to
determine whether the inspection passes or fails.

1. In the Inspection Steps palette, select the Use Additional Tools tab.
2. Click the Set Inspection Status step. The property page for the step
opens.
3. In the Inspection Status control, select the FAIL if any previous step
fails option.
4. Click OK to add the step to the inspection.

Testing the Inspection



Test the inspection to make sure it returns the results you expect. Click the
Run Inspection Once button to run the inspection on each of the test
images. This table lists the test images, the inspection status to expect for
each image, and an explanation of the status.



Saving the Inspection



Complete the following instructions to save the example inspection.
1. Select File»Save or click the Save button on the toolbar.
2. Navigate to the location where you want to save the inspection.
3. In the File Name control, enter a name.
4. Click Save to save the inspection.

No hay comentarios:

Publicar un comentario