Cv2.calcBackProject does not work for 3D histograms

When applied to 3D histograms to cv2.calcBackProject, the output is just blank (that is, it does not fail, but returns a blank screen with no projection). Does anyone know why and how to apply 3D back projection histograms in Python OpenCV?

....

dims = 3 # cv2.calcBackProject works if dims is set to a value less than 3 (i.e. not return blank)
channels = list(xrange(dims))
size = [4] * dims
ranges = [0, 255] * dims

hist = cv2.calcHist([roi], channels=channels, mask=None, histSize=size, ranges=ranges)
projection = cv2.calcBackProject([image], channels=channels, hist=hist, ranges=ranges, scale=1)

...

      

Thank!

+3
python opencv


source to share


No one has answered this question yet

Check out similar questions:

4
Improving the scrolling speed of a histogram
3
How do I use the edge orientation histogram to detect an object?
2
OpenCV Python error: error: (-215) (mtype == CV_8U || mtype == CV_8S) && _mask.sameSize (* psrc1) in cv :: binary_op function
2
Results are not expected
2
Back Projection using openCV for python
0
Comparison of logos
0
Draw some rectangles in the image
0
Python-Opencv, getting the area of ​​an image where the color is most dominant?
0
Generation and construction of histograms of gradient magnitude and orientation
0
What's the correct way to straighten a rotating rectangle? with opencv + python



All Articles
Loading...
X
Show
Funny
Dev
Pics