Versions Compared

Key

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

...

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 after the QRScanner object is created. 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 allows the program to read barcodes or QR codes and decodes decode them. The stacked procedures are shown below.

...

...

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.

...