本文整理汇总了C++中FileNode::isString方法的典型用法代码示例。如果您正苦于以下问题:C++ FileNode::isString方法的具体用法?C++ FileNode::isString怎么用?C++ FileNode::isString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileNode
的用法示例。
在下文中一共展示了FileNode::isString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
bool CvCascadeParams::read( const FileNode &node )
{
if ( node.empty() )
return false;
string stageTypeStr, featureTypeStr;
FileNode rnode = node[CC_STAGE_TYPE];
if ( !rnode.isString() )
return false;
rnode >> stageTypeStr;
stageType = !stageTypeStr.compare( CC_BOOST ) ? BOOST : -1;
if (stageType == -1)
return false;
rnode = node[CC_FEATURE_TYPE];
if ( !rnode.isString() )
return false;
rnode >> featureTypeStr;
featureType = !featureTypeStr.compare( CC_HAAR ) ? CvFeatureParams::HAAR :
!featureTypeStr.compare( CC_LBP ) ? CvFeatureParams::LBP :
!featureTypeStr.compare( CC_HOG ) ? CvFeatureParams::HOG :
-1;
if (featureType == -1)
return false;
node[CC_HEIGHT] >> winSize.height;
node[CC_WIDTH] >> winSize.width;
return winSize.height > 0 && winSize.width > 0;
}
示例2: read
void read(const FileNode& fn)
{
FileNode n = fn["name"];
CV_Assert(n.isString() && String(n) == name);
max_iter = fn["max_iter"];
threshold = fn["threshold"];
}
示例3: read
void read(const FileNode& fn)
{
FileNode n = fn["name"];
CV_Assert(n.isString() && String(n) == name);
wcon = fn["contrast_weight"];
wsat = fn["saturation_weight"];
wexp = fn["exposure_weight"];
}
示例4: read
void read(const FileNode& fn)
{
FileNode n = fn["name"];
CV_Assert(n.isString() && String(n) == name);
gamma = fn["gamma"];
scale = fn["scale"];
saturation = fn["saturation"];
}
示例5: read
void read(const FileNode& fn)
{
FileNode n = fn["name"];
CV_Assert(n.isString() && String(n) == name);
max_bits = fn["max_bits"];
exclude_range = fn["exclude_range"];
int cut_val = fn["cut"];
cut = (cut_val != 0);
}
示例6: read
bool CvHaarFeatureParams::read( const FileNode &node )
{
if( !CvFeatureParams::read( node ) )
return false;
FileNode rnode = node[CC_ISINTEGRAL];
if( !rnode.isString() )
return false;
String intStr;
rnode >> intStr;
isIntegral = !intStr.compare( "0" ) ? false : !true;
return true;
}
示例7: read
bool CvHaarFeatureParams::read( const FileNode &node )
{
if( !CvFeatureParams::read( node ) )
return false;
FileNode rnode = node[CC_MODE];
if( !rnode.isString() )
return false;
String modeStr;
rnode >> modeStr;
mode = !modeStr.compare( CC_MODE_BASIC ) ? BASIC :
!modeStr.compare( CC_MODE_CORE ) ? CORE :
!modeStr.compare( CC_MODE_ALL ) ? ALL : -1;
return (mode >= 0);
}
示例8: read
void read(const FileNode& fn)
{
FileNode n = fn["name"];
CV_Assert(n.isString() && String(n) == name_);
params.minDisparity = (int)fn["minDisparity"];
params.numDisparities = (int)fn["numDisparities"];
params.kernelSize = (int)fn["blockSize"];
params.speckleWindowSize = (int)fn["speckleWindowSize"];
params.speckleRange = (int)fn["speckleRange"];
params.disp12MaxDiff = (int)fn["disp12MaxDiff"];
params.preFilterType = (int)fn["preFilterType"];
params.preFilterSize = (int)fn["preFilterSize"];
params.preFilterCap = (int)fn["preFilterCap"];
params.textureThreshold = (int)fn["textureThreshold"];
params.uniquenessRatio = (int)fn["uniquenessRatio"];
}