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 FindFirstName(r robot.Robot) string
- func Named(name string) resource.Name
- func NewServer(s subtype.Service) pb.VisionServiceServer
- func NewUnimplementedInterfaceError(actual interface{}) error
- func WrapWithReconfigurable(s interface{}) (resource.Reconfigurable, error)
- type Attributes
- type Service
- type VisModelConfig
- type VisModelType
Constants ¶
const SubtypeName = resource.SubtypeName("vision")
SubtypeName is the name of the type of service.
Variables ¶
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeService, SubtypeName, )
Subtype is a constant that identifies the vision service resource subtype.
Functions ¶
func FindFirstName ¶ added in v0.0.8
FindFirstName returns name of first vision service found.
func Named ¶
Named is a helper for getting the named vision's typed resource name. RSDK-347 Implements vision's Named.
func NewServer ¶
func NewServer(s subtype.Service) pb.VisionServiceServer
NewServer constructs a vision gRPC service server.
func NewUnimplementedInterfaceError ¶ added in v0.1.0
func NewUnimplementedInterfaceError(actual interface{}) error
NewUnimplementedInterfaceError is used when there is a failed interface check.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(s interface{}) (resource.Reconfigurable, error)
WrapWithReconfigurable wraps a vision service as a Reconfigurable.
Types ¶
type Attributes ¶
type Attributes struct {
ModelRegistry []VisModelConfig `json:"register_models"`
}
Attributes contains a list of the user-provided details necessary to register a new vision service.
type Service ¶
type Service interface { // model parameters GetModelParameterSchema(ctx context.Context, modelType VisModelType) (*jsonschema.Schema, error) // detector methods DetectorNames(ctx context.Context) ([]string, error) AddDetector(ctx context.Context, cfg VisModelConfig) error RemoveDetector(ctx context.Context, detectorName string) error DetectionsFromCamera(ctx context.Context, cameraName, detectorName string) ([]objdet.Detection, error) Detections(ctx context.Context, img image.Image, detectorName string) ([]objdet.Detection, error) // classifier methods ClassifierNames(ctx context.Context) ([]string, error) AddClassifier(ctx context.Context, cfg VisModelConfig) error RemoveClassifier(ctx context.Context, classifierName string) error ClassificationsFromCamera(ctx context.Context, cameraName, classifierName string, n int) (classification.Classifications, error) Classifications(ctx context.Context, img image.Image, classifierName string, n int) (classification.Classifications, error) // segmenter methods SegmenterNames(ctx context.Context) ([]string, error) AddSegmenter(ctx context.Context, cfg VisModelConfig) error RemoveSegmenter(ctx context.Context, segmenterName string) error GetObjectPointClouds(ctx context.Context, cameraName, segmenterName string) ([]*viz.Object, error) }
A Service that implements various computer vision algorithms like detection and segmentation.
func FirstFromRobot ¶ added in v0.0.8
FirstFromRobot returns the first vision service in this robot.
func NewClientFromConn ¶
func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) Service
NewClientFromConn constructs a new Client from connection passed in.
type VisModelConfig ¶ added in v0.0.9
type VisModelConfig struct { Name string `json:"name"` Type string `json:"type"` Parameters config.AttributeMap `json:"parameters"` }
VisModelConfig specifies the name of the detector, the type of detector, and the necessary parameters needed to build the detector.
type VisModelType ¶ added in v0.0.9
type VisModelType string
VisModelType defines what vision models are known by the vision service.
Directories ¶
Path | Synopsis |
---|---|
Package builtin 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.
|
Package builtin 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. |
Package register registers all relevant vision models and also subtype specific functions
|
Package register registers all relevant vision models and also subtype specific functions |