Documentation ¶
Overview ¶
Package videosource defines various image sources typically registered as cameras in the API.
Index ¶
- Constants
- Variables
- func Discover(_ context.Context, getDrivers func() []driver.Driver, logger golog.Logger) (*pb.Webcams, error)
- func NewServerSource(ctx context.Context, cfg *ServerConfig, logger golog.Logger) (camera.VideoSource, error)
- func NewWebcam(ctx context.Context, deps resource.Dependencies, conf resource.Config, ...) (camera.Camera, error)
- type CameraConfig
- type Config
- type MergeMethodType
- type MergeMethodUnsupportedError
- type ServerConfig
- type StaticSource
- type WebcamConfig
Constants ¶
const ( // Null is a default value for the merge method. Null = MergeMethodType("") // Naive is the naive merge method. Naive = MergeMethodType("naive") // ICP is the ICP merge method. ICP = MergeMethodType("icp") )
Variables ¶
var ModelWebcam = resource.DefaultModelFamily.WithModel("webcam")
ModelWebcam is the name of the webcam component.
Functions ¶
func Discover ¶
func Discover(_ context.Context, getDrivers func() []driver.Driver, logger golog.Logger) (*pb.Webcams, error)
Discover webcam attributes.
func NewServerSource ¶
func NewServerSource(ctx context.Context, cfg *ServerConfig, logger golog.Logger) (camera.VideoSource, error)
NewServerSource creates the VideoSource that streams color/depth data from an external server at a given URL.
Types ¶
type CameraConfig ¶
CameraConfig is collection of configuration options for a camera.
type Config ¶ added in v0.2.47
type Config struct { TargetFrame string `json:"target_frame"` SourceCameras []string `json:"source_cameras"` // Closeness defines how close 2 points should be together to be considered the same point when merged. Closeness float64 `json:"proximity_threshold_mm,omitempty"` MergeMethod string `json:"merge_method,omitempty"` CameraParameters *transform.PinholeCameraIntrinsics `json:"intrinsic_parameters,omitempty"` DistortionParameters *transform.BrownConrady `json:"distortion_parameters,omitempty"` Debug bool `json:"debug,omitempty"` }
Config is the attribute struct for joinPointCloudSource.
type MergeMethodType ¶
type MergeMethodType string
MergeMethodType Defines which strategy is used for merging.
type MergeMethodUnsupportedError ¶
type MergeMethodUnsupportedError error
MergeMethodUnsupportedError is returned when the merge method is not supported.
type ServerConfig ¶ added in v0.2.36
type ServerConfig struct { resource.TriviallyValidateConfig CameraParameters *transform.PinholeCameraIntrinsics `json:"intrinsic_parameters,omitempty"` DistortionParameters *transform.BrownConrady `json:"distortion_parameters,omitempty"` Stream string `json:"stream"` Debug bool `json:"debug,omitempty"` URL string `json:"url"` }
ServerConfig is the attribute struct for serverSource.
type StaticSource ¶
StaticSource is a fixed, stored image. Used primarily for testing.
func (*StaticSource) Close ¶
func (ss *StaticSource) Close(ctx context.Context) error
Close does nothing.
func (*StaticSource) NextPointCloud ¶
func (ss *StaticSource) NextPointCloud(ctx context.Context) (pointcloud.PointCloud, error)
NextPointCloud returns the point cloud from projecting the rgb and depth image using the intrinsic parameters.
type WebcamConfig ¶ added in v0.2.36
type WebcamConfig struct { resource.TriviallyValidateConfig CameraParameters *transform.PinholeCameraIntrinsics `json:"intrinsic_parameters,omitempty"` DistortionParameters *transform.BrownConrady `json:"distortion_parameters,omitempty"` Debug bool `json:"debug,omitempty"` Format string `json:"format,omitempty"` Path string `json:"video_path,omitempty"` Width int `json:"width_px,omitempty"` Height int `json:"height_px,omitempty"` FrameRate float32 `json:"frame_rate,omitempty"` }
WebcamConfig is the attribute struct for webcams.