Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

hooray, you found a bug !

the error is reproducable in c++ even:

#include "opencv2/features2d/features2d.hpp"

SimpleBlobDetector sb;
sb.setInt("blobColor",3);
// same err as in python above.

digging deeper, i found this(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.

hooray, you found a bug !

the error is reproducable in c++ even:

#include "opencv2/features2d/features2d.hpp"

SimpleBlobDetector sb;
sb.setInt("blobColor",3);
// same err as in python above.

digging deeper, i found this(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.

[update:] seems it was fixed a week ago.

hooray, you found a bug !

the error is reproducable in c++ even:

#include "opencv2/features2d/features2d.hpp"

SimpleBlobDetector sb;
sb.setInt("blobColor",3);
// same err as in python above.

digging deeper, i found this(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.

[update:] seems it was fixed a week ago.