Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

IPP and OpenCV

oldnumber7
Beginner
117 Views
Hi, group,
I used OpenCV before and I just tried IPP. I didn't find any GUI functions in IPP such like 'cvShowImage' in
OpenCV to pop up a window to show the image. I'm wondering if we can use the OpenCV function 'cvShowImage' to show the image
that generated by ipp (pSrc in the following codes). Similar questions is how to convert Ipp* image to OpenCV IplImage? thanks.

Vol

#include "ipp.h"

int _tmain(int argc, _TCHAR* argv[])
{
IppiSize size = {320, 240};

int stride;
Ipp8u* pSrc = ippiMalloc_8u_C3(size.width, size.height, &stride);
ippiImageJaehne_8u_C3R(pSrc, stride, size);

return 0;
}
0 Kudos
1 Reply
Intel_C_Intel
Employee
117 Views

IPP is the low-level optimized library and so contains no GUI.But you could use base OpenCV libraries HighGUI and cxCore and call IPP functions directly as in

#include highgui.h

#include ipp.h

void main(void)

{

IplImage* img = cvLoadImage( test.jpg );

IplImage* img_r = cvCloneImage(img);

IppiSize sz = { img->width, img->height };

IppiRect r = { 0, 0, img->width, img->height };

double angle = 0;

cvNamedWindow( rotation demo, 1 );

for(;;)

{

ippiRotateCenter_8u_C1R( (Ipp8u*)img->imageData, sz, img->widthStep, r, (Ipp8u*)img_r->imageData, img_r->widthStep, r,

angle, sz.width*0.5, sz.height*0.5, IPPI_INTER_LINEAR );

angle = fmod( angle + 10, 360 ); // update the rotation angle

cvShowImage( rotation demo, img_r );

if( cvWaitKey(10) == 27 ) // wait for a key for 10ms, exit on ESC

break;

}

}

Reply