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; }
void read(const FileNode& fn) { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); max_iter = fn["max_iter"]; threshold = fn["threshold"]; }
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"]; }
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"]; }
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); }
void read(const FileNode& fn) { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); samples = fn["samples"]; lambda = fn["lambda"]; int random_val = fn["random"]; random = (random_val != 0); }
void read(const FileNode& fn) { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); gamma = fn["gamma"]; intensity = fn["intensity"]; light_adapt = fn["light_adapt"]; color_adapt = fn["color_adapt"]; }
void read(const FileNode& fn) { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); gamma = fn["gamma"]; contrast = fn["contrast"]; sigma_color = fn["sigma_color"]; sigma_space = fn["sigma_space"]; saturation = fn["saturation"]; }
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; }
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); }
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"]; }
void read(const FileNode& fn) { FileNode n = fn["name"]; CV_Assert(n.isString() && String(n) == name); gamma = fn["gamma"]; }