Image Convert ToolCognex VisionPro

This topic contains the following sections.

The Image Convert tool edit control provides a graphical user interface to the CogImageConvertTool tool, that lets you convert images from one format to another.

The following figure shows the Image Convert Tool edit control:

Cognex Image Processing Image Convert wholecontrol

To include the control in your application, you must first add it to the project toolbox. The Image Convert tool edit control object type is named Cognex Image Convert Edit Control. See Adding Edit Controls to Visual Studio for more information.

Control Buttons

The following table describes the buttons at the top left of the edit control.

Table 1. Control buttons
ButtonDescription

Cognex Image Processing Image Convert runbutton

RunPerform the selected image conversion on the image stored in the Current.InputImage buffer and generate a new LastRun.Output image.

Cognex Image Processing Image Convert localdisplaybutton

Local image display

Open or close the local image display window. An Image Processing One Image tool supports the following image buffers:

  • The Current.InputImage buffer contains the current image with any enclosing region graphics.
  • The LastRun.InputImage buffer contains the result from the last execution of the tool.
  • The LastRun.OutputImage buffer contains the results of the tool after it performs the image processing operations.

Cognex Image Processing Image Convert floatingdisplaybutton

Floating image displayOpen a floating image window, which supports the same image buffers as the local image display window.

Cognex Image Processing Image Convert openbutton

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.

For more information about VisionPro persistence features, see the topic Persistence in VisionPro.

Cognex Image Processing Image Convert savebutton

SaveSaves the current properties of the underlying tool to a VisionPro persistence file. You have the option to save either the entire tool or the tool without its images or results.

Cognex Image Processing Image Convert saveasbutton

Save AsSaves the current properties of the underlying tool to a new VisionPro persistence file.

Cognex Image Processing Image Convert resetbutton

ResetResets the underlying tool to its default state.

Cognex Image Processing Image Convert tooltipsbutton

Show ToolTipsEnables or disables the display of tooltips for individual items in this edit control.

Cognex Image Processing Image Convert helpbutton

HelpOpens this help topic.
Run Params Tab

The Image Convert tool edit control lets you choose the following conversion operations:

Table 2. Image Processing Operations
Run ModeDescription

HSI

If the input image is an ICogImage24PlanarColor of type RGB then output a computed ICogImage24PlanarColor of type HSI.

If the input image is already an ICogImage24PlanarColor of type HSI then output an ICogImage24PlanarColor that is equivalent to the input image.

Throw an exception at run time if the input image is any other type.

MaskFromRangeIf the input image is a CogImage16Range then output a CogImage8Grey corresponding to the mask data.
PixelFromRangeIf the input image is a CogImage16Range then output a CogImage16Grey corresponding to the height data.
IntensityFromWeightedRGBIf the input image is an ICogImage24PlanarColor of type RGB then output a computed ICogImage8Grey that represents the greyscale intensity of this color image using customer provided RGB weighting factors.

RGB

If the input image is an ICogImage24PlanarColor of type HSI then output a computed ICogImage24PlanarColor of type RGB.

If the input image is already an ICogImage24PlanarColor of type RGB then output an ICogImage24PlanarColor that is equivalent to the input image.

Throw an exception at run time if the input image is any other type.

Plane2The input image must be an ICogImage24PlanarColor. Output an ICogImage8Grey that represents plane 2 of the input image.
Plane1The input image must be an ICogImage24PlanarColor. Output an ICogImage8Grey that represents plane 1 of the input image.
Plane0The input image must be an ICogImage24PlanarColor. Output an ICogImage8Grey
HSIFromBayerThe input image must be an ICogImage8Grey and is assumed to be organized in the Bayer manner. Output a computed ICogImage24PlanarColor of type HSI.
RGBFromBayerThe input image must be an ICogImage8Grey and is assumed to be organized in the Bayer manner. Output a computed ICogImage24PlanarColor of type RGB.
IntensityFromBayerThe input image must be an ICogImage8Grey and is assumed to be organized in the Bayer manner. Output a computed ICogImage8Grey that represents the computed greyscale intensity of this input image.

Intensity

If the input image is an ICogImage24PlanarColor of type RGB then output a computed ICogImage8Grey that represents the greyscale intensity of this color image.

If the input image is an ICogImag24PlanarColor of type HSI then output an ICogImage8Grey that represents its intensity plane.

If the input image is an ICogImage16Grey then right shift each pixel according to the Encoding property to place the 8 most significant active bits in the output image.

And if the input image is already an ICogImage8Grey then output an ICogImage8Grey that is equivalent to the input image.