wrong check for UCHAR in Algorithm::set (Bug #3479)
Description
#include "opencv2/features2d/features2d.hpp"
SimpleBlobDetector sb;
sb.setInt("blobColor",3);
OpenCV Error: Bad argument (Argument error: the setter method was called for the
parameter 'blobColor' of the algorithm 'Feature2D.SimpleBlob', the parameter ha
s unsigned char type, so it should be set by integer, unsigned integer, uint64,
unsigned char, boolean, float or double value, but the setter was called with in
teger value) in cv::AlgorithmInfo::set, file ..\..\..\modules\core\src\algorithm
.cpp, line 634
looking at the relevant code, (opencv\modules\core\src\algorithm.cpp:631):
@
if( argType Param::INT || argType Param::BOOLEAN || argType Param::REAL
|| argType Param::FLOAT || argType Param::UNSIGNED_INT || argType Param::UINT64 || argType Param::UCHAR)
{
if ( !( p->type Param::INT || p->type Param::REAL || p->type Param::BOOLEAN
|| p->type Param::UNSIGNED_INT || p->type Param::UINT64 || p->type Param::FLOAT || argType Param::UCHAR) )
{
String message = getErrorMessageForWrongArgumentInSetter(algo->name(), parameter, p->type, argType);
CV_Error(CV_StsBadArg, message);
}
@
so, that clearly should be p->type instead of argType there at the end of
line 4.
(inline code formatting seems to be broken, btw)
Associated revisions
Merge pull request #3479 from mshabunin:doxygen-tutorials
History
Updated by Roman Donchenko about 11 years ago
This has just been fixed.
(inline code formatting seems to be broken, btw)
I don't think
so.
- Status changed from New to Done
- Target version set to 2.4.9
- Pull request set to https://github.com/Itseez/opencv/pull/2106
Updated by be rak about 11 years ago
Updated by be rak about 11 years ago
sorry did not see that. (pr closed)
since i'm unable to close the issue, would you be so kind ?
Updated by be rak about 11 years ago
will https://github.com/Itseez/opencv/pull/2106 get merged into master, too ?