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
- Variables
- func Named(name string) resource.Name
- func NewRPCServiceServer(coll resource.APIResourceCollection[Service]) interface{}
- type Service
- func FromDependencies(deps resource.Dependencies, name string) (Service, error)
- func FromRobot(r robot.Robot, name string) (Service, error)
- func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, remoteName string, ...) (Service, error)
- func NewService(name resource.Name, r robot.Robot, c func(ctx context.Context) error, ...) (Service, error)
Constants ¶
const SubtypeName = "vision"
SubtypeName is the name of the type of service.
Variables ¶
var API = resource.APINamespaceRDK.WithServiceType(SubtypeName)
API is a variable that identifies the vision service resource API.
Functions ¶
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 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
func NewService( name resource.Name, r robot.Robot, c func(ctx context.Context) error, cf classification.Classifier, df objectdetection.Detector, s3f segmentation.Segmenter, ) (Service, error)
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 obstaclespointcloud uses the 3D radius clustering algorithm as defined in the RDK vision/segmentation package as vision model.
|
Package obstaclespointcloud 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 |