Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

flightProgram()

qrProgram()

The qrProgram() function also uses decklinkSrcWorker_taxi to access a camera stream. Similar to showVideo(), decklinkSrcWorker_taxi provides frames from the camera, and these frames are passed into qr_worker() as its parameter pipelineIn.

QRWorker.py

QRWorker.py contains a function called qr_worker() that creates a QRScanner object. qr_worker() also uses opencv and the imshow() method to display the updated frame. In the QRScanner class, functions are defined that find a QR code in an image, decode the the QR code, and draw bounding boxes within the given frame. The QRScanner class also imports the pyzbar module that can read barcodes or QR codes and decodes them. The stacked procedures are shown below.

...

taxiProgram()

 showVideo()

main.py includes a function named showVideo(), and it displays a user’s default webcam. This function calls methods from videoDisplayWorker.py and decklinkSrcWorker_taxi.py. In decklinkSrcWorker_taxi.py, a DeckLinkSRC object is created, and continuously grabs frames from the device’s webcam. Since all parameters in python are pass by reference, the piplineOut parameter is constantly updated to a new frame using the put() function. In showVideo, both functions videoDisplay() and decklinkSrcWorker() are run in a list of parallel processes. Since both functions run in parallel and the pipelineOut variable is constantly updated, this variable can be passed into videoDisplay() as a parameter for every new frame taken from the decklink webcam. 

videoDisplayWorker.py

Video display in python uses OpenCV, which is a library of programming functions that allow various functionalities in real-time computer vision. This includes video and image processing, object detection, tracking, and many more. In the videoDisplayWorker.py file, the OpenCV library is imported and used to display the user’s default webcam.

...