Working with Recipes#
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:
- 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:
- 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.
- 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.
- 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.
Save the recipe.
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.
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
- 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:
- 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.
- In the Workbench toolbar, click the Run button:
- 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:
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:
- Start the recipe that you want to examine.
- 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.
- In the Recipe Management pane, click the Statistics tab.
- Click Start Measurement.
Depending on your selection in step 2, the corresponding data will be displayed in the Recipe Statistics または
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:
- 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.
- In the General Settings area, change the output folder.
For more information about the statistics feature, see Recipe Management.
You can specify how many Workbench threads your CPU processes simultaneously.
To optimize your recipe:
- In the Recipe Management pane, click the Optimization tab.
- Enter the desired thread count.
For more information about optimization, see Recipe Management.