# -*- coding:utf-8 -*-
import sys

import cv2
from pyzbar.pyzbar import decode

ARGV = sys.argv


# Print usage.
def print_usage():
    print("")
    print("Usage: python {0} <QR code image file>".format(ARGV[0]))
    print("")


# Main routine.
def main(img_file):
    print("DEBUG imgFile[{0}]".format(img_file))

    # Load image
    img = cv2.imread(img_file)
    data = decode(img)

    return data[0][0].decode("utf-8", "ignore")


if __name__ == "__main__":

    if 2 != len(ARGV):
        print_usage()
    else:
        RESULT = main(ARGV[1])
        print("QR code RESULT[{0}]".format(RESULT))

e72c7fc43af34361fecbfffaab3baf3b5dddc4a9
<mask token>


def print_usage():
    print('')
    print('Usage: python {0} <QR code image file>'.format(ARGV[0]))
    print('')


def main(img_file):
    print('DEBUG imgFile[{0}]'.format(img_file))
    img = cv2.imread(img_file)
    data = decode(img)
    return data[0][0].decode('utf-8', 'ignore')


<mask token>

<mask token>


def print_usage():
    print('')
    print('Usage: python {0} <QR code image file>'.format(ARGV[0]))
    print('')


def main(img_file):
    print('DEBUG imgFile[{0}]'.format(img_file))
    img = cv2.imread(img_file)
    data = decode(img)
    return data[0][0].decode('utf-8', 'ignore')


if __name__ == '__main__':
    if 2 != len(ARGV):
        print_usage()
    else:
        RESULT = main(ARGV[1])
        print('QR code RESULT[{0}]'.format(RESULT))

<mask token>
ARGV = sys.argv


def print_usage():
    print('')
    print('Usage: python {0} <QR code image file>'.format(ARGV[0]))
    print('')


def main(img_file):
    print('DEBUG imgFile[{0}]'.format(img_file))
    img = cv2.imread(img_file)
    data = decode(img)
    return data[0][0].decode('utf-8', 'ignore')


if __name__ == '__main__':
    if 2 != len(ARGV):
        print_usage()
    else:
        RESULT = main(ARGV[1])
        print('QR code RESULT[{0}]'.format(RESULT))

import sys
import cv2
from pyzbar.pyzbar import decode
ARGV = sys.argv


def print_usage():
    print('')
    print('Usage: python {0} <QR code image file>'.format(ARGV[0]))
    print('')


def main(img_file):
    print('DEBUG imgFile[{0}]'.format(img_file))
    img = cv2.imread(img_file)
    data = decode(img)
    return data[0][0].decode('utf-8', 'ignore')


if __name__ == '__main__':
    if 2 != len(ARGV):
        print_usage()
    else:
        RESULT = main(ARGV[1])
        print('QR code RESULT[{0}]'.format(RESULT))

# -*- coding:utf-8 -*-
import sys

import cv2
from pyzbar.pyzbar import decode

ARGV = sys.argv


# Print usage.
def print_usage():
    print("")
    print("Usage: python {0} <QR code image file>".format(ARGV[0]))
    print("")


# Main routine.
def main(img_file):
    print("DEBUG imgFile[{0}]".format(img_file))

    # Load image
    img = cv2.imread(img_file)
    data = decode(img)

    return data[0][0].decode("utf-8", "ignore")


if __name__ == "__main__":

    if 2 != len(ARGV):
        print_usage()
    else:
        RESULT = main(ARGV[1])
        print("QR code RESULT[{0}]".format(RESULT))
