Skip to content

Working with Recipes#

Recipes are the image processing designs that you create in the Workbench.

Recipes are saved with the extension .precipe and can be imported into your application code. For more information about importing and working with recipes in your application, refer to the C++ Data Processing Programmer's Guide or the Data Processing SDK samples.

Depending on the image processing tasks you want to perform, pick the required vTools and connect them in the desired order.

Creating a Recipe#

To create a recipe:

  1. In the Workbench, open a new recipe:

    • In the Workbench menu, select New Recipe or New from Template.
    • In the Workbench toolbar, click the New Recipe button:

      New Recipe Icon

  2. Add vTools by selecting them in the vTools pane or by right-clicking in the recipe and selecting the desired vTools from the context menu.

  3. Connect the outputs of one vTool with the corresponding inputs of the next vTool in your design by clicking on an output pin and dragging the connection onto the input pin.
  4. Connect the outputs of the last vTool to the output terminal by clicking on an output pin and dragging the connection onto the output terminal.
  5. Save the recipe.

    Info

    If you want to save camera parameter settings of the camera allocated in the Camera vTool, click the Lock Resources button in the Workbench toolbar first. Otherwise, no camera settings will be saved in the recipe. For more information, see the Camera vTool topic.

Recipe Templates#

The Workbench provides a number of recipe templates to get you up and running quickly. Templates for the following application scenarios are available:

  • Barcode reading
  • Blob analysis
  • Color blob analysis
  • Data Matrix code reading
  • Geometric pattern matching
  • Image format conversion
  • Measurements
  • QR code reading

Running a Recipe#

Before importing a recipe into your application code, it's advisable to test it. That way you can verify that everything is configured correctly and produces the desired results.

To run a recipe:

  1. Click Lock Resources to exclusively allocate the cameras you want to use.
    If you need to configure any camera settings, go to the Features - All pane.
  2. In the Workbench toolbar, click the Run button:

    Run Recipe Icon

  3. In the Preview Pin Data area of the Recipe Management pane, the data that goes into and comes out of the currently selected vTool's pins is displayed.
    For a larger view, open a pin data view by clicking the Pin Data View button in the Workbench toolbar:

    Open Pin Data View Icon

Collecting Statistical Data#

To check whether your recipe meets the timing requirements of your application, you can measure the execution times of individual vTools or all vTools included in the recipe.

To collect statistical data:

  1. Start the recipe that you want to examine.
  2. If you want to collect data about a vTool, select that vTool in the recipe.
    If you want to collect data about the recipe, click anywhere in the recipe, not on a vTool, to select it. A blue frame around the recipe shows that the recipe has been selected.
  3. In the Recipe Management pane, click the Statistics tab.
  4. Click Start Measurement.
    Depending on your selection in step 2, the corresponding data will be displayed in the Recipe Statistics or (vTool) Statistics area.
    The results will be logged in a .CSV file. By default, this file will be saved in your user folder: C:/Users/username.

To change the folder:

  1. Select the recipe by clicking anywhere in the recipe, not on a vTool.
    A blue frame around the recipe shows that the recipe has been selected.
  2. In the General Settings area, change the output folder.

For more information about the statistics feature, see Recipe Management.

Optimizing Recipes#

You can specify how many Workbench threads your CPU processes simultaneously.

To optimize your recipe:

  1. In the Recipe Management pane, click the Optimization tab.
  2. Enter the desired thread count.

For more information about optimization, see Recipe Management.