diff --git a/src/add_qr.py b/src/add_qr.py index 03d87c14832b33fbfffb841f6a6c7f89d3943090..fa46e44ed92246de0e25d8c9d442169c608704f6 100755 --- a/src/add_qr.py +++ b/src/add_qr.py @@ -27,6 +27,7 @@ parser.add_option ("", "--compressed", action="store_true", dest="compressed", h parser.add_option ("", "--decode", action="store_true", dest="decode", help="If true test the decoding.") #parser.add_option ("", "--fifo", action="store", type="string", dest="fifo", help="Fifo to write raw images to", default="/tmp/fifo_dji21") parser.add_option ("", "--test", action="store_true", dest="test", help="Test mode.") +parser.add_option ("", "--scale", action="store_true", dest="scale", help="Test mode.") parser.add_option ("", "--qr-transform", action="store_true", dest="qr_transform", help="Time encoding qr code.") parser.add_option ("", "--qr-header", action="store_true", dest="qr_header", help="Time encoding qr code.") parser.add_option ("", "--qr-time", action="store_true", dest="qr_time", help="Time encoding qr code.") @@ -118,7 +119,10 @@ def image_callback(data): jobj = transform_to_json(transform) # print("DUMPS:", json.dumps(jobj)) - scaledimg = cv2.resize(img, (1024, 600)) + if options.scale: + scaledimg = cv2.resize(img, (1024, 600)) + else: + scaledimg = img if options.qr_transform or options.qr_header or options.qr_time: # print("SCALEDIMG:", scaledimg.shape, scaledimg.dtype)