scripts/scene_checker.py
def parseArgs(argv):
    '''
    Parses command-line options.
    '''

    # Parameters
    data_dir = ''
    img_dir = ''
    first = 0
    scenes = 1
    img_ext = '.png'

    usage = 'usage:   ' + argv[0] + ' [options]\n' + USAGE

    try:
        opts, args = getopt.getopt(argv[1:],
            "hi:d:s:n:e:",["img_dir=","data_dir=","scenes=","first=","img_ext"])
    except getopt.GetoptError:
        print (usage)
        sys.exit(2)

    for opt, arg in opts:
        if opt == '-h':
            print (usage)
            sys.exit()
        elif opt in ("-i", "--img_dir"):
            img_dir = arg
        elif opt in ("-d", "--data_dir"):
            data_dir = arg
        elif opt in ("-s", "--scenes"):
            scenes = int(arg)
        elif opt in ("-n", "--first"):
            first = int(arg)
        elif opt in ("-e", "--img_ext"):
            img_ext = arg
    
    if not data_dir or not img_dir:
        print (usage)
        sys.exit(2)

    print ('Image directory      ', img_dir)
    print ('Dataset directory    ', data_dir)
    print ('Number of scenes     ', scenes)
    print ('Index of first scene ', first)
    print ('Image file extension ', img_ext)

    return [data_dir, img_dir, scenes, first, img_ext]

    Parses command-line options.
    
Parses command-line options.
Parses command - line options .
def parseArgs(argv):
    data_dir = ''
    img_dir = ''
    first = 0
    scenes = 1
    img_ext = '.png'
    usage = 'usage:   ' + argv[0] + ' [options]\n' + USAGE
    try:
        opts, args = getopt.getopt(argv[1:],
            "hi:d:s:n:e:",["img_dir=","data_dir=","scenes=","first=","img_ext"])
    except getopt.GetoptError:
        print (usage)
        sys.exit(2)
    for opt, arg in opts:
        if opt == '-h':
            print (usage)
            sys.exit()
        elif opt in ("-i", "--img_dir"):
            img_dir = arg
        elif opt in ("-d", "--data_dir"):
            data_dir = arg
        elif opt in ("-s", "--scenes"):
            scenes = int(arg)
        elif opt in ("-n", "--first"):
            first = int(arg)
        elif opt in ("-e", "--img_ext"):
            img_ext = arg
    if not data_dir or not img_dir:
        print (usage)
        sys.exit(2)
    print ('Image directory      ', img_dir)
    print ('Dataset directory    ', data_dir)
    print ('Number of scenes     ', scenes)
    print ('Index of first scene ', first)
    print ('Image file extension ', img_ext)
    return [data_dir, img_dir, scenes, first, img_ext]
def parseArgs ( argv ) : data_dir = '' img_dir = '' first = 0 scenes = 1 img_ext = '.png' usage = 'usage:   ' + argv [ 0 ] + ' [options]\n' + USAGE try : opts , args = getopt . getopt ( argv [ 1 : ] , "hi:d:s:n:e:" , [ "img_dir=" , "data_dir=" , "scenes=" , "first=" , "img_ext" ] ) except getopt . GetoptError : print ( usage ) sys . exit ( 2 ) for opt , arg in opts : if opt == '-h' : print ( usage ) sys . exit ( ) elif opt in ( "-i" , "--img_dir" ) : img_dir = arg elif opt in ( "-d" , "--data_dir" ) : data_dir = arg elif opt in ( "-s" , "--scenes" ) : scenes = int ( arg ) elif opt in ( "-n" , "--first" ) : first = int ( arg ) elif opt in ( "-e" , "--img_ext" ) : img_ext = arg if not data_dir or not img_dir : print ( usage ) sys . exit ( 2 ) print ( 'Image directory      ' , img_dir ) print ( 'Dataset directory    ' , data_dir ) print ( 'Number of scenes     ' , scenes ) print ( 'Index of first scene ' , first ) print ( 'Image file extension ' , img_ext ) return [ data_dir , img_dir , scenes , first , img_ext ]
Parses command-line options.
Parses command - line options .
'''
    Parses command-line options.
    ''' # Parameters
argv