- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
int
_tmain(int argc, _TCHAR* argv[]){
IppiSize srcRoiSize, tplRoiSize, SizeMat;
Ipp8u* p_img_src, *p_img_templ,*imgMatr;
srcRoiSize.height = 64;
srcRoiSize.width = 64;
tplRoiSize.height = 32;
tplRoiSize.width = 32;
SizeMat.height = 33;
SizeMat.width = 33;
int StepByteSrc,StepByteTempl,stepBytes;
int max_x,max_y;
Ipp8u max_val;
p_img_src = ippiMalloc_8u_C1(64, 64,&StepByteSrc );
p_img_templ = ippiMalloc_8u_C1(32, 32,&StepByteTempl );
imgMatr = ippiMalloc_8u_C1(33, 33,&stepBytes );
memset((void*)p_img_src,0x80,64*64);
memset((void*)p_img_templ,0x80,32*32);
// memset((void*)imgMatr,0,stepBytes*33);
IppStatus Corr_status =
ippiCrossCorrValid_NormLevel_8u_C1RSfs(p_img_src,StepByteSrc, srcRoiSize,
p_img_templ,StepByteTempl ,tplRoiSize, imgMatr, stepBytes, 0);
ippiMaxIndx_8u_C1R(imgMatr, stepBytes, SizeMat, &max_val, &max_x, &max_y);
ippiFree(imgMatr);
return 0;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It does not work with -8 eigther.
It always give matrix of zeros unless bytes of template and image contain more than one value ie 0 and 1.
If all bytes of template or image are equall the matrix is all zero.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page