# importing the needed bindings from descriptor import DescribeTexture from descriptor import DescribeColor from descriptor import ColorTree from ranker import Ranker import shutil import argparse import copy import cv2 import os # instantiating the classes for color, texture and tree description cdes = DescribeColor((16, 32, 1)) txdes = DescribeTexture() tdes = ColorTree([6]) # building the argument parser and parse the command line arguments argprse = argparse.ArgumentParser() argprse.add_argument("-d", "--dataset", required = True, help = "FilePath to the folder that has target images to be indexed") argprse.add_argument("-c", "--hsv", required = True, help = "File Path where the computed hsv index is saved") argprse.add_argument("-t", "--texture", required = True, help = "File Path where the computed texture index is saved") argprse.add_argument("-b", "--btree", required = True, help = "File Path where the computed tree index is saved") argprse.add_argument("-q", "--query", required = True, help = "File Path to the query image") argmnts = vars(argprse.parse_args()) # loading the query image and describing its color, texture and tree features
# importing the needed bindings from descriptor import DescribeColor from descriptor import DescribeTexture from descriptor import ColorTree import cv2 import argparse import glob # instantiating the classes for color, texture and tree description cdes = DescribeColor((16, 32, 1)) txdes = DescribeTexture() tdes = ColorTree([6]) # building the argument parser and parse the command line arguments argprse = argparse.ArgumentParser() argprse.add_argument( "-d", "--dataset", required=True, help="FilePath to the folder that has target images to be indexed") argprse.add_argument( "-c", "--hsv", required=True, help="FilePath where the computed hsv index is to be saved") argprse.add_argument( "-t", "--texture", required=True, help="FilePath where the computed texture index is to be saved") argprse.add_argument(
# importing the needed bindings from descriptor import DescribeTexture from descriptor import DescribeColor from descriptor import ColorTree from ranker import Ranker import shutil import argparse import copy import cv2 import os # instantiating the classes for color, texture and tree description cdes = DescribeColor((16, 32, 1)) txdes = DescribeTexture() tdes = ColorTree([6]) # building the argument parser and parse the command line arguments argprse = argparse.ArgumentParser() argprse.add_argument( "-d", "--dataset", required=True, help="FilePath to the folder that has target images to be indexed") argprse.add_argument("-c", "--hsv", required=True, help="File Path where the computed hsv index is saved") argprse.add_argument( "-t", "--texture", required=True,
# importing the needed bindings from descriptor import DescribeColor from descriptor import DescribeTexture from descriptor import ColorTree import cv2 import argparse import glob # instantiating the classes for color, texture and tree description cdes = DescribeColor((16, 32, 1)) txdes = DescribeTexture() tdes = ColorTree([6]) # building the argument parser and parse the command line arguments argprse = argparse.ArgumentParser() argprse.add_argument("-d", "--dataset", required = True, help = "FilePath to the folder that has target images to be indexed") argprse.add_argument("-c", "--hsv", required = True, help = "FilePath where the computed hsv index is to be saved") argprse.add_argument("-t", "--texture", required = True, help = "FilePath where the computed texture index is to be saved") argprse.add_argument("-b", "--btree", required = True, help = "FilePath where the computed tree index is to be saved") argmnts = vars(argprse.parse_args()) # opening the respective output index files in write mode clroutput = open(argmnts["hsv"], "w") treeoutput = open(argmnts["btree"], "w") texoutput = open(argmnts["texture"], "w") # using glob to capture the paths of the images and iterate through them