开发者

Save IPL_DEPTH_IMAGE for later processing

开发者 https://www.devze.com 2023-04-12 06:50 出处:网络
Is there a way to store an image开发者_如何学编程 with IPL_DEPTH_IMAGE depth on the hdd for later processing? If I save it with cvSaveImage or the cvBlobs render function it gets converted to 8bit and

Is there a way to store an image开发者_如何学编程 with IPL_DEPTH_IMAGE depth on the hdd for later processing? If I save it with cvSaveImage or the cvBlobs render function it gets converted to 8bit and therefore not all labeled are stored ;( Thanks, Durin


Have a look at cvFileStorage. It should be able to save the IPL_DEPTH_IMAGE for you.

Here is a short example from OpenCV docs:

#include "cxcore.h"

int main( int argc, char** argv )
{
    CvMat* mat = cvCreateMat( 3, 3, CV_32F );
    CvFileStorage* fs = cvOpenFileStorage( "example.yml", 0, CV_STORAGE_WRITE );

    cvSetIdentity( mat );
    cvWrite( fs, "A", mat, cvAttrList(0,0) );

    cvReleaseFileStorage( &fs );
    cvReleaseMat( &mat );
    return 0;
}

Hope you find that helpful!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号