This topic contains the following sections.
The Sobel Edge tool edit control provides a graphical user interface to the CogSobelEdgeTool tool, which you use to isolate and enhance the edge information in your images. The edit control allows you to specify a magnitude scaling factor, choose a post-processing operation, and view vision tool results.
Note: The output images' coordinate space trees are adjusted to preserve the relationship between root space and image features.
The following figure shows the Sobel Edge tool edit control:

The edit control offers the following features:
- A row of control buttons at the top left provides access to the most common operations.
- A set of function tabs allows you to choose the type of edge information to generate, select display graphics, and view results.
- An image display window displays acquired images and graphical results of the Sobel Edge tool.
You can experiment with the edit control by using QuickBuild to create a CogSobelEdge tool. A new CogSobelEdge tool appears with the input terminals for the edge angle and the final magnitude image, as shown in the following figure:


The following table describes the function of each button:
| Button | Description | Function |
![]() | Run | Generate an edge angle, edge magnitude, and final magnitude image based on the current set of run parameters. |
![]() | Electric mode | Toggle electric mode, where the Sobel Edge tool executes automatically when particular configuration parameters change. In electric mode, a lightning bolt appears next to every electric property. |
![]() | Local image display | Open or close the local image display window. A Sobel Edge tool supports the following image buffers:
|
![]() | Floating image display | Open a floating image window, which supports the same image buffers as the local image display window. |
![]() | Open | Open a VisionPro persistence (.vpp) file that contains a set of saved properties for this vision tool object type. VisionPro reports an error if you try to open a .vpp file for another object type. |
![]() | Save | Save the current properties of the vision tool to a VisionPro persistence (.vpp) file. The edit control allows you to choose between saving the vision tool with or without its image buffers and tool results. |
![]() | Save As | Save the current properties of the vision tool to a new VisionPro persistence (.vpp) file. |
![]() | Reset | Reset the vision tool to its default state. |
![]() | Show ToolTips | Enable or disable the display of tooltips for individual items in the edit control. |
![]() | Help | Open this VisionPro online help file. |
This section contains the following subsections.
Use the Settings tab to specify the MagnitudeScale you want to use in the range 0.5 through 50. In addition you can choose any post-processing operation you want the tool to perform. The following figure shows the default Settings tab:

If you choose edge hysteresis thresholding as a post-processing operation, the Settings tab shows the following parameters:

The following table describes the parameters you must configure to generate the best results:
| Parameter | Description |
| HysteresisThresholdLow | All pixels with edge magnitude values below the low threshold are automatically set to the non-edge value in the final magnitude image. |
| HysteresisThresholdHigh | All pixels with edge magnitude values greater than or equal to the high threshold are automatically set to the edge value in the final magnitude image. |
| HysteresisSurvivorPelValue | All pixels that pass the edge hysteresis threshold method are set to this grey value. |
| HysteresisNonSurvivorPelValue | All pixels that fail the edge hysteresis threshold method are set to this grey value. |
If you choose whole-pixel peak detection as a post-processing operation, the Settings tab shows the following parameters:
The following table describes the parameter you must configure to generate the best results:
| Parameter | Description |
| PeakDetectThreshold | All pixels with edge magnitude values below this threshold are automatically discarded from the final magnitude image. |
Use the Region tab to specify the input region for the tool. The following figure shows the Region tab:

The following table summarizes the features of the Region tab:
| Feature | Description |
Defines how the tool interprets the training region you specify. Choose either of the following options:
| |
Select the shape of the input region. Selecting "None=Use entire image" means that the tool uses the entire input image. A 2D Symbol tool supports the following input region shapes: The set of region-defining parameters that appear depend on the region shape you use. For more information on using a polygon as an input region, see the topic Using Polygon Input Regions. | |
| SelectedSpaceName | The coordinate space in which the training region is interpreted. For information, see Coordinate Space Names. |
| Select Mode | Selects the set of parameters that define the rectangle when the available Region Shape is CogRectangle or CogRectangleAffine. If you use CogRectangleAffine, the angles of rotation and skew can be specified in degrees or radians, although the underlying tool keeps the measurements in radians. |
This section contains the following subsections.
Use the Graphics tab to specify the graphics that the tool generates and displays. The following figure shows the Graphics tab:


Choose any of the following options:
| Option | Description |
| Show Edge Angle Image | You can choose not to generate an image record for the LastRun.EdgeAngleImage . |
| Show Edge Magnitude Image | You can choose not to generate an image record for the LastRun.EdgeMagnitudeImage. |
| Show Final Magnitude Image | You can choose not to generate an image record for the LastRun.FinalMagnitudeImage. |

Choose which of the following graphics appear in the LastRun.InputImage buffer after the tool performs its image-processing operations:
| Option | Description |
| Show Input Image | Determine whether or not the input image is recorded as part of the diagnostic record, and whether the image is copied to the record or saved in the record as a reference. |
| Show Region | Display the input region if one was used. |
| Show Transformed Region Image | Display the affine transformed image, but only if you have specified Affine Transform for the Region Mode and you have supplied a CogRectangleAffine for the input region. |









