本文整理汇总了C++中FileUtils::saveFile方法的典型用法代码示例。如果您正苦于以下问题:C++ FileUtils::saveFile方法的具体用法?C++ FileUtils::saveFile怎么用?C++ FileUtils::saveFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUtils
的用法示例。
在下文中一共展示了FileUtils::saveFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveParameters
bool AdjustBMParam::saveParameters(){
FileUtils* fileUtils = new FileUtils();
QString fileName = fileUtils->saveFile();
int preFilterSz = this->ui->preFilterSz->value();
int preFilterCap = this->ui->preFilterCap->value();
int sadWndSz = this->ui->SADWndSz->value();
int minDisp = this->ui->minDisp->value();
int numDisp = 16*(this->ui->numDisp->value());
int texture = this->ui->textureth->value();
int uniquness = this->ui->uniq->value();
int spkWndSz = this->ui->speckleWndSz->value();
int spkRange = this->ui->specklerange->value();
if(sadWndSz%2==0)
sadWndSz++;
if(sadWndSz<5)
sadWndSz = 5;
if(preFilterSz%2==0)
preFilterSz++;
if(preFilterSz<5)
preFilterSz = 5;
CvFileStorage* fstorage = cvOpenFileStorage(fileName.toLocal8Bit().data(), NULL, CV_STORAGE_WRITE);
if(fstorage == NULL){
fprintf(stderr,"ERROR: File storage NULL!\n");
return false;
}
cvWriteInt(fstorage, "preFilterSize", preFilterSz);
cvWriteInt(fstorage, "preFilterCap", preFilterCap);
cvWriteInt(fstorage, "sadWindowSize", sadWndSz);
cvWriteInt(fstorage, "minDisp", minDisp);
cvWriteInt(fstorage, "numDisp", numDisp);
cvWriteInt(fstorage, "textureThreshold", texture);
cvWriteInt(fstorage, "uniquness", uniquness);
cvWriteInt(fstorage, "spkWindowSize", spkWndSz);
cvWriteInt(fstorage,"spkRange", spkRange);
cvReleaseFileStorage(&fstorage);
delete fileUtils;
return true;
}