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

How to use some IPP functions about image processing?

qujiang
Beginner
315 Views

Llately, I am researching some image-processing functions in IPP. But I encountered some problems forthefunctions as followed: ippiCrossCorrFull_Norm_8u_C3RSfs, ippiDistanceTransform_3x3_8u_C1R, ippiWarpPerspective_8u_C3R, ippiCanny_32f8u_C1R, ippiDFTFwd_RToPack_32f_C3R.

Who can help me? Give me someexamples aboutthis functions.

My email is: whu200232580137@yahoo.com.cn

0 Kudos
3 Replies
Vladimir_Dudnik
Employee
315 Views

Hello,

your question is quite clear. I would recommend you to take a look on IPP samples package. For example, you may take a look on MPEG4 codec in audio-video-codecs sample or image-processing sample to see how to use ippiWarp functions.

Regards,
Vladimir

0 Kudos
qujiang
Beginner
315 Views

Hello,Vladimir! I know there are some examples about this functions. But I didn't explain clearly. I want to use this functions with OpenCV, so I need to use data structure of OpenCV. For example:

void dft()
{
const int M=3;
IppiSize msz={M,M};

IplImage* img=cvLoadImage("c101001.jpg",1);
IplImage* med1=cvCreateImage(cvGetSize(img),8,3);
CvMat *mat = cvCreateMat(img->width,img->height,CV_32FC1);
CvMat *dst = cvCreateMat(img->width,img->height,CV_32FC1);

IppiSize size = {img->width-M+1,img->height-M+1};
double isz=1./(img->width*img->height);

int wstep = (img->width) * sizeof(IplImage);
Ipp8u* pBuffer = ippiMalloc_8u_C1(img->width, img->height,&wstep);
ippiDFTFwd_RToPack_32f_C3R(&CV_IMAGE_ELEM(img,float,M/2,M/2*3), img->widthStep,&CV_IMAGE_ELEM(med1,float,M/2,M/2*3), med1->widthStep, pDFTSpec, pBuffer);
ippsFree(pBuffer);
}

There is something wrong in the function:ippiDFTFwd_RToPack_32f_C3R.

Could you do me a favor?

0 Kudos
Vladimir_Dudnik
Employee
315 Views

I'm sure there is nothing wrong in ippiDFTFwd_RToPack_32f_C3R function. You just need to refer to IPP documentation for this function to see how you need to call that, what is the parameters and what is the range of values are expected by this function.

Regards,
Vladimir

0 Kudos
Reply