vision

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: AGPL-3.0 Imports: 22 Imported by: 21

Documentation

Overview

Package vision is the service that allows you to access various computer vision algorithms (like detection, segmentation, tracking, etc) that usually only require a camera or image input.

Index

Constants

View Source
const SubtypeName = "vision"

SubtypeName is the name of the type of service.

Variables

View Source
var API = resource.APINamespaceRDK.WithServiceType(SubtypeName)

API is a variable that identifies the vision service resource API.

Functions

func Named

func Named(name string) resource.Name

Named is a helper for getting the named vision's typed resource name.

func NewRPCServiceServer added in v0.2.36

func NewRPCServiceServer(coll resource.APIResourceCollection[Service]) interface{}

NewRPCServiceServer constructs a vision gRPC service server. It is intentionally untyped to prevent use outside of tests.

Types

type Service

type Service interface {
	resource.Resource
	DetectionsFromCamera(ctx context.Context, cameraName string, extra map[string]interface{}) ([]objectdetection.Detection, error)
	Detections(ctx context.Context, img image.Image, extra map[string]interface{}) ([]objectdetection.Detection, error)
	// classifier methods
	ClassificationsFromCamera(
		ctx context.Context,
		cameraName string,
		n int,
		extra map[string]interface{},
	) (classification.Classifications, error)
	Classifications(
		ctx context.Context,
		img image.Image,
		n int,
		extra map[string]interface{},
	) (classification.Classifications, error)
	// segmenter methods
	GetObjectPointClouds(ctx context.Context, cameraName string, extra map[string]interface{}) ([]*viz.Object, error)
}

A Service that implements various computer vision algorithms like detection and segmentation.

func FromDependencies added in v0.2.47

func FromDependencies(deps resource.Dependencies, name string) (Service, error)

FromDependencies is a helper for getting the named vision service from a collection of dependencies.

func FromRobot

func FromRobot(r robot.Robot, name string) (Service, error)

FromRobot is a helper for getting the named vision service from the given Robot.

func NewClientFromConn

func NewClientFromConn(
	ctx context.Context,
	conn rpc.ClientConn,
	remoteName string,
	name resource.Name,
	logger golog.Logger,
) (Service, error)

NewClientFromConn constructs a new Client from connection passed in.

func NewService added in v0.2.36

NewService wraps the vision model in the struct that fulfills the vision service interface.

Directories

Path Synopsis
Package colordetector uses a heuristic based on hue and connected components to create bounding boxes around objects of a specified color.
Package colordetector uses a heuristic based on hue and connected components to create bounding boxes around objects of a specified color.
Package detectionstosegments uses a 2D segmenter and a camera that can project its images to 3D to project the bounding boxes to 3D in order to created a segmented point cloud.
Package detectionstosegments uses a 2D segmenter and a camera that can project its images to 3D to project the bounding boxes to 3D in order to created a segmented point cloud.
Package mlvision uses an underlying model from the ML model service as a vision model, and wraps the ML model with the vision service methods.
Package mlvision uses an underlying model from the ML model service as a vision model, and wraps the ML model with the vision service methods.
Package obstacledistance uses an underlying camera to fulfill vision service methods, specifically GetObjectPointClouds, which performs several queries of NextPointCloud and returns a median point.
Package obstacledistance uses an underlying camera to fulfill vision service methods, specifically GetObjectPointClouds, which performs several queries of NextPointCloud and returns a median point.
Package radiusclustering uses the 3D radius clustering algorithm as defined in the RDK vision/segmentation package as vision model.
Package radiusclustering uses the 3D radius clustering algorithm as defined in the RDK vision/segmentation package as vision model.
Package register registers all relevant vision models and also API specific functions
Package register registers all relevant vision models and also API specific functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL