Read xml file with type_id opencv-image using opencv

前端 未结 1 1881
臣服心动
臣服心动 2021-01-29 14:54

Hey i have tried a lot search in reading xml file with type_id \"opencv-image\", all i am looking here is \"opencv-matrix\" and all help available is useless for me. Please hel

1条回答
  •  伪装坚强ぢ
    2021-01-29 15:11

    Actually there is some documentation that you could use like: http://docs.opencv.org/modules/core/doc/xml_yaml_persistence.html

    In any case the answer to your problem is easy:

    FileStorage fs("file.xml", FileStorage::READ);
    Mat image;
    
    fs["depthImg190"] >> image;
    
    (...)
    
    fs.release();
    

    It should work!

    0 讨论(0)
提交回复
热议问题