CV_IMPL CvMat* cvEncodeImage( const char* ext,const CvArr* arr, const int* _params )

CV_IMPL IplImage* cvDecodeImage( const CvMat* _buf, int iscolor )
据说可以编码bmp, png, ppm and tiff (encoding only).

解码测试例子:

f=fopen("a.jpg","r");
unsigned char *m=(unsigned char*)malloc(1267*791);
fread(m,50000,1,f);

CvMat mat = cvMat(1267,791,CV_8UC1, m);
IplImage *p = cvDecodeImage( &mat, 1 );
cvNamedWindow("a");

cvShowImage("a",p);
cvWaitKey(0);

相关文章:

  • 2021-12-25
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-09-27
猜你喜欢
  • 2021-10-05
  • 2021-10-18
  • 2021-11-18
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案