That commit introduces problems, as it breaks certain use cases of
OpenCV functions; for example, convertTo of an Nx1 matrix to an
std::vector.
Since vectors can't store separate width and height values, OpenCV
considers them to always be 1xN. So even though the vector is created with
.create(N, 1), the Mat passed to getContinousSize has dimensions 1xN,
and the size comparison fails, even though the operation itself is safe.
This is a use case we probably don't want to break, at the very least
for backwards compatibility. So I'm reverting the commit. This will also
unfix bug #3319; I'll submit a less intrusive solution as a PR to 2.4, which
will also revert 4f9c081 there.
To be used in the mouse callback like this:
if (CV_EVENT_MOUSEWHEEL == CV_GET_MOUSEWHEEL_EVENT(event))
{
int delta= CV_GET_WHEEL_DELTA(event);
// use delta...
}
Original error without the fix:
opencv/modules/objdetect/src/cascadedetect.cpp: In member function 'bool cv::CascadeClassifierImpl::ocl_detectSingleScale(const cv::_InputArray&, cv::Size, int, double, cv::Size)':
/opencv/modules/objdetect/src/cascadedetect.cpp:1215:
error: no matching function for call to 'cv::ocl::Kernel::args(cv::ocl::KernelArg, cv::ocl::KernelArg, cv::ocl::KernelArg, int, cv::ocl::KernelArg, cv::ocl::KernelArg, cv::ocl::KernelArg, cv::Size&, int&, float, cv::Rect&, cv::Size&, cv::CascadeClassifierImpl::<anonymous enum>)'