captureImage()

Description

Captures an image from the camera to a specified image viewer.

Syntax

DCSObject.camera.captureImage(string imageContainerId);

Parameters

<string> imageContainerId: The id of image container.

Return value

bool

true indicates success. false indicates failure.

Remarks

If the id of image viewer doesn't exist, you will get an error "The specified image viewer doesn't exist".

When image buffer is full, that is count equals capacity, the newly acquired image will not be imported into the image buffer.

Example

function CaptureImage() {
    if (DCSObject) {
      DCSObject.camera.selectCamera("Integrated Camera");
      DCSObject.camera.playVideo();
      DCSObject.camera.captureImage("******"); //Captures an image to a specified image viewer.
    }
}

See Also

.camera.selectCamera()
.camera.playVideo()