Vision service API | Service APIs

Vision service API

The vision service enables your machine to use its on-board cameras to intelligently see and interpret the world around it. While the camera component lets you access what your machine’s camera sees, the vision service allows you to interpret your image data.

The vision service API allows you to get detections, classifications, or point cloud objects, depending on the ML model the vision service is using.

The vision service supports the following kinds of operations:

Detections

2D Object Detection is the process of taking a 2D image from a camera and identifying and drawing a box around the distinct “objects” of interest in the scene. Any camera that can return 2D images can use 2D object detection.

You can use different types of detectors, both based on heuristics and machine learning, for any object you may need to identify.

The returned detections consist of the bounding box around the identified object, as well as its label and confidence score:

Supported API methods:

Classifications

2D Image Classification is the process of taking a 2D image from a camera and deciding which class label, out of many, best describes the given image. Any camera that can return 2D images can use 2D image classification.

The class labels used for classification vary and depend on the machine learning model and how it was trained.

The returned classifications consist of the image’s class label and confidence score.

Supported API methods:

Segmentations

3D Object Segmentation is the process of separating and returning a list of the identified “objects” from a 3D scene. The “objects” are usually a list of point clouds with associated metadata, like the label, the 3D bounding box, and center coordinates of the object.

3D object segmentation is useful for obstacle detection.

Any camera that can return 3D pointclouds can use 3D object segmentation.

Tip

3D segmentation operations require frame system configuration to properly relate camera coordinates to your machine’s spatial reference frames. This enables the vision service to provide meaningful 3D coordinates and spatial relationships.

Supported API methods:

The vision service supports the following methods:

Method Name Description
GetDetectionsFromCamera Get a list of detections from the next image from a specified camera using a configured detector.
GetDetections Get a list of detections from a given image using a configured detector.
GetClassificationsFromCamera Get a list of classifications from the next image from a specified camera using a configured classifier.
GetClassifications Get a list of classifications from a given image using a configured classifier.
GetObjectPointClouds Get a list of 3D point cloud objects and associated metadata in the latest picture from a 3D camera (using a specified segmenter).
CaptureAllFromCamera Get the next image, detections, classifications, and objects all together, given a camera name.
Reconfigure Reconfigure this resource.
DoCommand Execute model-specific commands that are not otherwise defined by the service API.
GetResourceName Get the ResourceName for this instance of the vision service.
GetProperties Fetch information about which vision methods a given vision service supports.
Close Safely shut down the resource and prevent further use.

API

GetDetectionsFromCamera

Get a list of detections from the next image from a specified camera using a configured detector.

Parameters:

Returns:

Raises:

Example:


For more information, see the Python SDK Docs.

GetDetections

Get a list of detections from a given image using a configured detector.

Parameters:

Returns:

Raises:

Example:


For more information, see the Python SDK Docs.

GetClassificationsFromCamera

Get a list of classifications from the next image from a specified camera using a configured classifier.

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

GetClassifications

Get a list of classifications from a given image using a configured classifier.

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

GetObjectPointClouds

Get a list of 3D point cloud objects and associated metadata in the latest picture from a 3D camera (using a specified segmenter).

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

CaptureAllFromCamera

Get the next image, detections, classifications, and objects all together, given a camera name. Used for visualization.

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

Reconfigure

Reconfigure this resource. Reconfigure must reconfigure the resource atomically and in place.

Parameters:

Returns:

For more information, see the Go SDK Docs.

DoCommand

Execute model-specific commands that are not otherwise defined by the service API. Most models do not implement DoCommand. Any available model-specific commands should be covered in the model’s documentation. If you are implementing your own vision service and want to add features that have no corresponding built-in API method, you can implement them with DoCommand.

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

GetResourceName

Get the ResourceName for this instance of the vision service.

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

GetProperties

Fetch information about which vision methods a given vision service supports.

Parameters:

Returns:

Example:


For more information, see the Python SDK Docs.

Close

Safely shut down the resource and prevent further use.

Parameters:

Returns:

Example: