Lines Matching refs:templ

59     CvMat tstub, *templ = (CvMat*)_templ;  in icvCrossCorr()  local
67 CV_CALL( templ = cvGetMat( templ, &tstub )); in icvCrossCorr()
76 if( !CV_ARE_DEPTHS_EQ( img, templ ) && CV_MAT_DEPTH( templ->type ) != CV_32F ) in icvCrossCorr()
85 if( (!CV_ARE_CNS_EQ( img, corr ) || CV_MAT_CN(templ->type) > 1) && in icvCrossCorr()
86 (CV_MAT_CN( corr->type ) > 1 || !CV_ARE_CNS_EQ( img, templ)) ) in icvCrossCorr()
93 templ_depth = CV_MAT_DEPTH(templ->type); in icvCrossCorr()
94 templ_cn = CV_MAT_CN(templ->type); in icvCrossCorr()
103 if( img->cols < templ->cols || img->rows < templ->rows ) in icvCrossCorr()
107 if( corr->rows > img->rows + templ->rows - 1 || in icvCrossCorr()
108 corr->cols > img->cols + templ->cols - 1 ) in icvCrossCorr()
112 blocksize.width = cvRound(templ->cols*block_scale); in icvCrossCorr()
113 blocksize.width = MAX( blocksize.width, min_block_size - templ->cols + 1 ); in icvCrossCorr()
115 blocksize.height = cvRound(templ->rows*block_scale); in icvCrossCorr()
116 blocksize.height = MAX( blocksize.height, min_block_size - templ->rows + 1 ); in icvCrossCorr()
119 dftsize.width = cvGetOptimalDFTSize(blocksize.width + templ->cols - 1); in icvCrossCorr()
122 dftsize.height = cvGetOptimalDFTSize(blocksize.height + templ->rows - 1); in icvCrossCorr()
127 blocksize.width = dftsize.width - templ->cols + 1; in icvCrossCorr()
129 blocksize.height = dftsize.height - templ->rows + 1; in icvCrossCorr()
140 buf_size = templ->cols*templ->rows*CV_ELEM_SIZE(templ_depth); in icvCrossCorr()
143 buf_size = MAX( buf_size, (blocksize.width + templ->cols - 1)* in icvCrossCorr()
144 (blocksize.height + templ->rows - 1)*CV_ELEM_SIZE(depth)); in icvCrossCorr()
162 src = templ; in icvCrossCorr()
163 dst = cvGetSubRect( dft_templ, &dstub, cvRect(0,yofs,templ->cols,templ->rows)); in icvCrossCorr()
168 cvInitMatHeader( &temp, templ->rows, templ->cols, templ_depth, buf[0] ); in icvCrossCorr()
169 cvSplit( templ, planes[0], planes[1], planes[2], planes[3] ); in icvCrossCorr()
177 if( dft_templ->cols > templ->cols ) in icvCrossCorr()
179 cvGetSubRect( dft_templ, dst, cvRect(templ->cols, yofs, in icvCrossCorr()
180 dft_templ->cols - templ->cols, templ->rows) ); in icvCrossCorr()
184 cvDFT( dst, dst, CV_DXT_FORWARD + CV_DXT_SCALE, templ->rows ); in icvCrossCorr()
211 isz.width = csz.width + templ->cols - 1; in icvCrossCorr()
212 isz.height = csz.height + templ->rows - 1; in icvCrossCorr()
318 const void* templ, int templstep, CvSize templsize,
337 CvMat tstub, *templ = (CvMat*)_templ; in cvMatchTemplate() local
354 CV_CALL( templ = cvGetMat( templ, &tstub, &coi2 )); in cvMatchTemplate()
362 if( !CV_ARE_TYPES_EQ( img, templ )) in cvMatchTemplate()
368 if( img->rows < templ->rows || img->cols < templ->cols ) in cvMatchTemplate()
371 CV_SWAP( img, templ, t ); in cvMatchTemplate()
374 if( result->rows != img->rows - templ->rows + 1 || in cvMatchTemplate()
375 result->cols != img->cols - templ->cols + 1 ) in cvMatchTemplate()
384 if( is_normed && cn == 1 && templ->rows > 8 && templ->cols > 8 && in cvMatchTemplate()
385 img->rows > templ->cols && img->cols > templ->cols ) in cvMatchTemplate()
398 CvSize img_size = cvGetMatSize(img), templ_size = cvGetMatSize(templ); in cvMatchTemplate()
401 img_size, templ->data.ptr, in cvMatchTemplate()
402 templ->step ? templ->step : CV_STUB_STEP, in cvMatchTemplate()
418 CV_CALL( icvCrossCorr( img, templ, result )); in cvMatchTemplate()
423 inv_area = 1./((double)templ->rows * templ->cols); in cvMatchTemplate()
430 CV_CALL( templ_mean = cvAvg( templ )); in cvMatchTemplate()
439 CV_CALL( cvAvgSdv( templ, &templ_mean, &_templ_sdv )); in cvMatchTemplate()
465 q1 = q0 + templ->cols*cn; in cvMatchTemplate()
466 q2 = (double*)(sqsum->data.ptr + templ->rows*sqsum->step); in cvMatchTemplate()
467 q3 = q2 + templ->cols*cn; in cvMatchTemplate()
471 p1 = p0 + templ->cols*cn; in cvMatchTemplate()
472 p2 = (double*)(sum->data.ptr + templ->rows*sum->step); in cvMatchTemplate()
473 p3 = p2 + templ->cols*cn; in cvMatchTemplate()