Home | History | Annotate | Download | only in src

Lines Matching defs:templ

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