# Path: basic/common.py
# ROOT_PATH = "/home/b/VisualSearch1"
# 
# def checkToSkip(filename, overwrite):
#     if os.path.exists(filename):
#         print ("%s exists." % filename),
#         if overwrite:
#             print ("overwrite")
#             return 0
#         else:
#             print ("skip")
#             return 1
#     return 0    
# 
# def makedirsforfile(filename):
#     try:
#         os.makedirs(os.path.split(filename)[0])
#     except:
#         pass
# 
# def printStatus(trace, message):
#     printMessage('INFO', trace, message)


import os, sys, array
import numpy as np
from basic.common import ROOT_PATH, checkToSkip, makedirsforfile, printStatus
from basic.util import readImageSet
    from optparse import OptionParser


INFO = os.path.basename(__file__)

def process(options, feature, srcCollections, newCollection):
    assert(type(srcCollections) == list)
    
    temp = []

# Path: basic/common.py
# ROOT_PATH = "/home/b/VisualSearch1"
# 
# def checkToSkip(filename, overwrite):
#     if os.path.exists(filename):
#         print ("%s exists." % filename),
#         if overwrite:
#             print ("overwrite")
#             return 0
#         else:
#             print ("skip")
#             return 1
#     return 0    
# 
# def makedirsforfile(filename):
#     try:
#         os.makedirs(os.path.split(filename)[0])
#     except:
#         pass
# 
# def printStatus(trace, message):
#     printMessage('INFO', trace, message)


# Path: simpleknn/merge_feat.py
import os, sys, array
import numpy as np
from basic.common import ROOT_PATH, checkToSkip, makedirsforfile, printStatus
from basic.util import readImageSet
    from optparse import OptionParser



INFO = os.path.basename(__file__)

def process(options, feature, srcCollections, newCollection):
    assert(type(srcCollections) == list)
    
    temp = []

    [x for x in srcCollections if x not in temp and temp.append(x)] # unique source collections