Computer Vision Python
main.py
main.py is the main program that includes functions that call functions from other files. Using file names in other module folders, main.py imports functions from those files, and those functions can now be called anywhere in main.py. Each function written in main.py takes care of a different task.
Â
callTrain() checks if the "targetAcquisition/yolov2_assets"
path exists, then imports its module. callTrain() does not call any imported functions.
flightProgram() sets a pipeline, uses video frame capture, merges frames with telemetry data, gets info for bounding boxes, feeds tent coordinates into the pipeline, and feeds those tent coordinates into the geolocation module. The geolocation module will then get GPS locations with latitude and longitude, and coordinates are sent to the command module. Overall, the flightProgram module uses a decklink video stream with telemetry data to create a list of bounding box coordinates, gets latitude and longitude coordinates from geolocation, and stores these GPS coordinates to the flight command module. This method calls imported functions decklinkSrcWorker(), pipelineMergeWorker(), targetAcquisitionWorker(), geolocation_locator_worker(), geolocation_output_worker, and flight_command_worker().
qrProgram() uses the webcam to detect and decode a QR code to return the string message that the QR contains. The qrProgram() function uses decklinkSrcWorker_taxi() to access a camera stream which provides frames from the camera, and these frames are then passed into qr_worker() as its parameter pipelineIn. qrProgram() calls imported methods decklinkSrcWorker_taxi() and qr_worker().
Â
init_logger() initializes the logger with formatted date and time. This method does not call any imported functions.
taxiProgram() → ignore for now
showVideo() displays a user’s default webcam. This function calls imported methods from videoDisplayWorker.py and decklinkSrcWorker_taxi.py.
Â