> tried this code:
>
> view->Draw();
>   img = csPtr<iImage> (g22d->ScreenShot());
>   unsigned char *buffer = (unsigned char *) img->GetImageData();
> cvNamedWindow("Optical Flow", CV_WINDOW_AUTOSIZE);
> IplImage* img=cvCreateImage(cvSize(320,280),IPL_DEPTH_8U,1);
> cvSetData(img,buffer,img->widthStep);
> cvShowImage("Optical Flow", img);

Maybe try instead:
IplImage* img=cvCreateImage(cvSize(g2d->GetWidth (), g2d->GetHeight ()),
IPL_DEPTH_8U, 3);

ie, with the correct width, height and number of color channels.


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Crystal-main mailing list
Crystal-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: 
mailto:crystal-main-requ...@lists.sourceforge.net?subject=unsubscribe

Reply via email to