SCD - Scorpion Camera Drivers Specification

Scorpion Vision Software is an open and independent machine vision system.

Scorpion has an open Camera Interface with the following properties:

  • Cameras are interfaced through an open c-dll interface - Scorpion Camera Interface.
  • Supports USB, Firewire, IP-camera and GigE using DirectShow
  • Any 2D Area, Linescan and 3D Camera can be easily integrated.
  • Scorpion Camera Drivers is as Scorpion design to be 100% backward compatible
    • this means that new drivers can be used with any versions of Scorpion.

The SCD-0028 SampleGrab is a complete sample driver provided to enable developers and Scorpion Users to develope and maintain their own Scorpion Camera Drivers.

The SCD-0028 SampleGrab source code is available in the form of a Visual Studio 2010 projects

Scorpion Vision handles multiple cameras in multiple of instances. The Scorpion Camera Drivers normally implements multiple threads to provide the highest possible performance.

Note

When the Scorpion project was started in 2000 the goal was to support all USB and Firewire cameras using the Microsoft DirectShow interface.

This lead to the development of the Scorpion Camera Driver:

Camera configuration persistance

Each camera maintains the configuration in text files, preferable text files as INI files or XML.

  • These configuration files should be located at the systemPath directory given by the initialize method.
  • The configuration is read in the camera open and written in the configureCamera function wherer the user manage the camera configuration.

In previous versions of Scorpion Camera Interface implementations, the configuration was stored with the camera name as configuration identifier.

New in Scorpion XI port-based configuration

From Scorpion Vision Software XI it is recommended to store configuration with grabberNo and portNo as identifier, in ini files this is [Port.<grabberno>.<portno>].

Note

grabberNo and portNo are zero indexed as in all function calls.

It is also recommended to add an entry identifying the camera name in the configuration.

  • This entry should have the identifier $Camera=<cameraname>.

As configuration identifier has changed to port based, the $Camera may be used to verify that the configuration may be used in case of camera model changes.

Special care must be taken when configuring camera before it is opened. In these cases the grabberno and portno will be unknown and configuration should not be saved or saved with camera name as identifier.

Example of Port-based ini file:

[Port.0.0]
$Camera=Basler acA1300-60gc (21536429)
PixelFormat=BayerRG8
ProcessedRawEnable=0
ReverseX=0
TestImageSelector=Off
Width=1280
Height=1024

Note

The main purpose for port based configuration is to be able to reuse the camera settings when changing a camera with an identical model or type.

Note that Scorpion cannot guarantee that the configuration is valid camera with a different parameter set is connected

Camera Properties Access

The camera properties should be accessed by either the get/setProperty functions.

  • The setProperty and getProperty functions works with int64 data types only.

Standard Camera Properties

The properties depends of camera model and accessing users responsibility to set due to camera model.

Property names should not be case sensitive.

Property Description
pixelsize Image depth, 8 for greyscale images, 24 or 32 for color images. 15/16 bit images are not supported. Scorpion defaults to 8 if not supported.
continous Generic SCD property for setting camera videostream continous/single shot.
exposure scorpion standard property for exposure and shutter in ms
hwtrigger enable = 1 / disables = 0 hwtrigger
verbose verbose=0 turns off console output
<property> camera model specific property.

Note

All camera properties are normally exposed through the Scorpion Camera Driver. The user can the dynamically change the camera from Scorpion using Python Scripting.

The properties are often used to provide register or low level camera access.

Continous Mode Image Capture

The continous mode has been defined for fast image aquisition.

The normal Scorpion Image Capture is synchrous by issuing a

  • Grab command
  • Waiting for Image Complete event
  • Process Image and the issue another Grab command

This is a simple and very good method, with one limitation

  • the time it takes to issue will limit the maximum framerate

The continous mode eliminates the need for the Grab command has the following feature set:

  • Set continous=1 tells the camera to grab images at “maximum” speed.
  • Scorpion is notified with ImageComplete without the need of a new grab command.
  • The driver may implement a image buffer of any size as needed. * Will possible handle the case that Scorpion does not read out the image in time * Drivers with image buffer hall implement reset / flush commands
  • Set continous=N will capture N images before leaving continous mode
  • Set continous=0 will stop continous image capture.

Note

Scorpion application handles continous=N independently of driver

Camera Commands - ExecuteCmd

The execCmd is used to send commands to the camera.

This is a text base command protocol for accessing camera and driver properties and commands.

Note

From Python the <cam>.executeCmd(‘set’,’framerate=1’)

Standard Commands - recommended to implement

Command Parameters Description
flush   flush any buffered images.
reset   reset camera and reload configuration, analogue with close-open
save   saves the system configuration
load   loads the system configuration
get property return property value as string
set property=value set property value. The driver should decode the value to proper datatype due to property.
get_raw property return property value as string
set_raw property=value set property value. The driver should decode the value to proper datatype due to property.

Note

The execCmd set / get property access is expected to replace the set/getProperty access to bypass the integer format limitation. get_raw / set_raw does not do propertyName translation - otherwise shall as set / get

Contents: