本文整理汇总了C++中ModelFile::writeInt方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelFile::writeInt方法的具体用法?C++ ModelFile::writeInt怎么用?C++ ModelFile::writeInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelFile
的用法示例。
在下文中一共展示了ModelFile::writeInt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveToFile
void ASMModel::saveToFile(ModelFile& file)
{
ShapeModel::saveToFile(file);
file.writeInt(localFeatureRad);
file.writeInt(ns);
int i,j;
int rows, cols;
file.writeInt(rows = iCovarG[0][0].rows);
file.writeInt(cols = iCovarG[0][0].cols);
for (i=0;i<=pyramidLevel;i++){
for (j=0;j<nMarkPoints;j++){
for (int ii=0;ii<rows;ii++)
for (int jj=0;jj<cols;jj++)
file.writeReal(iCovarG[i][j](ii, jj));
}
}
file.writeInt(rows = meanG[0][0].rows);
file.writeInt(cols = meanG[0][0].cols);
for (i=0;i<=pyramidLevel;i++){
for (j=0;j<nMarkPoints;j++){
for (int ii=0;ii<rows;ii++)
for (int jj=0;jj<cols;jj++)
file.writeReal(meanG[i][j](ii, jj));
}
}
}
示例2: saveToFile
void ShapeModel::saveToFile(ModelFile &file)
{
file.writeInt(pyramidLevel);
file.writeInt(nMarkPoints);
file.writeInt(nTrain);
file.writeInt(nShapeParams);
file.writeReal(searchYOffset);
file.writeReal(searchXOffset);
file.writeReal(searchWScale);
file.writeReal(searchHScale);
file.writeReal(searchStepAreaRatio);
file.writeReal(searchScaleRatio);
file.writeReal(searchInitXOffset);
file.writeReal(searchInitYOffset);
file.writePCA(pcaShape);
for (int i=0;i<nMarkPoints*2;i++)
file.writeReal(meanShape(i, 0));
// Info for BTSM
file.writeReal(sigma2);
file.writePCA(pcaFullShape);
shapeInfo.writeToFile(file);
////! Mean shape after aligning
//ShapeVec meanShape;
}
示例3: writeToFile
void ShapeInfo::writeToFile(ModelFile &f) const {
f.writeInt(nContours);
for (int i=0;i<nContours+1;i++)
f.writeInt(contourStartInd[i]);
for (int i=0;i<nContours;i++)
f.writeInt(contourIsClosed[i]);
f.writeInt(pointInfo.size());
for (size_t i=0;i<pointInfo.size();i++){
f.writeInt(pointInfo[i].connectFrom);
f.writeInt(pointInfo[i].connectTo);
f.writeInt(pointInfo[i].type);
f.writeInt(pointInfo[i].pathId);
}
}