Deploy Custom HMI Applications
Last updated
Last updated
The Recipe Window lets you create and manage multiple image processing tasks (recipe rules) as a single application (recipe) through a simple user interface. You set up these recipes in AugeLab Studio during the project development phase, and you can later deploy or change them easily using the Recipe Window. This helps you develop, monitor, and test complex image processing projects without needing advanced technical skills.
Recipe Window can be used as an external application (no need to open AugeLab Studio). Recipe Window can be installed by AugeLab Studio. Click "Tools -> Install Recipe Window" in menubar.
After installation, shortcut (AugeLab Studio - Recipe Window) will be created on desktop. With using these shortcut Recipe Window can be used as an external application (no need to open AugeLab Studio).
There is three sub window in Recipe Window. There sub windows are:
EDITOR WINDOW
Recipe can be created / modified in this window.
VIEW WINDOW
Created recipes can be monitored in view window.
TEST WINDOW
Created recipes can be tested by given test images in this window.
This is the editor window in Recipe Window app. In this window, user can create / modify recipe. Let's check how to use it step by step.
LOAD MODEL BUTTON
Recipes created based on recipe model configuration. This model contains all image processing procedures, it is created in AugeLab Studio. This model file will be explained in detail in RECIPE MODEL section.
EDIT CAM CONFIG
Cameras are used as image source for recipe rules. Each rule needs an image source to apply an image processing task. Before start to create a recipe camera config needs to be specified. This configuration can be set by Camera Configuration Window. All connected cameras listed on this window. Camera resolution and advanced settings (exposure, white balance, ... with CAM SETTING button) must be set for each camera. Frames can be checked via CHECK CAMERA button. If there is an issue about camera (such as connection issue) all connected cameras can be RESCAN or RELEASE with related buttons. After all configuration completed save config via SAVE CONFIG button.
SELECT CAMERA
As mentioned before, each recipe rule needs an image source(camera). Before creating a recipe rule a camera needs to be selected.
SET RULE CONFIG
After camera selection, a recipe rule type needs to be selected based on requirements. This recipe rules listed based on [recipe model]. A recipe can have multiple rules, each rule must have a unique name in order to distinguish between multiple rules.
SET RULE IMAGE
Image can be obtained with various ways in Recipe Window:
TAKE IMAGE button
Get and display an image from selected camera immediately.\
IMPORT IMAGE button
Image file can be also used instead of camera as image source.
⚠️ Image resolution must be same with camera resolution.
TAKE IMAGE WITH TRIGGER button
A trigger must be defined in recipe model in order to get one image when related object detected to perform defined image processing task in model file. This buttons waits trigger then get and display the image.\
SELECT AREA REGION
User may need a specific area on camera frame/image to perform image processing tasks. After clicking SELECT AREA button user can specify this area on image with click and drag with mouse.
SELECT OBJECT REGION
User may need to create a reference image for some image processing tasks (such as finding and object). This reference object image can be specified with SELECT OBJECT button. After clicking this button user can specify object boundary on image with click and drag with mouse.
RULE OPERATIONS
Until now, we completed following steps:
camera config done
rule type and name defined
With clicking ADD RULE button, all these configuration will be combined and added into recipe as rule.
** UPDATE RULE: click related rule in rule table, update a parameter (camera, rule type, object area, ...) and click UPDATE RULE button. ** DELETE RULE: click related rule in rule table, click DELETE RULE button.\
SAVE RECIPE
As a last step, all created rule configurations with related images and camera configuration needs to be saved as a file with SAVE RECIPE button.
On previous section, we check features of editor window and learn how to create new recipes. In View Window, these created recipes can be start as process and result can be checked as shown below.
Let's check how to use this View Window step by step:\
Define Recipe Name and Run\
At first step, recipe name need to be defined to run. If there is an available saved recipe with given name. When RUN button clicked, if all configuration is valid and trigger is true, model start to run and results shown as image and table view consecutively.\
Check Results As mentioned on previous sections, a recipe may have multiple rules. As displayed in the image above, recipe named pi loaded and run. Since there is two rules in this recipe, there is two bordered image in displayed image.\
In this example, there is error in circle measure rule in last run. To indicate error in user interface, there is red border on related rule image and also NOK indicator displayed on table view, also the rule name which is detected as NOK is displayed.\
There is also a counter in table view to display how many product processed and how many product detected as NOK. In this example, there is 12 run which means 12 products triggered and processed and there is 1 product which is not valid for all recipe rules.\
RESET BUTTON : Counter can be reset when reset button clicked. RELOAD RECIPE BUTTON : If there is any update on recipe, recipe can be reloaded with clicking this button so no need to restart application.
Before to start run created recipe, users may need to test recipes. In Test Window, created recipes can be tested with given image files. User only needs to select an image folder which contains multiple images for each camera object in recipe. After loading images, images can be checked with clicking on image path which listed on the left side in a table view. If all images loaded properly, recipe can be run for each images with clicking RUN TEST button. After run completed, all input images replaced with result images so these image can be checked with clicking on it. Result image layout is same with in View Window, each rule indicated in a bordered view in main image.\
⚠️
Loaded images resolutions has to be same with camera resolution which defined in recipe. Loaded image resolutions can be checked bottom-left corner of the window.
If multiple cameras used for recipe, loaded image folders has to be separate for each camera and image counts has to be same in order to run model for each image pair successfully.
As mentioned before; a recipe consists multiple recipe rules and the recipe rule basically is an image processing procedure. This procedure is a combination of image processing tasks. There is a two default recipe rule in Recipe Window, but user is responsible to create their own procedures based on their needs.
Recipe model is a file which created in AugeLab Studio. The layout of this model file displayed in following image:
There is 4 section in model file:
Recipe Loader Plugin: This plugin file reads recipe file and get all configurations (camera config, rule data, ...), and send these data to other components.
Check Trigger Subsystem: This component get trigger rule (frame, configs) as input, creates a trigger signal which means camera detected related object and image processing tasks can start to process.
MAIN Subsystem: This component consists all image processing procedures and runs all procedures based on given inputs (rule data, trigger signal).
Check Result Subsystem: MAIN subsystem returns many outputs (images, signals, ...) for each rule. This component process all input data and returns images (one image for each rule) and signals (one signal for each rule).
User should modify only MAIN subsystem.
MAIN subsystem internal layout displayed in following image:
There is 2 section in this MAIN subsystem:
Rule subsystems: These subsystems is the main logic part of the recipe rule. These subsystems needs to be modified by user based on their needs. Steps to add new rule:
Copy-paste existing rule
Connect inputs (rule data) and outputs (collect images and signals)
Update rule subsystem
Each rule block has two outputs: - Image: Contain result image of image processing procedure - Signal: Contain signal which represents NOK/OK status. Recipe Windows detects all rules and lists them as a table, so user can create recipe with using these rules. \
Collect Images & Collect Signals: This subsystem merges all images and signals from each rule subsystems.
SIMULATE USB CAMERAS
❗ These setting valid only for basic USB cameras.
In some cases, recipe needs to be updated even if required cameras not connected. In this case usb cameras can be simulated with
config/sim_usb_cams.json
file.Recipe specific cameras can be simulated with copy-paste camera_config data from related recipe json file into
config/sim_usb_cams.json
as following.Simulation can be disabled with deleting content (don't delete the file) of
config/sim_usb_cams.json
file.
Random image will be displayed in recipe window for selected camera. Image can be replaced with IMPORT IMAGE button.
❗ Imported image resolution should be same as camera resolution.
❗ Imported image can be seen only in EDITOR view (can be used to edit recipe rules). Random image will be used during running recipe scenario (VIEW window).
IP CAMERA
❗ These setting valid only for basic IP cameras.
If there is any connected IP cameras (basic IP camera, no external library), ip addresses needs to be added into
config/ip_cam_config.json
json format:
Ctrl key focus on recipe name input (not working when already focused on image widget etc.)
Alt key changes tab view
R or S keys starts/stops scenario on view window
F11 to toggle trigger override (working only VIEW window)
Shift + L to toggle visibility of log window