标签:readwrite pre class void hub amp not example and
起因
因为OpenCV不支持.pfm文件格式的操作,而middlebury提供的groundtruth一般为.pfm格式,为避免重复造轮子,就去github上找了大神提供的开源代码分享给大家。
轮子
github链接:https://github.com/antoinetlc/PFM_ReadWrite
例子
/** * Example of how to read and save PFM files. */ #include <iostream> #include <string> #include "PFMReadWrite.h" using namespace std; using namespace cv; int main(void) { //Example that loads an image and stores it under another name Mat image = loadPFM(string("image.pfm")); //Display the image imshow("Image", image); waitKey(0); savePFM(image, "image_saved.pfm"); return 0; }
标签:readwrite pre class void hub amp not example and
原文地址:https://www.cnblogs.com/cvwyh/p/10347255.html