if( cvDet(&_RR) < 0 )
cvScale( &_RRt, &_RRt, -1 );
sc = cvNorm(&_RR);
+ CV_Assert(fabs(sc) > DBL_EPSILON);
cvSVD( &_RR, &matW, &matU, &matV, CV_SVD_MODIFY_A + CV_SVD_U_T + CV_SVD_V_T );
cvGEMM( &matU, &matV, 1, 0, 0, &matR, CV_GEMM_A_T );
cvScale( &_tt, &_t, cvNorm(&matR)/sc );
Mat H = dst_T.inv()*Mat(H_, false)*src_T;
// enforce frobeniusnorm of one
- double scale = 1.0/cv::norm(H);
+ double scale = cv::norm(H);
+ CV_Assert(fabs(scale) > DBL_EPSILON);
+ scale = 1.0 / scale;
return H*scale;
}
void polyfit(const Mat& src_x, const Mat& src_y, Mat& dst, int order)
public:
#if CV_FP16_TYPE
- float16_t() {}
+ float16_t() : h(0) {}
explicit float16_t(float x) { h = (__fp16)x; }
operator float() const { return (float)h; }
static float16_t fromBits(ushort w)
__fp16 h;
#else
- float16_t() {}
+ float16_t() : w(0) {}
explicit float16_t(float x)
{
#if CV_AVX2
int poolingType;
float spatialScale;
- PoolingInvoker() : src(0), rois(0), dst(0), mask(0), avePoolPaddedArea(false), nstripes(0),
+ PoolingInvoker() : src(0), rois(0), dst(0), mask(0), pad_l(0), pad_t(0), pad_r(0), pad_b(0),
+ avePoolPaddedArea(false), nstripes(0),
computeMaxIdx(0), poolingType(MAX), spatialScale(0) {}
static void run(const Mat& src, const Mat& rois, Mat& dst, Mat& mask, Size kernel,
{
}
-PFMDecoder::PFMDecoder()
+PFMDecoder::PFMDecoder() : m_scale_factor(0), m_swap_byte_order(false)
{
m_strm.close();
}
tmp_prev->link = 0;
// First line. None of runs is binded
+ tmp.pt.x = 0;
tmp.pt.y = 0;
CV_WRITE_SEQ_ELEM( tmp, writer );
upper_line = (CvLinkedRunPoint*)CV_GET_WRITTEN_ELEM( writer );
CV_INSTRUMENT_REGION();
Mat img = _img.getMat();
+ CV_Assert(!img.empty());
CV_Assert( img.type() == CV_8U || img.type() == CV_8UC3 );
Size gradsize(img.cols + paddingTL.width + paddingBR.width,