Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Problems with ROI

jimawary_lauril
Beginner
233 Views
Hello Vladimir!
When I filtered an image, is the outputimage has major size, hasn`t it?
Since it is = the size of the image + the size of the filter- 1.
For this reason I tried to make a region of interest, of the input image , in whichI was reducing some pixels, and this way have an output image of equal sizethat the input image.
Now the filter works well, it doesn`t crash during the execution, but the exit is not likeI was waiting, the output image remains distorted, works out cut away and stretched, though with total size like the previous one. This is the code that I am using:
/*****************************************************************************/

CVA_IPPDoc* pDst = CVA_IPPDoc::CreateNewDoc(pSrc, FALSE);

if (!pDst) return;

IppiPoint anchor;

anchor.x=1;

anchor.y=1;

IppiMaskSize mask;

mask=ippMskSize3x3;

IppStatus status;

if (!FitImage(pSrc)) return;

IppiSize roiSize;

roiSize.height=pSrc->Height()-anchor.x-1;

roiSize.width=pSrc->Width()-anchor.y-1;

pDst->m_height=roiSize.height;

pDst->m_width=roiSize.width;

Ipp8u* psrcaux;

psrcaux=(Ipp8u*)pSrc->DataPtr()+ anchor.x + anchor.y * pSrc->Step();

status= ippiFilterSobelCross_8u16s_C1R((Ipp8u*)psrcaux,pSrc->Step(),

(Ipp16s*)pDst->DataPtr(),pDst->Step(),roiSize, mask);

IppErrorMessage("ippiFilterSobelCross_8u16s_C1R", status);

/*****************************************************************************************/

I have read the manual volume 2 image and video processing, and all about the ROI, the neighborhood... But I`m triying very much thinks and it doesnt work well, and the errors that I`m having are always for this reason, I think.

Could you help me ?

Thanks in advance

"A smell of petroleum prevails throughout"

0 Kudos
0 Replies
Reply