cv::reduce does not support int as src type

asked 2013-07-31 04:09:26 -0600

berak gravatar image

updated 2013-07-31 04:53:17 -0600

i just found, that CV_32S is not supported as input type for cv::reduce().

is there any valid reason for that ? anything else is supported.

( yes, i've seen this )


cv::Mat src = cv::Mat::eye(4,4, CV_32S);
std::vector<int> dst;
cv::reduce(src , dst , 0 , REDUCE_SUM );

OpenCV Error: Unsupported format or combination of formats (Unsupported combinat ion of input and output array formats) in unknown function, file ......\module s\core\src\matrix.cpp, line 2435

there is just no case for it in matrix.cpp, 2253 and below

edit retag flag offensive close merge delete

Comments

Do you get a basic assert error for that?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-31 04:44:59 -0600 )edit

yes, edited question

berak gravatar imageberak ( 2013-07-31 04:53:52 -0600 )edit

@berak: Double-checked it, and yes, it seems like a bug, maybe you can make a pull request for this. Btw: maybe it changed in the version you use, but for me it was CV_REDUCE_SUM...

Guanta gravatar imageGuanta ( 2013-07-31 15:43:13 -0600 )edit

As far as I know, all constants have the CV part removed in master branch.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-31 16:27:21 -0600 )edit

ah, yes, sorry for the confusion about the constants.

my journey into this started with looking at issue 3146 , sounded like a pretty low hanging fruit for a bugfix, then i discovered, that the ints were missing and got puzzled.

berak gravatar imageberak ( 2013-08-01 02:57:37 -0600 )edit