Example #1
0
def edge():
    edgeFeats = EdgeHistogramFeatureExtractor()
    a = np.array(edgeFeats.extract(watchman.imgbank[0])) 

    if len(watchman.imgbank) > 1:
        b = np.array(edgeFeats.extract(watchman.imgbank[1]))
    else:
        b = np.array(edgeFeats.extract(watchman.imgbank[0]))
        
    AandB = np.sum(np.square((a-b))) 
    return AandB
Example #2
0
def hue():
    hue = HueHistogramFeatureExtractor()
    a = np.array(hue.extract(watchman.imgbank[0])) 

    if len(watchman.imgbank) > 1:
        b = np.array(hue.extract(watchman.imgbank[1])) 
    else:
        b = np.array(hue.extract(watchman.imgbank[0]))

    AandB = np.sum(np.square(a-b)) 
    return AandB
Example #3
0
def edge():
    edgeFeats = EdgeHistogramFeatureExtractor()
    a = np.array(edgeFeats.extract(watchman.imgbank[0]))

    if len(watchman.imgbank) > 1:
        b = np.array(edgeFeats.extract(watchman.imgbank[1]))
    else:
        b = np.array(edgeFeats.extract(watchman.imgbank[0]))

    AandB = np.sum(np.square((a - b)))
    return AandB
Example #4
0
def hue():
    hue = HueHistogramFeatureExtractor()
    a = np.array(hue.extract(watchman.imgbank[0]))

    if len(watchman.imgbank) > 1:
        b = np.array(hue.extract(watchman.imgbank[1]))
    else:
        b = np.array(hue.extract(watchman.imgbank[0]))

    AandB = np.sum(np.square(a - b))
    return AandB
Example #5
0
def morph():
    mf = MorphologyFeatureExtractor() 
    mf.setThresholdOperation(myBinaryFunc)
    a = np.array(mf.extract(watchman.imgbank[0])) 

    if len(watchman.imgbank) > 1:
        b = np.array(mf.extract(watchman.imgbank[1])) 
    else:
        b = np.array(mf.extract(watchman.imgbank[0])) 

    AandB = np.sum(np.square(a-b)) 
    return AandB
Example #6
0
def morph():
    mf = MorphologyFeatureExtractor()
    mf.setThresholdOperation(myBinaryFunc)
    a = np.array(mf.extract(watchman.imgbank[0]))

    if len(watchman.imgbank) > 1:
        b = np.array(mf.extract(watchman.imgbank[1]))
    else:
        b = np.array(mf.extract(watchman.imgbank[0]))

    AandB = np.sum(np.square(a - b))
    return AandB