Looking for OpenCV example program, that has IPP function calls interlaced w/cv

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Looking for OpenCV example program, that has IPP function calls interlaced w/cv

Aaron "The coach" :)
Can anyone point to me where there are
good examples of OpenCV and IPP functions working together?

I've moved over to Linux and left my copy of IPL
behind.

Specifically, here is the code I'm going to re-write
using OpenCV and IPP instead of relying on IPL.
(i.e. I was relying on iplCopy with ROI)

thanks!
-Aaron



void Waterfall::add(unsigned char* pBuffer)
{
        IplSetImageROI(pImage, 0, 0, 0, pImage->width, pImage->height-
1);   // copy all , but one
        IplSetImageROI(pScratchImage, 0, 0, 1, pImage->width, pImage-
>height-1); // and paste "one" down
        iplCopy(pImage, pScratchImage);  // from souce to dest

        memcpy(pScratchImage->imageData + (pScratchImage->widthStep *
0), pBuffer, beamWidth);

        IplImage* saveImage = pImage;
        pImage = pScratchImage;  
        pScratchImage = saveImage; // now we've swapped i.e. double
buffering

        cvShowImage("Image:", pImage);  // show THE Image
        cvWaitKey(1);
}

int Waterfall::IplSetImageROI( IplImage *img, int coi, int x, int y,
int w, int h )
{
   if( !img ) return 0;
   if( !img->roi )
      img->roi = iplCreateROI( coi, x,y, w,h );
   else
      iplSetROI( img->roi, coi, x,y, w,h );
   return !img->roi;
}

Reply | Threaded
Open this post in threaded view
|

Re: Looking for OpenCV example program, that has IPP function calls interlaced w/cv

gopu panavila
http://translate.google.com/translate?hl=en&sl=ja&u=http://opencv.jp/opencv/document/opencvref_ml_nn.html&sa=X&oi=translate&resnum=2&ct=result&prev=/search%3Fq%3Dopencv%2B%252B%2Bneural%2Bnetworks%26start%3D10%26hl%3Den%26sa%3DN

On Thu, Jan 15, 2009 at 7:38 PM, Aaron The coach :) <[hidden email]
> wrote:

>   Can anyone point to me where there are
> good examples of OpenCV and IPP functions working together?
>
> I've moved over to Linux and left my copy of IPL
> behind.
>
> Specifically, here is the code I'm going to re-write
> using OpenCV and IPP instead of relying on IPL.
> (i.e. I was relying on iplCopy with ROI)
>
> thanks!
> -Aaron
>
> void Waterfall::add(unsigned char* pBuffer)
> {
> IplSetImageROI(pImage, 0, 0, 0, pImage->width, pImage->height-
> 1); // copy all , but one
> IplSetImageROI(pScratchImage, 0, 0, 1, pImage->width, pImage-
> >height-1); // and paste "one" down
> iplCopy(pImage, pScratchImage); // from souce to dest
>
> memcpy(pScratchImage->imageData + (pScratchImage->widthStep *
> 0), pBuffer, beamWidth);
>
> IplImage* saveImage = pImage;
> pImage = pScratchImage;
> pScratchImage = saveImage; // now we've swapped i.e. double
> buffering
>
> cvShowImage("Image:", pImage); // show THE Image
> cvWaitKey(1);
> }
>
> int Waterfall::IplSetImageROI( IplImage *img, int coi, int x, int y,
> int w, int h )
> {
> if( !img ) return 0;
> if( !img->roi )
> img->roi = iplCreateROI( coi, x,y, w,h );
> else
> iplSetROI( img->roi, coi, x,y, w,h );
> return !img->roi;
> }
>
>  
>



--
Gopupanavila


[Non-text portions of this message have been removed]