def main():
    usage = "usage: %prog [options] image_list_file \n"
    usage += " image match"
    parser = OptionParser(usage=usage)

    parser.add_option("-i", "--input_path", default="",
                      action="store", dest="ipath",
                      help="input path")

    parser.add_option("-o", "--output_path", default=".",
                      action="store", dest="opath",
                      help="output path")

    parser.add_option("-f", "--feature", default="color_histogram",
                      action="store", dest="feature",
                      help="color_histogram; sift_match;dist_info")

    parser.add_option("-m", "--method", default="Intersection",
                      action="store", dest="method",
                      help="Intersection;L1;L2")

    parser.add_option("-t", "--top", default="5",
                      action="store", dest="top",
                      help="Top nearest neighbors")

    parser.add_option("-c", "--cluster_count", default="3",
                      action="store", dest="cluster_count",
                      help="Number of clusters")

    parser.add_option("-d", "--debug", default="0",
                      action="store", dest="debug_mode",
                      help="debug intermediate results")

    (options, args) = parser.parse_args()

    if len(args) < 1 :
        print "Need one argument: image_list_file \n"
        sys.exit(1)

    image_files = [line.strip() for line in open(args[0])]

    if options.feature == "color_histogram":
        image_match_histogram( image_files, options )
dataset/ETHPy150Open memex-explorer/image_space/flann_index/image_match.py/main/original