/
decklinksrc

decklinksrc

The purpose of the decklinksrc module is to “return” a constant stream of frames from the default webcam. By providing frames at a fast rate, a video interface can be developed and passed into other functions such as the QR Scanner or Video Display. In a forever loop, frames are repetitively grabbed from an OpenCV VideoCapture() and assigned to the variable in the function’s parameter.

 

The decklinkSrcWorker_taxi file contains the decklinkSrc_worker_taxi() method called by main.py that takes pipelineOut as a parameter. Python parameters are pass by reference, so whatever the pipelineOut variable is changed to in the function is also changed in the main program, main.py. In decklinkSrcWorker_taxi(), a DeckLinkSRC object is created and this object has functions that are defined in decklinksrc.py. Using this object, functions from decklinksrc.py are called in a forever loop to store and frames into a variable called curr_frame.

The decklinksrc.py file uses OpenCV to start a webcam video capture for the DeckLinkSRC object, and uses the grab() function to store the current webcam frame and return it to the curr_frame variable in decklinkSrcWorker_taxi. Finally, the parameter pipelineOut is set as the curr_frame. Note that decklinksrc is always used in parallel with other functions such as qr_worker or videoDisplayWorker. The pipelineOut parameter containing the current frame is constantly grabbed and updated to a new webcam frame at a high speed. This frame is then passed into the parameter of functions like qr_worker or videoDisplayWorker, and used to display the camera and call its corresponding functions.

 

Related content

videoDisplay
videoDisplay
More like this
QRScanner
QRScanner
More like this
Computer Vision Python
Computer Vision Python
More like this
Ongoing Todo list
Ongoing Todo list
Read with this
[OUTDATED] CV Master Architecture + Feature Planning
[OUTDATED] CV Master Architecture + Feature Planning
More like this
Ground-Side-Telemetry
Ground-Side-Telemetry
Read with this