Extracting a Vector Using Profile Function
Objective
You'll need first to load an image (step 1), set a destination vector, and detect the scratches (step 2).
Scratches can be detected using a profile
Step 1: Load the source image
From the main menu, click EasyImage, then Profile.
1. | Click the Open icon of the Source Image area, and load the image file EasyImage\Plastic.tif. |
2. | Keep the default variable name for the new image object In a general content, the term object should be understood with the meaning of a class instance. In EasyObject, an object is a maximally-sized area of adjacent connected pixels belonging to the layer foreground., and click OK. |
Step 2: Set the destination vector and detecting the scratches
1. | Click the New icon in the Destination Vector area. |
2. | Select the BW8 option for the vector type, and click OK. |
3. | A profile appears on the image (red line segment). In the destination vector window, vector values correspond to pixels along the line segment. |
The scratch is detected as a sharp deviation in the vector graph.
4. | Using the mouse, drag the handles to move or resize the red line segment, and observe the plot evolution. |
The sharp deviation appears whenever the line segment is placed across the scratch.