PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
264 stars 180 forks source link

Allow running ML and Apriltags on a single camera #1208

Open TheTripleV opened 7 months ago

TheTripleV commented 7 months ago

If a color camera is plugged in, I think both object detection and apriltag detection should be allowed to occur at the same time.

I know almost nothing of the PhotonVision internals so a couple approaches I think are possible:

1. Add a new AprilTagPlusObjectDetectionPipeline

Pros:

Cons:

2. Clone the video source using v4l2loopback

Pros:

Cons:

3. Make a copy of the cvSink Source

Pros:

Cons:

mcm001 commented 7 months ago

I think copying the cvSink and/or creating a new DuplicateOfAUSBCameraFrameProvider would be the lowest friction way to do this? I dont think ive ever heard of anyone using copySource in cscore before so you should mess with that. Any way you go though youll need a controller/subscriber model where one pipeline can control camera hardware settings and the other isn't allowed to