Versions Compared

Key

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

...

the IntegrationTests.py file works and is currently used to run a QR code. This file contains two tests: one using a PNG image of a QR code in the same folder, and another test using a QR code detected in the user’s webcam. Currently, the IntegrationTests.py file is tested using the video test function, and the other image test function call is commented out. IntegrationTests.py calls the video function that successfully opens the user’s webcam in a new window, scans only the first QR code detected, saves this message into a variable, and prints the message to the console once the window is closed (when user presses ‘q' on their keyboard). The image below shows the example QR code from CONOPS document and the output of the program in the Terminal when it is scanned and 'q’ is clicked on the keyboard. The user will know that the QR code has been successfully scanned when a red box is drawn around the QR code as shown in the first image above.

...

Note that the logic used to do this save the message was by returning two variables in the QR.py file draw_qr_codes() function. In the forever loop, as soon as if the text is not empty, the frame and QR text is returned , then and sent to the function in IntegrationTests.py. This function stores only the first given text only, and prints it when all windows are destroyed (loop is exited). Keep in mind that the if statement can be changed easily modified so that the program stores only either prints the first QR message detected, or so that the program stores prints the last (most recent) QR message detected.