v25.5.6964

DCAM-SDK4 code samples


CPP
Sample Explanation
init_uninit
initialize and uninitialize DCAM-API
Initialize DCAM and display device information by using index. Enable directives to set OPTION and GUID.
open_show_modelinfo
open device and show device information
Open device and display device information using DCAM handle.
propertylist
show property list that the device supports
Display name and ID of all supported properties. Enable detectives to show the property details.
live_average
capture image and show average of image
Retrieve images and display the average of each image. Enable directives to change stop timing.
access_image
access image with several function
Capture and acceess image. Enable directive to change access method.
binning_subarray
set binning and subarray
Set the values of binning and subarray . Each value is defined by the directive.
software_trigger
get image with software trigger
Capture images using software trigger. Fire trigger using key-press.
framebundle
access images and meta data on setting framebundle
Access each image and meta data after setting the values of framebundle.
recording
record image to the harddisk automatically
Record images to the designated file. Enable directive to write meta data for file, session or frame. Support on Windows only.
copymetadata
get image and copy meta data block
Copy and display image meta data(time stamp and frame stamp).
attach_imagebuf
attach buffer to receive image data
Attach a buffer to receive the image data
attach_metadatabuf
attach buffer to receive meta data
Attach a buffer to receive the meta data(time stamp or frame stamp). Enable directive to change the buffer format.
splitview
set parameter and access image on spiltview
Set split view mode and retrieve split image. Not supported by all cameras.
setdata_lut
set look up table
Apply LUT to camera output. Not supported by all cameras;
setdata_region
set region for data reduction
Reduce output data by applying rectangle region or byte mask. Not supported by all cameras.
unpack_mono12
unpack mono12 data
Retrieve mono 12 packed data from DCAM. Unpack the data. Not supported by all cameras.
imageproc_option
process image on access image
Retrieve high contrast image from DCAM. Not supported by all cameras.
control_calibration
get and store calibration data
Control camera to make calibration data and store in memory. Not supported by all cameras.
devicebuffermode
set parameter related device buffer mode and access image
Set and get parameters related device buffer mode and access all images in the shortest time. Not supported by all cameras.
burst_copy
continuous copying to the user buffer
Copy each image data to local buffer while checking number of transferrd image.
control_MAICO
control MAICO
Set each property of MAICO and acquire an image.

MFC
Sample Explanation
ExCap4
Application inclueded in DCAM-API runtime. Only basic DCAM4.0 control is implemented.

C#
Sample Explanation
csAcq4
Display image using the basic functions of DCAM4.0.
csControl_MAICO
Set each property of MAICO and acquire an image using C#. It is a console Application.

VB.NET
Sample Explanation
vbAcq4
Display image using the basic functions of DCAM4.0.

Python
Sample Explanation
Source Folder
The linked directory contains the following sources.
dcam_show_device_list.py
show the list of detected device
dcam_show_properties.py
show the property list that the opened device supports.
dcam_show_single_captured_image.py
capture a single frame and show the image by OpenCV.
dcam_live_capturing.py
show live image with OpenCV until there is a fixed key input.
dcamcon_live_capturing.py
show live image with OpenCV by setting basic parameter at the prompt.
dcamcon_lightsheet.py
show live image of Light Sheet mode with OpenCV by setting the parameters related Light Sheet at the prompt.
dcamcon_framebundle.py
show live image bundled frame with OpenCV by setting the parameters related framebundle. One frame is minimum size.
dcamcon_masterpulse.py
show live image with OpenCV by setting the parameters related MASTERPULSE trigger mode.

CUDA
Sample code using CUDA. We made with CUDA Toolkit 10.2 and Visual Studio 2019.
Sample Explanation
cuda_live_attach
Retrieve images and display the average of each image with GPU. Enable directives to change GPU buffer type for use.

Go to top of this chapter