async2v.components.opencv.projector module¶
Summary¶
Classes:
ProjectorDriver2d |
Draw overlays into the real world with a projector |
ProjectorDriver2dConfiguration |
Configuration for the ProjectorDriver2d component |
ProjectorDriver2dConfigurator |
Configurator for the ProjectorDriver2d component |
Reference¶
-
class
ProjectorDriver2dConfiguration(debug=False)¶ Bases:
objectConfiguration for the
ProjectorDriver2dcomponent-
debug= False¶ Type: bool Emit debug frames during projector calibration
-
-
class
ProjectorDriver2dConfigurator¶ Bases:
async2v.cli.ConfiguratorConfigurator for the
ProjectorDriver2dcomponent-
static
config_from_args(args)¶ Get configuration from argparse output
-
static
-
class
ProjectorDriver2d(source, overlay, projector='projector', config=ProjectorDriver2dConfiguration(debug=False))¶ Bases:
async2v.components.base.EventDrivenComponent,async2v.components.base.ContainerMixinDraw overlays into the real world with a projector
This component automatically calibrates a projector that projects into the field of view of a camera. Overlays can then be drawn in coordinates of the camera image. Calibration is performed automatically on start. It can also be triggered later by sending an arbitrary event to the key stored in
RESET_CALIBRATION_TRIGGER.Parameters: - source (
str) – Key of the video stream input. Needs to provide events withFramepayload. - overlay (
str) – Key of the overlay input. Needs to provide events withFramepayload. - projector (
str) – Key of projector output.Frameevents are pushed to this output. - config (
ProjectorDriver2dConfiguration) – Can be generated viaProjectorDriver2dConfigurator
-
RESET_CALIBRATION_TRIGGER= 'async2v.projector.trigger.reset_calibration'¶ Event key for reset command input. Events on this key trigger a new projector calibration.
-
static
configurator()¶ Convenience method to create a matching configurator
Return type: ProjectorDriver2dConfigurator
- source (