Skip to main content

Capture

The Capture object represents a captured image with associated information. It defines methods for managing properties, vision elements, and time-related data.

Constructors​

new Capture(image: Ve.Image, name: string): captureInstance;
new Capture(image: Ve.Image): captureInstance;

Methods​

setName()​

Sets the name of the capture.

setName(name: string): void;

getName()​

Returns the name of the capture.

getName(): string;

setImage()​

Sets the image of the capture.

setImage(image: Ve.Image): void;

getImage()​

Returns the image of the capture.

getImage(): Ve.Image;

addVisionElement()​

Adds a vision element to the capture.

addVisionElement(visionElement: Ve.VisionElement, label: string): void;
addVisionElement(visionElement: Ve.VisionElement): void;
addVisionElement(visionElement: Ve.VisionElement[], label: string): void;
addVisionElement(visionElement: Ve.VisionElement[]): void;

hasVisionElement()​

Checks if the capture has the provided vision element.

hasVisionElement(visionElement: Ve.VisionElement): boolean;

removeVisionElement()​

Removes the provided vision element from the capture.

removeVisionElement(visionElement: Ve.VisionElement): void;

hasLabel()​

Checks if the capture has the provided label in its dictionary.

hasLabel(label: string): boolean;

removeLabel()​

Removes the provided label from the capture's dictionary.

removeLabel(label: string): void;

getLabel()​

Returns the vision elements associated with the provided label.

getLabel(label: string): Ve.VisionElement[];

Time methods​

setAcquisitionTime()​

Sets the acquisition time for the capture.

setAcquisitionTime(time: number): void;

getAcquisitionTime()​

Returns the acquisition time of the capture.

getAcquisitionTime(): number;

setComputationTime()​

Sets the computation time for the capture.

setComputationTime(time: number): void;

getComputationTime()​

Returns the computation time of the capture.

getComputationTime(): number;

setLatency()​

Sets the latency time for the capture.

setLatency(time: number): void;

getLatency()​

Returns the latency time of the capture.

getLatency(): number;

setCycleTime()​

Sets the cycle time for the capture.

setCycleTime(time: number): void;

getCycleTime()​

Returns the cycle time of the capture.

getCycleTime(): number;

Properties methods​

setCaptureResult()​

Sets the result for the capture.

setCaptureResult(result: string): void;

setCaptureColor()​

Sets the color for the capture.

setCaptureColor(color: string): void;

addProperty()​

Sets a property to the capture.

addProperty(name: string, value: string): void;

hasProperty()​

Checks if the capture has a property with the given name.

hasProperty(name: string): boolean;

getProperty()​

Returns the value of the property with the given name.

getProperty(name: string): string;

removeProperty()​

Removes the property with the given name.

removeProperty(name: string): void;