checkRange fixes

1) fix multichannel support
2) remove useless bad_value, read value from original Mat directly
3) add more tests
4) fix docs for cvCeil and checkRange
This commit is contained in:
Alexander Alekhin
2015-12-09 17:45:59 +03:00
parent 8e67f0ba84
commit b26580cc7b
4 changed files with 112 additions and 50 deletions

View File

@@ -1509,7 +1509,7 @@ CV_EXPORTS_W void magnitude(InputArray x, InputArray y, OutputArray magnitude);
/** @brief Checks every element of an input array for invalid values.
The functions checkRange check that every array element is neither NaN nor infinite. When minVal \<
The functions checkRange check that every array element is neither NaN nor infinite. When minVal \>
-DBL_MAX and maxVal \< DBL_MAX, the functions also check that each value is between minVal and
maxVal. In case of multi-channel arrays, each channel is processed independently. If some values
are out of range, position of the first outlier is stored in pos (when pos != NULL). Then, the
@@ -2906,6 +2906,21 @@ public:
};
static inline
String& operator << (String& out, Ptr<Formatted> fmtd)
{
fmtd->reset();
for(const char* str = fmtd->next(); str; str = fmtd->next())
out += cv::String(str);
return out;
}
static inline
String& operator << (String& out, const Mat& mtx)
{
return out << Formatter::get()->format(mtx);
}
//////////////////////////////////////// Algorithm ////////////////////////////////////
class CV_EXPORTS Algorithm;