Basic Terms and Concepts
This topic explains some basic terms and fundamental concepts of the image acquisition using MERLIC.
The image acquisition using MERLIC consists of a sequence of tasks to grab and process images. The sequence can look different depending on factors like the hardware and work flow that is used for the specific case. Common components are a camera that takes images, a frame grabber that digitizes the images, a trigger device that starts the acquisition, a programmable logic controller (PLC) for hardware communication, and an image processing software like MERLIC.
Basic Terms for the Image Acquisition via ISM
In the following, we describe some basic terms with respect to the image acquisition via the Image Source Manager (ISM) of MERLIC.
Image Sources and Image Source Configurations
Image Source
An image source usually represents a specific source from which an image can be acquired. This could be a camera device or an image file directory. However, the Image Source Manager (ISM) of MERLIC also supports the use of peripheral devices such as lighting or lens controllers. This type of devices are also represented by image sources in ISM with the distinction that no images are acquired from peripheral devices.
Image sources are organized in image source configurations. This means, they are assigned to a specific configuration. To add an image source in a MERLIC Vision App (MVApp), the MERLIC tool Image Source is required. It allows to select an image source for the MVApp. When starting the MVApp, the Image Source Manager first acquires an image from the selected image source and then transfers the image to the MVApp for further processing.
Image Source Configuration
A configuration in the Image Source Manager represents a set of image sources. Each image source must be assigned to a specific configuration. If you want to add a new image source, you have to add it to an existing configuration or you can first add a new configuration and then add the image source. To use the images of an image source in an MVApp or to configure image sources, the corresponding configuration must be active. For more information, see the section Active and Inactive Configurations.
Using Multiple Image Sources per MVApp
It is possible to use images from multiple image sources in the same MVApp. If you want to acquire multiple images from the same image source and use these images in the same MVApp iteration, you have to use acquisition sequences which are currently only provided in a preliminary version. An acquisition sequence is part of an image source configuration and defines how the image sources of the respective configuration should be used for the image acquisition in MERLIC. It enables you to set up more complex configurations for the image acquisition including parameter changes, synchronization options, and delays. Please contact our MVTec support if you want to try out the current development status of the acquisition sequences. They will provide you with information on how to set up and use acquisition sequences in MERLIC.
Number of Image Source Configurations
It is possible to use only one configuration for all image sources. However, in some cases it might be more useful to separate the image sources in different configurations. If you have two camera devices that acquire images of the same object but from different perspectives, you could create a new configuration that will contain only these two camera devices. Also, if you want to provide an "offline" setup with image files instead of the camera devices for such an application, you could create an additional configuration that will contain two image directories.
Active and Inactive Configurations
A configuration can either be active or inactive. In the "Image Sources" tab of the MERLIC RTE Setup, this is shown a the "Status" property of a configuration. You have to activate a configuration for different reasons:
- You want to check or configure the image sources of the configuration.
- You want to use the image sources of the configuration in an MVApp.
If a configuration is active, you can access the image sources of the configuration in the "Image Sources" tab. In case of an image file directory, you can step trough the images one by one or continuously by using the live mode. If the configuration contains camera devices, all of them will be opened and connected as soon as the configuration is activated. You can select a camera device of the active configuration to display its camera parameters and start to adjust the parameter values. The live mode in the "Image Sources" tab allows you to instantly check the changes.
You also have to activate a configuration in order to provide the respective image sources for the setup of the image acquisition in an MVApp. When using the Image Source Manager for the image acquisition, you have to add the "Image Source" tool to your MVApp to transfer the images that have been acquired by the Image Source Manager into the MVApp. In the "Image Source" tool, only the image sources of the currently active configuration will be available, i.e., you can use an image source in an MVApp only if its configuration is active. When starting the process integration mode, i.e., MERLIC RTE, with a default recipe which references an MVApp with an "Image Source" tool, you have to ensure that the configuration is active that contains the selected image source of the MVApp.
You can set only one configuration to be active at the same time. Therefore, if you want to provide a specific set of image sources for the setup in an MVApp, you have to ensure to assign all these image sources to the same configuration and to activate this configuration.
Shared Configuration
A shared configuration can be used by any MVApp, i.e., the image sources of a shared configuration can be used in all MVApps, provided the configuration is active.
RTE Startup Configuration
One shared configuration can be chosen as the RTE startup configuration. This configuration is loaded and activated when starting the process integration mode of MERLIC, i.e., on the startup of MERLIC RTE. It is not mandatory to select a configuration as the RTE startup configuration. If no configuration is selected, MERLIC RTE will startup without any activated image source configuration. You can use the MERLIC RTE Setup to activate a configuration manually once MERLIC RTE is started or you can use MERLIC RTE without an active image source configuration to execute recipes that do not use the Image Source Manager for image acquisition. However, if you choose a default recipe for the process integration that references an MVApp containing an "Image Source", you must also choose an appropriate image source configuration as RTE startup configuration for a proper startup of MERLIC RTE.
MVApp-Specific Configuration
An MVApp-specific configuration is bound to an MVApp. The image sources of the MVApp-specific configuration can be used only by the associated MVApp. When an MVApp is loaded in the MERLIC Creator, MERLIC automatically looks for a configuration associated with that MVApp. The respective configuration will be automatically loaded and activated. Since only one MVApp-specific configuration can be active at a time in the same instance of MERLIC, the current MVApp-specific configuration is deactivated when you open another MVApp in the same instance. If no specific configuration exists for the newly loaded MVApp, the active configuration of the last session is loaded.
Currently, the type of a configuration cannot be changed in the "Image Sources" tab. Therefore, all new configurations are shared configurations by default. To get information how to change the type to an MVApp-specific configuration, see the section Changing the Configuration Type in the topic Adding New Configurations and Image Sources.
Image Formats
MERLIC is able to process various image formats but not all image formats can be used in all tools. For more information see the description of the respective tool.
Image File Formats
The following image formats are supported: .bmp, .gif, .hobj, .ima, .jp2, .jpeg, .jpg, .jxr, .pbm, .pcx, .pgm, .png, .pnm, .ppm, .ras, .tif, .tiff, .xwd.
Disparity Image
In a disparity image the value of each pixel is inversely related to the distance between the depicted point on an object and the camera.
Height Image / Depth Image
A height image contains height values represented by its pixels' gray values. You can convert disparity images to height images using the tool "Convert Disparity to Height Image".
Multi Layer Image / Multi Channel Image
There are numerous types of multi layer images with layers containing information about specific color channels, depth, brightness, and other values.
Image Size
Due to the underlying HALCON version, MERLIC supports the use of images with a maximum image size of 32768 x 32768 pixels.
Triggers
A trigger starts the whole image acquisition sequence or only specific components of the image acquisition, e.g., the tasks of the frame grabber. A trigger can be anything from a push on a button to a voltage change to a digital signal. For MERLIC, triggers are categorized according to their origin, i.e., software trigger and hardware trigger.
Beside cameras, there are also other hardware components that are able to receive trigger signals. Often, the trigger is sent to the internal or external frame grabber of a camera which in turn triggers the camera and/or waits for the next acquired image to digitize it and send it to the image processing software. But there are many possible configurations. To avoid loosing images or exposing images at the wrong time due to delays or wrong synchronization, the corresponding parameters of the camera and other hardware must be set correctly.
For the same reason it might be necessary to send the trigger signal to multiple devices and/or complement the trigger signal with other signals or commands, e.g., "StartSingleJob". MERLIC can manage the necessary configuration and communication.
Software Trigger
Software trigger signals can be initiated by the MERLIC Creator, MERLIC Frontend, MERLIC RTE, or a communication plug-in. Software triggers can be used in combination with a single execution or a continuous execution. For example if your MVApp contains a correctly configured camera, a click on the button "Run Once" will cause MERLIC to send a trigger to the camera.
Hardware Trigger
Hardware trigger signals are sent by a trigger device, e.g., a button or a photoelectric sensor, but MERLIC is also able to indirectly send a hardware trigger signal via a programmable logic controller (PLC) using the process integration mode, i.e., MERLIC RTE. To use hardware triggered camera devices for the image acquisition in MERLIC, you have to configure the camera device for the image acquisition via the Image Source Manager.
To ensure a proper synchronization, the hardware trigger signal must be sent right after the execution of MERLIC has been started and before the timeout duration is reached. With MERLIC RTE, the command "StartSingleJob" or "StartContinuous" can be used to start the execution. As soon as MERLIC then fired the "JobStarted" event, the configured image sources are ready to receive hardware trigger signals.
Free Running (without Trigger)
Some cameras can be configured to acquire images in a free running mode. In free running mode, the camera does not wait for a trigger signal but takes images as fast as possible. This might speed up the execution but you have to consider that the camera device might also be too fast with the image acquisition. If the camera acquires the images faster than the images can be processed, some images might get lost or the image that is currently processed might not be up-to-date. We recommend to use the camera in the software trigger mode to ensure that the image is always up-to-date.
Acquisition Sequences and Parameter Sets
Acquisition Sequence
An acquisition sequence defines how and when images are acquired from the image sources.
Primary Parameter Set
For each image source, a primary parameter set is created implicitly. It contains a specific configuration of the camera parameters. The configuration can be adjusted. However, a primary parameter set cannot be deleted.
Alternative Parameter Set
For each image source, one or more additional parameter sets can be created. They can be used to save a different configuration of the camera parameters than defined in the primary set and can therefore be used as an alternative to the primary parameter set.
For each alternative parameter set, a managed sequence is automatically created unless a custom sequence of the same name already exists.
Base Sequence
A base sequence defines the default acquisition behavior where one image is acquired from each image source using their respective primary parameter sets. The base sequence is managed, that is, it is updated when image sources are added or removed.
Managed Acquisition Sequence
Like the base sequence, managed sequences acquire one image per image source but they do so using the corresponding alternative parameter set.
If the corresponding alternative parameter set does not exist for an image source, the primary parameter set will be used instead. Managed sequences are automatically created, removed, and updated as image sources or parameter sets are added or removed.
Custom Acquisition Sequence
A custom acquisition sequence is a user-defined acquisition sequence which affords full flexibility. Custom sequences are not automatically updated when image sources or parameter sets are added or removed. This means, they have to be updated manually.