Up | Grab | Inspect | GetImageProp | GetImagePropRange | SetImageProp | Image | Camera

  

Grab

Command for image capture with Scorpion. The Grab command arms the system for the specified camera / image. The image arrives with an event ImageNComplete. More information about Actions.

Syntax:

Grab;<imageNo=n>;<cameraNo=n>

Grab;Name=<imagename>;<cameraNo=n>

Grab;Filename=<name>;convert=<none|hsi|bw>

Parameter

Value

Description
ImageNo 1..n image index - if the parameter is omitted all images will be taken as fast as possible
Image image name image by name is an alternative to imageNo - avoids dependence to index in the image list
CameraNo 1..n grab from specified camera. NOTE! setting cameraNo changes camera for the image configuration.
Convert none/bw/hsi [none] conversion method if the image is a color image. HSI requires that Scorpion is setup with at least 3 images.
Filename <path>name [blank] if filename is given, the image is read from file instead of taken by the camera. 

Example 1: Two Images with different illumination

Individual image sequence where two images are captured, no backlight. The backlight is handled by an io-signal:

Status;0:OSigSBackLight=0
Grab;imageno=1
Status;0:OSigSBackLight=1
Delay;value=100
Grab;imageno=2

Example 2: Initiate remote Inspection over tcp/ip from another Windows Application

Two color images are generated by an external application. This task is to:

  • convert the first image to black and white,
  • the second to hsi  - 3  8 bit images images

The command sequence shown is sent in one message over TdvCmdProtocol. It can be set up as a command handler in Scorpion.

The message sent over TdvCmdProtocol from an external application:

Grab;imageno=1;convert=bw;filename=tank1.bmp; imageno=2;convert=hsi;filename=c:\images\tank2.bmp;Inspect;

Example 3: Grab all defined images

Grab

Note: This will start image aquisition in parallell for all cameras connected to the images. More information about grabbing sequence - look here.

Example 3: Grab images in a Sequence

The image sequence is asynchrous in scorpion this means that to define a camera grab sequence normally involves a number of scorpion events. A typical example is shown below:

  • GrabExecute
    • Grab;imageNo=1
  • OnImage1Complete
    • Grab;imageno=2
  • OnImage2Complete
    • <empty>
  • AfterGrab
    • InspectExecute
  • InspectExecute
    • Inspect

Note: With this approach the images will be capture one by one. Inspect will execute the toolbox on all captured images.

Example 4: Grab Images from a specific camera

Grab;cameraNo=1

Example 5: Grab Images from a specific camera defined by an data tool

Grab images from camera given by an ExternalData tool, SETUP:

Grab;cameraNo=%SETUP.CameraNo

Note: Using the CameraNo parameter changes the image configuration, the camera attached to an image. Only one camera can be attached to an Image at a time, sending multiple grab commands to different camera numbers will not work since images will be read from current attached camera as they arrives from the camera driver.

Parameters for Cognex Framegrabbers using CVLGrab and CVLGrab55.dll

Exposure 0..MaxInt [-1] exposure time in ms
Contrast 0..1 [-1]  
Brightness 0..1 [-1]  
 

Scorpion Vision Software Version: 9.2.0.515 - Date: 20120502
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2012 Tordivel AS.