uvic-aero / onboard-computer

0 stars 1 forks source link

Implement capture method on Vision.py #39

Closed avesk closed 3 years ago

avesk commented 4 years ago

This feature depends on https://github.com/uvic-aero/onboard-computer/issues/38

Overview

Vision.py will capture images with the piCam in order to algorithmically determine a vector for the vehicle's trajectory.

Instructions:

The logic for image capturing will live within apps/Vision/Capture.py.

Write a class method called capture() which accepts a boolean value, use_picam, for whether to use PiCam or the default camera (your webcam).

The method should conditionally use cv2.VideoCapture(0) or PiCam.take_picture depending on the value of use_picam.

Testing

Try and test the opencv image capturing with your webcam.

Don't worry about testing PiCam.take_picture yet. If you're keen, you'll need to test your branch on a Raspberry Pi with a connected PiCam peripheral.