opencv获取二值化图像轮廓

opencv中提供了获取图像轮廓的接口:cvFindContours

	stor = cvCreateMemStorage(0);
	cont = cvCreateSeq(CV_SEQ_ELTYPE_POINT, sizeof(CvSeq), sizeof(CvPoint), stor);
	Number_Object = cvFindContours(dst_bw, stor, &cont, sizeof(CvContour), CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cvPoint(0,0) ); //找到所有轮廓

cvFindContours从二值图像中提取轮廓,并返回提取轮廓的个数,得到的轮廓保存在一个list中。

你可能感兴趣的:(opencv,图像处理)