//! filters off speckles (small regions of incorrectly computed disparity)
CV_EXPORTS_W void filterSpeckles( InputOutputArray img, double newVal, int maxSpeckleSize, double maxDiff,
- InputOutputArray buf=InputOutputArray() );
+ InputOutputArray buf=None() );
//! computes valid disparity ROI from the valid ROIs of the rectified images (that are returned by cv::stereoRectify())
CV_EXPORTS_W Rect getValidDisparityROI( Rect roi1, Rect roi2,
params_(detector_params), n_features_(n_features)
{
// fill the extractors and descriptors for the corresponding scales
- float factor = 1.0 / params_.scale_factor_ / params_.scale_factor_;
+ float factor = (float)(1.0 / params_.scale_factor_ / params_.scale_factor_);
int n_desired_features_per_scale = cvRound(n_features / ((std::pow(factor, int(params_.n_levels_)) - 1)
/ (factor - 1)));
n_features_per_level_.resize(detector_params.n_levels_);
template<int R>
struct YUV420i2BGR888Invoker
{
- Mat& dst;
+ Mat* dst;
const uchar* my1, *muv;
int width;
YUV420i2BGR888Invoker(Mat& _dst, int _width, const uchar* _y1, const uchar* _uv)
- : dst(_dst), my1(_y1), muv(_uv), width(_width) {}
+ : dst(&_dst), my1(_y1), muv(_uv), width(_width) {}
void operator()(const BlockedRange& range) const
{
for (int j = range.begin(); j < range.end(); j+=2, y1+=width*2, uv+=width)
{
- uchar* row1 = dst.ptr<uchar>(j);
- uchar* row2 = dst.ptr<uchar>(j+1);
+ uchar* row1 = dst->ptr<uchar>(j);
+ uchar* row2 = dst->ptr<uchar>(j+1);
const uchar* y2 = y1 + width;
for(int i = 0; i < width; i+=2,row1+=6,row2+=6)
template<int R>
struct YUV420i2BGRA8888Invoker
{
- Mat& dst;
+ Mat* dst;
const uchar* my1, *muv;
int width;
YUV420i2BGRA8888Invoker(Mat& _dst, int _width, const uchar* _y1, const uchar* _uv)
- : dst(_dst), my1(_y1), muv(_uv), width(_width) {}
+ : dst(&_dst), my1(_y1), muv(_uv), width(_width) {}
void operator()(const BlockedRange& range) const
{
for (int j = range.begin(); j < range.end(); j+=2, y1+=width*2, uv+=width)
{
- uchar* row1 = dst.ptr<uchar>(j);
- uchar* row2 = dst.ptr<uchar>(j+1);
+ uchar* row1 = dst->ptr<uchar>(j);
+ uchar* row2 = dst->ptr<uchar>(j+1);
const uchar* y2 = y1 + width;
for(int i = 0; i < width; i+=2,row1+=8,row2+=8)
break;
}
- Vec3f val = Vec3f(meanVal[0], meanVal[1], meanVal[2]) * (1.0 / totalWeight);
+ Vec3f val = Vec3f((float)meanVal[0], (float)meanVal[1], (float)meanVal[2]) * (float)(1.0 / totalWeight);
meanBackground.at<Vec3b>(row, col) = Vec3b(val);
firstGaussianIdx += nmixtures;
}
}
default:
- CV_Assert(false);
+ CV_Error(CV_StsUnsupportedFormat, "");
}
}