根據是否有領域點來判斷點是否孤立

void mark_sparse_flag(point_distributed_list &points_distributed)
{
	point_distributed_list::iterator pt=points_distributed.begin();
	for(;pt!=points_distributed.end();pt++)	
	{
		CvRect rect;
		rect.x=pt->point.x-5;
		rect.y=pt->point.y-5;
		rect.width=10;
		rect.height=10;
		point_distributed_list::iterator pt_0=pt+1;
		for(;pt_0!=points_distributed.end();pt_0++)	
			if (pt_in_rect(pt_0->point,rect))
				{pt->flag=1;break;}
	}
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章