Documentation ¶
Overview ¶
Package videosource defines various image sources typically registered as cameras in the API.
Index ¶
- Constants
- func Discover(ctx context.Context, getDrivers func() []driver.Driver) (*pb.Webcams, error)
- func NewServerSource(ctx context.Context, cfg *ServerAttrs, logger golog.Logger) (camera.Camera, error)
- func NewWebcamSource(ctx context.Context, attrs *WebcamAttrs, logger golog.Logger) (camera.Camera, error)
- type CameraConfig
- type JoinAttrs
- type MergeMethodType
- type MergeMethodUnsupportedError
- type ServerAttrs
- type StaticSource
- type WebcamAttrs
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 ¶
This section is empty.
Functions ¶
func NewServerSource ¶
func NewServerSource(ctx context.Context, cfg *ServerAttrs, logger golog.Logger) (camera.Camera, error)
NewServerSource creates the VideoSource that streams color/depth data from an external server at a given URL.
func NewWebcamSource ¶
func NewWebcamSource(ctx context.Context, attrs *WebcamAttrs, logger golog.Logger) (camera.Camera, error)
NewWebcamSource returns a new source based on a webcam discovered from the given attributes.
Types ¶
type CameraConfig ¶
CameraConfig is collection of configuration options for a camera.
type JoinAttrs ¶
type JoinAttrs struct { CameraParameters *transform.PinholeCameraIntrinsics `json:"intrinsic_parameters,omitempty"` DistortionParameters *transform.BrownConrady `json:"distortion_parameters,omitempty"` Stream string `json:"stream"` Debug bool `json:"debug,omitempty"` TargetFrame string `json:"target_frame"` SourceCameras []string `json:"source_cameras"` MergeMethod string `json:"merge_method"` // Closeness defines how close 2 points should be together to be considered the same point when merged. Closeness float64 `json:"closeness_mm"` }
JoinAttrs 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 ServerAttrs ¶
type ServerAttrs struct { 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"` }
ServerAttrs 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 WebcamAttrs ¶
type WebcamAttrs struct { CameraParameters *transform.PinholeCameraIntrinsics `json:"intrinsic_parameters,omitempty"` DistortionParameters *transform.BrownConrady `json:"distortion_parameters,omitempty"` Stream string `json:"stream"` Debug bool `json:"debug,omitempty"` Format string `json:"format"` Path string `json:"video_path"` PathPattern string `json:"video_path_pattern"` Width int `json:"width_px"` Height int `json:"height_px"` }
WebcamAttrs is the attribute struct for webcams.