cv::Mat HogDetector::readHPlane(char* path) { auto f = FileStorage(path, FileStorage::READ); Mat hplane; f["hplane"] >> hplane; return hplane; }
void testApp::load() { FileStorage fs; if (NUM_CAMERAS==2) fs = FileStorage(ofToDataPath("transforms.xml"), FileStorage::READ); FOREACH_CAMERA { if (NUM_CAMERAS==2) for (int i=0; i<4; ++i) for (int j=0; j<4; ++j) fs[getAttribName(iCam,i,j)] >> matPosRotFromXtoOther[i](i, j); camera[iCam].load(iCam); } }
void testApp::save() { FileStorage fs; if (NUM_CAMERAS==2) fs = FileStorage(ofToDataPath("transforms.xml"), FileStorage::WRITE); FOREACH_CAMERA { if (NUM_CAMERAS==2) for (int i=0; i<4; ++i) for (int j=0; j<4; ++j) fs << getAttribName(iCam,i,j) << matPosRotFromXtoOther[iCam](i, j); camera[iCam].save(iCam); } }