- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ipp8u* imgMatr, max_val;
imgMatr = ippiMalloc_8u_C1(64,64,&stepBytes );
p_img_src = (Ipp8u*)imgCurr8->imageData+rectSrc.x + start_x +
(rectSrc.y + start_y)*imgCurr8->width;
p_img_templ = (Ipp8u*)imgMatch8->imageData+rectMatch.x + rectMatch.y*imgMatch8->width;
IppStatus Corr_status = ippiCrossCorrValid_NormLevel_8u_C1RSfs(p_img_src,imgCurr8->width, srcRoiSize,
p_img_templ, imgMatch8->width,
tplRoiSize, (Ipp8u*)imgMatr, stepBytes, -8);
ippiMaxIndx_8u_C1R(imgMatr, stepBytes, SizeMat, &max_val, max_x, max_y);
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, of course, this code leads to zero matrix. As it is mentioned in ippiman, all correlation coefficients are obtained in 32f data type and 8u output means scaling of 32f coefficients to 8u data type range with appropriate scale factor. For the full 8u range (0-255)you should use scaleFactor = -8.
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Another note - IPP cross correlation is calculated after mean subtraction (see manual), so you'll get zeroes for constant images
Alexander
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page