Matlab binding for cv.calcHist [closed]
Hi,
The Python's sample in OpenCV-2.4.7\sources\samples\python2\color_histogram.py has warking code below
h = cv2.calcHist( [hsv], [0, 1], None, [180, 256], [0, 180, 0, 256] )
What is the corresponding syntax for Matlab mex binding?
I tried different syntax such as
image = imread('coloredChips.png');
cv.imshow('main', image)
h = cv.calcHist({image}, [0 1], [], [180, 256], [0 180 0 256]);
h = cv.calcHist( image , [0 1], [], [180, 256], [0 180 0 256]);
And for every calcHist call got the error
Error using calcHist cv::exception caught: ..\..\..\modules\imgproc\src\histogram.cpp:1421:
error: (-215) nimages > 0 && dims > 0 in function cv::calcHist
The error is reproduced under:
- OpenCV 3 latest sources from GitHub.
- Compiler=VS2010 or VS2012.
- Arch=x86 or x64
- Configuration=Release
- Matlab=R2013b
I keep getting similar errors when trying to use any of the MATLAB bindings for OpenCV. Hope someone provides a solution to this!