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


C++ MapPoint::isFalse方法代码示例

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


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

示例1: propagateFeatureStates

void SingleSLAM::propagateFeatureStates() {
	for (int i = 0; i < m_tracker.m_nMaxCorners; i++) {
		Track2D& tk = m_tracker.m_tks[i];
		if (tk.empty())
			continue;
		Track2DNode* node = tk.tail;
		if (node->pre) {
			//propagate the type of feature points
			node->pt->type = node->pre->pt->type;
			if (node->pre->pt->mpt) {
				MapPoint* pMapPt = node->pre->pt->mpt;
				if (pMapPt->state != STATE_MAPPOINT_CURRENT)
					continue;
				//map correspondence propagation
				if (!pMapPt->isFalse()) {
					pMapPt->pFeatures[camId] = node->pt;
					node->pt->mpt = pMapPt;
					pMapPt->lastFrame = currentFrame();
					if (pMapPt->isCertainStatic())
						pMapPt->staticFrameNum++;
					node->pt->reprojErr = node->pre->pt->reprojErr;
				}
			}
		}
	}
}
开发者ID:danping,项目名称:CoSLAM,代码行数:26,代码来源:SL_SingleSLAM.cpp

示例2: getSeedsBetween

int NewMapPtsNCC::getSeedsBetween(MapPointList& mapPts, int iCam, int jCam,
		Mat_d& seed1, Mat_d& seed2) {
	MapPoint* pHead = mapPts.getHead();
	if (!pHead)
		repErr("SLAM failed - No map point can be found!\n");
	std::vector<FeaturePoint*> vecFeatPts1, vecFeatPts2;
	for (MapPoint* p = pHead; p; p = p->next) {
		//if ((p->iLocalType == TYPE_MAPPOINT_STATIC || p->iLocalType == TYPE_MAPPOINT_DYNAMIC) && p->numVisCam >= 2 && p->pFeatures[iCam] && p->pFeatures[iCam]->f == m_curFrame && p->pFeatures[jCam] && p->pFeatures[jCam]->f == m_curFrame) {
		if (!p->isFalse() && !p->isUncertain() && p->numVisCam >= 2
				&& p->pFeatures[iCam] && p->pFeatures[iCam]->f == m_curFrame
				&& p->pFeatures[jCam] && p->pFeatures[jCam]->f == m_curFrame) {
			vecFeatPts1.push_back(p->pFeatures[iCam]);
			vecFeatPts2.push_back(p->pFeatures[jCam]);
		}
	}
	if (vecFeatPts1.empty())
		return 0;

	seed1.resize(vecFeatPts1.size(), 2);
	seed2.resize(vecFeatPts2.size(), 2);

	for (size_t i = 0; i < vecFeatPts1.size(); i++) {
		seed1.data[2 * i] = vecFeatPts1[i]->x;
		seed1.data[2 * i + 1] = vecFeatPts1[i]->y;
		seed2.data[2 * i] = vecFeatPts2[i]->x;
		seed2.data[2 * i + 1] = vecFeatPts2[i]->y;
	}
	return seed1.rows;
}
开发者ID:Kyate,项目名称:CoSLAM,代码行数:29,代码来源:SL_NewMapPointsInterCam.cpp

示例3: process

int PointRegister::process(double pixelErrVar) {
	/*==============(critical section)=================*/
	enterBACriticalSection();
	bool empty = slam.actMapPts.empty();
	leaveBACriticalSection();
	if (empty)
		return 0;
	/*------------------------------------------------*/
	vector<MapPoint*> vecActMapPts;
	vecActMapPts.reserve(slam.actMapPts.size() * 2);

	/*==============(critical section)=================*/
	enterBACriticalSection();
	typedef std::list<MapPoint*>::iterator MapPointListIter;
	for (MapPointListIter iter = slam.actMapPts.begin();
			iter != slam.actMapPts.end(); iter++) {
		MapPoint* p = *iter;
		vecActMapPts.push_back(p);
	}
	slam.actMapPts.clear();
	slam.nActMapPts = (int) vecActMapPts.size();
	leaveBACriticalSection();
	/*------------------------------------------------*/

	/*get the mask and unmapped feature points for registration*/
	genMappedMask();
	getUnMappedFeatPoints();

	vector<bool> flagReged;
	flagReged.resize((size_t) slam.nActMapPts, false);
	/*==============(critical section)=================*/
	enterBACriticalSection();
	nRegTried = 0;
	nRegDeepTried = 0;
	for (int i = 0; i < slam.nActMapPts; i++) {
		MapPoint* p = vecActMapPts[i];
		if (!p->isFalse()) {
			flagReged[i] = regOnePoint(p, pixelErrVar);
		}
	}
	leaveBACriticalSection();
	/*------------------------------------------------*/

	/*==============(critical section)=================*/
	enterBACriticalSection();
	int nReg = 0;
	for (size_t i = 0; i < slam.nActMapPts; i++) {
		MapPoint* p = vecActMapPts[i];
		if (flagReged[i] == false) {
			slam.actMapPts.push_back(p);
		} else {
			p->lastFrame = slam.curFrame;
			p->state = STATE_MAPPOINT_CURRENT;
			slam.curMapPts.push_back(p);
			nReg++;
		}
	}
	leaveBACriticalSection();
	return nReg;
}
开发者ID:caomw,项目名称:MonoSLAM_ARDrone,代码行数:60,代码来源:SL_PointRegistration.cpp


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