def back_projection_demo():
    sample = cv.imread('C:/1/image/small.jpg')
    target = cv.imread('C:/1/image/big.jpg')
    roi_hsv = cv.cvtColor(sample, cv.COLOR_BGR2HSV)
    target_hsv = cv.cvtColor(target, cv.COLOR_BGR2HSV)
    cv.imshow('sample', sample)
    cv.imshow('target', target)
    roiHist = cv.calcHist([roi_hsv], [0, 1], None, [32, 32], [0, 180, 0, 256])
    cv.normalize(roiHist, roiHist, 0, 256, cv.NORM_MINMAX)
    dest = cv.calcBackProject([target_hsv], [0, 1], roiHist, [0, 180, 0, 256], 1)
    cv.imshow('back_projection_demo', dest)
def back_projection_demo():
    sample = cv.imread('C:/1/image/small.jpg')
    target = cv.imread('C:/1/image/big.jpg')
    roi_hsv = cv.cvtColor(sample, cv.COLOR_BGR2HSV)
    target_hsv = cv.cvtColor(target, cv.COLOR_BGR2HSV)
    cv.imshow('sample', sample)
    cv.imshow('target', target)
    roiHist = cv.calcHist([roi_hsv], [0, 1], None, [32, 32], [0, 180, 0, 256])
    cv.normalize(roiHist, roiHist, 0, 256, cv.NORM_MINMAX)
    dest = cv.calcBackProject([target_hsv], [0, 1], roiHist, [0, 180, 0, 256], 1)
    cv.imshow('back_projection_demo', dest)