Skip to content

Using from TVideoGrabber

Once the filter is installed (see Installation), the TVideoGrabber SDK sees the GenICam camera as one more video capture device: nothing specific to GenICam is needed in the application.

Selecting the camera

The device appears in the VideoDevices list under the name Datastead GenICam Vision Source (... 1, ... 2 when several entries are registered). Select it with VideoDevice, then start the preview or the recording as with any camera:

VideoGrabber1.VideoDevice := VideoGrabber1.FindIndexInListByName(
  VideoGrabber1.VideoDevices, 'Datastead GenICam Vision Source', false, true);
VideoGrabber1.StartPreview;

The pixel format and the frame size delivered to TVideoGrabber follow the settings of the filter (Image page): Mono8 arrives as Y800, BGR8 as RGB24, YCbCr422_8 as UYVY, and BayerRG8 as raw RGGB.

Configuring the camera

  • ShowDialog with dlg_VideoDevice opens the property pages of the filter (Device, Image, Exposure, Trigger, Features, About), see Using the capture device. The settings are persisted by the filter, so the dialog can be shown once at setup time.
  • The exposure, gain, white balance, gamma, hue, saturation, sharpness, brightness and contrast are also reachable through the standard TVideoGrabber video quality and camera control properties, since the filter implements IAMVideoProcAmp and IAMCameraControl.
  • The producer, device, pixel format, ROI and binning must be set before the preview or the recording starts; exposure, gain, frame rate and white balance can be changed while running.

Going further

Everything the property pages do is also available programmatically through IGenicamControl / IGenicamControl2, including generic access to any GenICam feature by name: see Programmatic control. The interface pointer is obtained with QueryInterface on the IBaseFilter of the capture filter, for example from the OnThirdPartyFilterConnected event when the filter is inserted as a third-party video source (tpf_ThirdPartyVideoSource, CLSID in the Interface reference).

License key

In the licensed version, the license key is passed once at startup, with LicenseString := 'DTSTDGEN:<license key>': TVideoGrabber forwards it to the capture filter each time the device is opened, before the preview or the recording starts. (DTSTDGEN: is the product prefix, like DTSTDRTSP: for the RTSP source filter or DTSTDNDI: for the NDI filters.)