当前位置: 首页>>代码示例>>C++>>正文


C++ FileNode::begin方法代码示例

本文整理汇总了C++中cv::FileNode::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ FileNode::begin方法的具体用法?C++ FileNode::begin怎么用?C++ FileNode::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cv::FileNode的用法示例。


在下文中一共展示了FileNode::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: read

void RFS::read(const cv::FileNode &fn)
{
	rtrees.clear();
	for (auto it = fn.begin(); it != fn.end(); ++it)
	{
		RTree rfs;
		*it >> rfs;
		rtrees.push_back(rfs);
	}
}
开发者ID:sc2h6o,项目名称:Face-LBF,代码行数:10,代码来源:rfs.cpp

示例2: loadConfigurationFromFileNode

bool ConfigurationDataReader::loadConfigurationFromFileNode(const cv::FileNode &dataFileNode)
{
    bool success = true;
    
    cv::FileNodeIterator itEnd = dataFileNode.end();
    for (cv::FileNodeIterator it = dataFileNode.begin(); it != itEnd && success; it++)
    {
        const char *newDataValueName = (*it).name().c_str();
        success = success && loadNodeFromFileNode(dataFileNode, newDataValueName);
    }
    
    return success;
}
开发者ID:wishchin,项目名称:SlamWishG2O,代码行数:13,代码来源:ConfigurationDataReader.cpp

示例3: read

 void read ( const cv::FileNode& node, map< string, V >&result)
 {
   bool node_type_ok = (node.type() & FileNode::MAP) > 0;
   if(!node_type_ok)
   {
     cout << node.type() << endl;
     cout << (node.type() & FileNode::MAP) << endl;
     cout << ((node.type() & FileNode::MAP) > 0) << endl;
     assert(node_type_ok);
   }
   
   for(FileNodeIterator iter = node.begin(); iter != node.end(); ++iter)
   {
     string node_name = (*iter).name();
     V value;
     //iter >> value; 
     deformable_depth::read_in_map(*iter,value);
     result[node_name] = value;
   }
 }
开发者ID:jsupancic,项目名称:AStar_Dual_Tree_HandPose,代码行数:20,代码来源:util_file.hpp

示例4: read

void read(const cv::FileNode& node, vector<vector< pair<int, int> > >& termPair)
{

    cv::FileNodeIterator it = node.begin(), it_end = node.end();
    for( ; it != it_end; ++it)
    {
        vector<int> first_part;
        vector<int> second_part;
        (*it)["first"] >> first_part;
        (*it)["second"] >> second_part;
        vector<pair<int, int> > first_second;
        first_second.resize(first_part.size());
        for(int j = 0; j < first_part.size(); ++j)
        {
            first_second[j].first =  first_part[j];
            first_second[j].second = second_part[j];
        }
        termPair.push_back(first_second);
    }
    
}
开发者ID:caomw,项目名称:PangaeaTracking,代码行数:21,代码来源:settings.cpp

示例5: storeInit

	persistStore();
}

void ViolenceModel::storeInit(cv::FileStorage &file, std::string exampleStoreName, cv::Mat &exampleStore,
													 std::string classStoreName, cv::Mat &classStore,
													 std::string indexCacheName, std::map<std::string, time_t> &indexCache)
{
	// Read the data structures in from the training store.
	file[exampleStoreName] >> exampleStore;
	std::cout << exampleStoreName << " loaded. size: " << exampleStore.size() << "\n";

	file[classStoreName] >> classStore;
	std::cout << classStoreName << " loaded. size: " << classStore.size() << "\n";

	cv::FileNode indexedFilePaths = file[indexCacheName];
	cv::FileNodeIterator iter = indexedFilePaths.begin(), end = indexedFilePaths.end();
	while ( iter != end )
	{
		std::string path = (*iter)[VIOLENCE_MODEL_TRAINING_EXAMPLE_PATH];
		//std::cout << "found path: " << path << "\n";
		int modTime = (int)(*iter)[VIOLENCE_MODEL_TRAINING_EXAMPLE_MOD_DATE];
		indexCache[path] = (time_t)modTime;
		iter++;
	}

	// Ensure we go no further the height (rows) are not equivalent.
	std::cout << "classes: " << classStore.size().height << " examples: " << exampleStore.size().height << " indices: " << indexCache.size() << "\n";
	assert(classStore.size().height == exampleStore.size().height && classStore.size().height == indexCache.size());
}

void ViolenceModel::index(std::string resourcePath, bool isViolent)
开发者ID:meneim,项目名称:VSD,代码行数:31,代码来源:ViolenceModel.cpp


注:本文中的cv::FileNode::begin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。