Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

Unexpected result with RGB Histogram Backprojection

$
0
0
I noticed that when I apply cv2.calcBackProject on the pixel [b,v,r], it returns the backprojection on the pixel [b,v,0], the third channel's value is ignored while my histogram looks fine. Here is my code : channels=[0,1,2] histSize = [8,8,8] ranges=[0,256, 0,256, 0,256] #image is in BGR color bgr_split = cv2.split(roi_img) #Compute image bgr histogram hist = cv2.calcHist(bgr_split, channels, mask, histSize, ranges) cv2.normalize(hist, hist, 0, 255, cv2.NORM_MINMAX) #Compute histogram backprojection dst = cv2.calcBackProject([img],channels,hist,ranges,1) Can someone confirm if it is a bug?

Viewing all articles
Browse latest Browse all 2088

Trending Articles