Image sources generate the input image data for image processing in ToolGroup-Items. Viper.NET image sources include not only the configuration of the data source, for example a camera, but also the accompanying processes of image acquisition. For example:

Image sources thus represent a parameter set for an image acquisition. Multiple sources can use the same physical hardware. For example, several image sources can use a camera with different exposure times. To prevent parameter sets of a camera from being changed by simultaneous access during image acquisition, a synchronization of image sources is performed. With reference-image-sources the same parameter set (or image source) can be used multiple times within a project.

All image sources have a name for identification by the user. Referencing within the project is done using a numeric ID. The ID must only be assigned for sources that are referenced. It must then be >0 and unique within the BV project. An ID -1 means that no ID has been assigned. The image source organization is done in image source lists. In addition, image sources have a synchronization key which is usually generated automatically on a hardware-specific basis and ensures that the same hardware is not parameterized simultaneously by multiple image sources.

Image feed

Image sources repeat the internal image acquisition process when errors occur until the maximum number of attempts Acquisition retry has been reached. Only then, if applicable, will the error from the last attempt be propagated out. Before each retry, the process pauses for the set duration Sleep between retry.

To start image acquisition, the system waits for exclusive image source access by means of a lock. If the waiting time exceeds the set TimeoutEnterSync, an image acquisition error is generated. After locking the image source, the image acquisition pauses again until exclusive access to the light channels of the associated light-situation is ensured by means of a lock. If the wait time exceeds the set TimeoutLockLight, an image capture error is generated. If the image source is not associated with any light situation, the step is skipped. After locking the source and light situation, image acquisition is performed from the corresponding source.

If the image source has a manipulation-toolgroup this will then be executed with the raw image. The output image of the manipulation-toolgroup> is then provided as the final image of the source. Without the *toolgroup, the output image is the same as the raw image.

Image Source Lists

The Image Source Organization is done on different hierarchy levels in image source lists.

Each line of the list shows an image source. Image sources that are in simulation mode are displayed with a yellow background. Faulty image sources, for example if the connection to the camera could not be established, are highlighted in red. Double-clicking on a line opens the Settings of the image source.


The columns show the following information:

  • Id: Displays an Active checkbox, an icon illustrating the type of image source, and the numeric ID (identification number) if one has been assigned. Marking an image source as inactive/active determines whether jobs trigger image acquisition as part of upstream image acquisition. The images of inactive sources are set to null before execution.

  • Name: User-defined name to identify the image source.

  • Exposure: Shows the exposure time of the sensor (if available).

  • Type: Describes the type of the image source and shows essential configuration data depending on the type.

  • Pass: Number of successful image acquisitions.

  • Retry: Number of image acquisitions that were repeated due to an error.

  • Fail: Number of failed image acquisitions. Only counted up if the Retry also fails.

  • Sync Key: Key name to ensure synchronization of accesses to the image source. See Synchronization of image sources.

  • Parent: Describes The image source list in which the source is defined. The description is given as a compound string in the form Type-DisplayName->*JobName*->*ToolgroupItemName*. Here the DisplayName of the BV type, in the screenshot BV, describes the global level. Job and ToolgroupItem names are omitted accordingly if the list is defined at a higher level: for example, for global sources as in the screenshot.


The order of the sources in the list of a ToolGroup Item is crucial for the allocation of stored input images in the RunFromDir.


If a ToolgroupItem does not acquire the image via the imageacquisition of job but via GImgSrcItfTool for example, the source should be marked as inactive to avoid unnecessary image acquisition.

Editing the list is done in the toolbar or via context-menu:

  1. Add: Adds a new image source to the list.

  2. Remove: Removes the selected image source.

  3. Settings: Opens the settings of the selected image source. The dialog can alternatively be opened by double-clicking on an image source.

  4. Up/Down: Moves the selected image source up/down in the list.

  5. Live: Opens a live-display for the selected image source.

  6. Reset Counter: Resets the image acquisition counters of all image sources to 0 (columns Pass, Retry, Fail).

  7. Manual sync key: Opens a dialog to manually enter a sync key of the selected image source.

  8. Refresh: Refreshes the list display

  9. Align image: Opens a dialog to align camera using a reference image. For example, this restores the original camera alignment after maintenance.

  10. Global/All: Selection whether all or only global image sources are shown in the list. The selection is only available in the global imagesources list.

Tips for power users

  • Shift+double click: The parameters ID, Name and Exposure can be edited directly in the list.

  • Drap&Drop image files: Image files can be dragged from Explorer directly onto the list. A File-based image source is then created for each image file.

  • Drag&Drop from other image source list: Creates a reference image source for each selected image source with an ID in the destination list.

  • Ctrl+Drag&Drop from other image source: Creates a copy of each selected image source in the destination list.

The context menu offers additional editing options compared to the toolbar:

  1. Open Live Window: Opens a Live-Display with active continuous image acquisition.

  2. Get One Image: Pulls in a single camera image and opens a live-display for display.

  3. Open Owning List: Opens the image source list that contains the selected source. This is relevant if all sources are displayed in the global list. The option is deactivated if necessary.

  4. Set Exposuretime - all selected: Sets the same new exposure time for all selected image sources.

  5. Reset ID - all selected: Resets the image source IDs of all selected sources to -1.

  6. Auto increment ID - all selected: Assigns new IDs to the selected image sources. The IDs are incremented sequentially from a starting number of

  7. Restart Simulation/BmpImagesources - all selected:

  8. Export all selected (*isdat): Exports all selected image sources to an isdat file. The storage location is freely selectable.

  9. Import (.*isdat): Loads image sources from an isdat file and adds them to the image source list.

  10. Copy: Copies the selected sources.

  11. Paste: Pastes previously copied image sources into the list.

