Collapse
CollapsingX
  • - or -

Procedure for configuring image sets


Each image in an image set can be explicitly specified or generally specified (for example, having the same root name in a specified folder). You can define multiple distinct image sets; each set can use different design-time and/or runtime images. In addition, each set can use a subfolder of a specified folder per recipe (see the Recipes overview section in Chapter 55: Recipes). The currently selected image set is displayed in the Camera Images pane.

Adding and configuring an image set

To define an image set and the images that it includes, perform the following:

  1. Access the Platform Configuration dialog, by clicking on the Configure platform () toolbar button in the Platform toolbar. Open the Image Sets page, and if present, select the name of one of the possible image sets (for example, Set1). If there are no image sets listed, click on the Add button. Then, specify the name for the new image set, and click on the Configure button. In the following steps, this new image set will be named SetN.

  2. On the SetN page, select the source of your image(s) from the Image Source dropdown list. It can be one of the following:

    • Folder. Specifies to use all the images in the specified folder. The images in the folder can be limited by file type using the File types dropdown list.

    • NumberedFiles. Specifies a folder containing a set of numbered image files. See the Numbered image files subsection, later in this section.

    • SequenceFile. Specifies a sequence file, which is a text file that lists the file names of the images to use. See the Sequence file subsection, later in this section.

    • SingleFile. Specifies to use a single image file.

    When using multiple images, you can specify to use them in forward or reverse sequence using the Direction dropdown list.

  3. Set the source path for the design-time and runtime image(s).

  4. Optionally, if you have images associated with a recipe used by your project, you can append the recipe's subfolder to the path by selecting the Append recipe subfolder option. Note that if your project does not use a recipe, this option should remain unselected.

  5. Optionally, to include images stored in subfolders, select the Include subfolders option.

  6. Verify that the image set's options are set as expected. By default, the Convert to grayscale option is enabled because most Analysis and Processing steps require a grayscale image. For information on color conversion options and fine-tuning the conversion, see the Dealing with color images section in Chapter 2: Building a project.

  7. Set the Mode input. Software trigger mode iterates through the images in the image set via a Button element linked to a Software Trigger action in the operator view, or via a Trigger step. Continuous mode loops through all the images without waiting for user-interaction or a timed software trigger.

You can change the Camera Source input of a Camera step to switch between acquiring images from a camera and from an image set while the project is deployed. This can be done entirely through the operator view. See the Switch between camera or disk example subsection of the Controlling image acquisition from the operator view section in Chapter 50: Customizing the operator view.

Design-time folder and runtime folder paths

The folder from which to take the images can be the same at runtime as it is at design-time, or they can differ. They can be stored locally on your runtime platform, locally on your design-time platform, or stored elsewhere on the network. To specify different design-time folder and runtime folder paths for your image sets, specify the design-time folder and runtime folder on the SetN page (under the Image Sets page of the Platform Configuration dialog). If the files are stored remotely (that is, in a network folder), you need to verify that your platform has access to that folder.

At design-time, to copy the selected image set for design-time over to the runtime platform, use the Copy images to the target platform button (in the SetN page).

At the bottom of the SetN page are statistics showing the number of images at design-time and at runtime (that is, the number of images stored locally and the number of images stored on your runtime platform). This list is the only way to ascertain, through Matrox Design Assistant, that the same number of required images is present in the respectively specified design-time and runtime folders.

For information regarding paths, see the Specifying a path section in Appendix A: Expression syntax.

Numbered image files

Numbered image files are sequentially numbered files with the same root name. To use numbered image files, select NumberedFiles (from the Image Source dropdown list on the SetN page of the Platform Configuration dialog). Click on the Browse button, and then navigate to the folder containing the series of numbered images to add to your image set; within that folder, select the images for the numbered series. The remaining fields in the dialog will be automatically filled out. Optionally, specify the root name, extension, and the first and last number of the series. For example, a set of images named TEST001.BMP to TEST123.BMP would have a root name of TEST, an extension of BMP, the first number would be 1, and the last number would be 123. Note that the first and last number can be left to their defaults of smallest and biggest.

The number of image files found is displayed in the dialog's bottom-left corner.

Sequence file

Sequence files are a set of images that are listed (one line per image) in a text file. To use a sequence file, select Sequencefile (from the Image Source dropdown list on the Image Sets page of the Platform Configuration dialog). This is useful if you have many images that are not sequentially numbered.

To create the sequence file, use any utility that will allow you to convert a folder listing of file names into a text file (such as one of the MIL interactive GUIs or Matrox Inspector) or a text editor. Each image and its full path must be listed on a separate line in the sequence file. Shared network paths are permitted. The project can use different sequence files when it is running at design-time and when running at runtime.

The number of image files in the sequence file is displayed in the dialog's bottom-left corner.

Recipes

Each recipe can use its own image set. If your project includes a recipe, typically the image sets used for the recipe are stored in their own subfolder (to make recipe reuse easier).