- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
}
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page