Image Source Editor

The settings dialog of each image source is divided into two sections:

  1. General image source settings

  2. Special settings depending on the type of image source. The Standard image sources explain the meaning of the essential parameters. Detailed info can usually also be found in the manufacturer documentation of the hardware or the SDK.


The general settings include:

  1. Name: Freely selectable name of the image source

  2. ID: ID of the image source in the system: The assigned ID must be globally unique. If no ID is required, the default value -1 can be used. IDs are necessary for the definition of image source references, for example.

  3. Settings for manipulation-toolgroup and calibration key: The output image of the image source can be modified by a toolgroup.

  4. Setting a light-situation to be active during image acquisition.

  5. Setting command-lists: Before and after image acquisition, commands can be executed, for example to control liquid lenses or zoom lenses.

  6. Acquisition retry: Specifies the maximum number of times the image acquisition should be repeated in case of an error, cf image-acquisition.

  7. Sleep between retry: Wait time before retrying an image acquisition in case of error, cf. image-acquisition-of-job.

  8. TimeoutEnterSync: Maximum waiting time of the image source until successful lock of the source: If the waiting time is exceeded, the image-acquisition is aborted with an error.

  9. TimeoutLockLight: Maximum waiting time before the light channels of the light situation are locked. If the waiting time is exceeded, the image-acquisition is aborted with an error.

Light situation of the image source

An individual light situation can be set for each image source or a globally predefined light situation can be assigned. This light situation is activated during image acquisition.

  1. Select lighting situation: The choices are predefined Lumos lighting situations and the User-defined option. User-defined lighting situations are only defined locally for this one image source and are not available via the lighting control.

  2. Enable light situation: Activates or deactivates the light situation.

  3. List of predefined lighting situations: Open a dialog for editing selected lighting situations.

It is usually recommended to set the lighting situations in each image source locally user-defined: the image source then includes all parameters for a particular image acquisition. Reusability is then possible in the form of reference-image-sources. The definition of global light situations is only useful if several different image sources require the same light situation.


If a light situation is assigned to an image source, the superordinate toolgroup item must not receive a light situation.

Live display

For each image source, a live display can be opened via the image-source-lists. The display shows camera images of the respective image source, especially for Camera setup and error diagnostics. In live mode, images are continuously reacquired from the source and displayed.

  1. Toggle live mode: Enables/disables live mode with continuous feed of camera images.

  2. Get one image: Pulls in and displays a single camera image.

  3. Toggle crosshair: Fades in/out a crosshair

  4. Toogle statusbar: Enables/disables the display of the status bar below the image.

  5. Save image: Saves the camera image to a selectable file.

  6. Zoom in: increases the zoom level of the display

  7. Zoom out: reduces the zoom level of the display

  8. Toggle Pan-mode: Enables/disables the Pan mode of the cursor. In Pan mode, the image section can be shifted.

  9. Fit image:Passt die Zoomstufe so an, dass das Bild vollständig in der Ansicht sichtbar ist.

  10. Min aqu-time to stop live: Waiting time for image acquisition in live mode. If the image acquisition takes longer, the live mode is terminated.

  11. Align Live Displays: If multiple Live Displays are open, this button will arrange them all visibly next to each other and bring them to the foreground.

  12. Description: describes the image source of the display: image source ID, image source name and optionally short information about the source are displayed.

  13. Status Bar: Shows the current cursor coordinates in the selected coordinate space, the current zoom level and the gray value of the image at the cursor position.

Synchronization of image sources

A camera can be used by several image sources with different settings. During image acquisition, however, the camera may only be controlled by one image source. Therefore, internally in Viper.NET, access to the physical camera is automatically blocked via the synchronization key of the camera. If the image source cannot lock a key within a configurable waiting time because it is already locked by another source, an image acquisition error is generated.

Each image source generates an automatic unique sync key for the underlying interface, e.g. via manufacturer name and camera serial number. The sync key is displayed in the Image Source Lists. It can be overwritten by a manually defined key if required.

  1. Manual sync key: Opens the dialog for sync key assignment of an image source

  2. Auto: Display of the automatically generated synchronization key

  3. Manual: Editing the manual synchronization key

  4. Erase: Removes the manual synchronization key

  5. OK/Cancel: Closes the dialog and accepts or discards changes.


Manual synchronization keys can be used when multiple cameras share a common resource for data transmission and thus delay or block each other’s communication, e.g. when multiple cameras are connected to a single USB HUB or multiple GigE cameras need to be connected via a switch.


The definition of a manual synchronization key overwrites the automatic key. The user must then ensure that the same synchronization key is set in all image sources that use the same physical camera. It is therefore recommended to define a synchronization key only in global image sources and to use such sources in toolgroups in the form of reference image sources: the referenced synchronization keys will then always be used.