for (int i = 0; i < 4; i++)
{
+ CV_DbgAssert(q);
ChessBoardQuad *neighbor = q->neighbors[i];
switch(i) // adjust col, row for this quad
{ // start at top left, go clockwise
for (int i = 0; i < quad_count; ++i)
{
ChessBoardQuad *q = quad_group[i];
+ CV_DbgAssert(q);
for (int j = 0; j < 4; ++j)
{
if (q->neighbors[j] == q0)
stack.pop();
for (int k = 0; k < 4; k++ )
{
+ CV_DbgAssert(q);
ChessBoardQuad *neighbor = q->neighbors[k];
if (neighbor && neighbor->count > 0 && neighbor->group_idx < 0 )
{
int k = 0;
for (; k < 4; k++ )
{
+ CV_DbgAssert(q);
if (!q->neighbors[k])
{
if (normL2Sqr<float>(closest_corner.pt - q->corners[k]->pt) < min_dist)
return;
Mat corners = _corners.getMat();
const Point2f* corners_data = corners.ptr<Point2f>(0);
+ CV_DbgAssert(corners_data);
int nelems = corners.checkVector(2, CV_32F, true);
CV_Assert(nelems >= 0);
int i, count;
double a[9], ar[9]={1,0,0,0,1,0,0,0,1}, R[9];
- double MM[9], U[9], V[9], W[3];
+ double MM[9] = { 0 }, U[9] = { 0 }, V[9] = { 0 }, W[3] = { 0 };
cv::Scalar Mc;
- double param[6];
+ double param[6] = { 0 };
CvMat matA = cvMat( 3, 3, CV_64F, a );
CvMat _Ar = cvMat( 3, 3, CV_64F, ar );
CvMat matR = cvMat( 3, 3, CV_64F, R );
CvMat matH = cvMat( 3, 3, CV_64F, H );
CvMat _f = cvMat( 2, 1, CV_64F, f );
- assert( CV_MAT_TYPE(npoints->type) == CV_32SC1 &&
- CV_IS_MAT_CONT(npoints->type) );
+ CV_Assert(npoints);
+ CV_Assert(CV_MAT_TYPE(npoints->type) == CV_32SC1);
+ CV_Assert(CV_IS_MAT_CONT(npoints->type));
nimages = npoints->rows + npoints->cols - 1;
if( (CV_MAT_TYPE(objectPoints->type) != CV_32FC3 &&
// extract vanishing points in order to obtain initial value for the focal length
for( i = 0, pos = 0; i < nimages; i++, pos += ni )
{
+ CV_DbgAssert(npoints->data.i);
+ CV_DbgAssert(matA && matA->data.db);
+ CV_DbgAssert(_b && _b->data.db);
double* Ap = matA->data.db + i*4;
double* bp = _b->data.db + i*2;
ni = npoints->data.i[i];
cvGetCols( imagePoints, &_m, pos, pos + ni );
cvFindHomography( &matM, &_m, &matH );
+ CV_DbgAssert(_allH && _allH->data.db);
memcpy( _allH->data.db + i*9, H, sizeof(H) );
H[0] -= H[6]*a[2]; H[1] -= H[7]*a[2]; H[2] -= H[8]*a[2];
double y1_ = 0, y2_ = 0, y1y1_ = 0, y1y2_ = 0;
size_t n = imgpt1.size();
+ CV_DbgAssert(n > 0);
for( size_t i = 0; i < n; i++ )
{
std::vector<size_t> dims = ieInpNode->get_shape();
CV_Assert(dims.size() == 4 || dims.size() == 5);
std::shared_ptr<ngraph::Node> ieWeights = nodes.size() > 1 ? nodes[1].dynamicCast<InfEngineNgraphNode>()->node : nullptr;
+ if (nodes.size() > 1)
+ CV_Assert(ieWeights); // dynamic_cast should not fail
const int inpCn = dims[1];
const int inpGroupCn = nodes.size() > 1 ? ieWeights->get_shape()[1] : blobs[0].size[1];
const int group = inpCn / inpGroupCn;
ParallelConv()
: input_(0), weights_(0), output_(0), ngroups_(0), nstripes_(0),
biasvec_(0), reluslope_(0), activ_(0), is1x1_(false), useAVX(false), useAVX2(false), useAVX512(false)
+ , blk_size_cn(0)
{}
static void run( const Mat& input, Mat& output, const Mat& weights,
UMat& top_data);
private:
OCL4DNNInnerProductConfig config_;
- int32_t axis_;
+ //int32_t axis_;
int32_t num_output_;
int32_t M_;
int32_t N_;
DistanceType worst_distance_;
public:
- KNNResultSet(int capacity_) : capacity(capacity_), count(0)
+ KNNResultSet(int capacity_)
+ : indices(NULL), dists(NULL), capacity(capacity_), count(0), worst_distance_(0)
{
}
void addPoint(DistanceType dist, int index) CV_OVERRIDE
{
+ CV_DbgAssert(indices);
+ CV_DbgAssert(dists);
if (dist >= worst_distance_) return;
int i;
for (i = count; i > 0; --i) {
* Constructor.
*/
StartStopTimer()
+ : startTime(0)
{
reset();
}
CvRect cvGetWindowRect_W32(const char* name)
{
+ RECT rect = { 0 };
CvRect result = cvRect(-1, -1, -1, -1);
CV_FUNCNAME( "cvGetWindowRect_W32" );
if (!window)
EXIT; // keep silence here
- RECT rect;
GetClientRect(window->hwnd, &rect);
{
POINT pt = {rect.left, rect.top};
if (window->status==CV_WINDOW_NORMAL && prop_value==CV_WINDOW_FULLSCREEN)
{
//save dimension
- RECT rect;
+ RECT rect = { 0 };
GetWindowRect(window->frame, &rect);
CvRect RectCV = cvRect(rect.left, rect.top,rect.right - rect.left, rect.bottom - rect.top);
icvSaveWindowPos(window->name,RectCV );
static RECT icvCalcWindowRect( CvWindow* window )
{
const int gutter = 1;
- RECT crect, trect, rect;
+ RECT crect = { 0 }, trect = { 0 } , rect = { 0 };
assert(window);
static void icvUpdateWindowPos( CvWindow* window )
{
- RECT rect;
+ RECT rect = { 0 };
assert(window);
if( (window->flags & CV_WINDOW_AUTOSIZE) && window->image )
// toolbar may resize too
for(i = 0; i < (window->toolbar.toolbar ? 2 : 1); i++)
{
- RECT rmw, rw = icvCalcWindowRect(window );
+ RECT rmw = { 0 }, rw = icvCalcWindowRect(window );
MoveWindow(window->hwnd, rw.left, rw.top,
rw.right - rw.left, rw.bottom - rw.top, FALSE);
GetClientRect(window->hwnd, &rw);
int i;
CvWindow* window;
- RECT rmw, rw, rect;
+ RECT rmw = { 0 }, rw = { 0 }, rect = { 0 };
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
__BEGIN__;
CvWindow* window;
- RECT rect;
+ RECT rect = { 0 };
if( !name )
CV_ERROR( CV_StsNullPtr, "NULL name" );
if( !(window->flags & CV_WINDOW_AUTOSIZE) )
{
MINMAXINFO* minmax = (MINMAXINFO*)lParam;
- RECT rect;
+ RECT rect = { 0 };
LRESULT retval = DefWindowProc(hwnd, uMsg, wParam, lParam);
minmax->ptMinTrackSize.y = 100;
// Update the toolbar pos/size
if(window->toolbar.toolbar)
{
- RECT rect;
+ RECT rect = { 0 };
GetWindowRect(window->toolbar.toolbar, &rect);
MoveWindow(window->toolbar.toolbar, 0, 0, pos->cx, rect.bottom - rect.top, TRUE);
}
// Snap window to screen edges with multi-monitor support. // Adi Shavit
LPWINDOWPOS pos = (LPWINDOWPOS)lParam;
- RECT rect;
+ RECT rect = { 0 };
GetWindowRect(window->frame, &rect);
HMONITOR hMonitor;
pt.y = GET_Y_LPARAM( lParam );
::ScreenToClient(hwnd, &pt); // Convert screen coordinates to client coordinates.
- RECT rect;
+ RECT rect = { 0 };
GetClientRect( window->hwnd, &rect );
SIZE size = {0,0};
case WM_ERASEBKGND:
{
- RECT cr, tr, wrc;
+ RECT cr = { 0 }, tr = { 0 }, wrc = { 0 };
HRGN rgn, rgn1, rgn2;
int ret;
HDC hdc = (HDC)wParam;
window->on_mouse( event, pt.x, pt.y, flags, window->on_mouse_param );
} else {
// Full window is displayed using different size. Scale coordinates to match underlying positions.
- RECT rect;
+ RECT rect = { 0 };
SIZE size = {0, 0};
GetClientRect( window->hwnd, &rect );
}
else
{
- RECT rect;
+ RECT rect = { 0 };
GetClientRect(window->hwnd, &rect);
StretchBlt( hdc, 0, 0, rect.right - rect.left, rect.bottom - rect.top,
window->dc, 0, 0, size.cx, size.cy, SRCCOPY );
for( ; trackbar != 0; trackbar = trackbar->next )
{
- RECT rect;
+ RECT rect = { 0 };
SendMessage(window->toolbar.toolbar, TB_GETITEMRECT,
(WPARAM)trackbar->id, (LPARAM)&rect);
MoveWindow(trackbar->hwnd, rect.left + HG_BUDDY_WIDTH, rect.top,
{
TBBUTTON tbs = {};
TBBUTTONINFO tbis = {};
- RECT rect;
+ RECT rect = { 0 };
int bcount;
int len = (int)strlen( trackbar_name );
struct HaarStageClassifier
{
+ HaarStageClassifier() : threshold(0) {}
+
double threshold;
std::vector<HaarClassifier> weaks;
};