Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 400 Bytes

边框检测.md

File metadata and controls

13 lines (10 loc) · 400 Bytes

#查找轮廓

样例:

	Mat result = new Mat(rect.size(),CvType.CV_8U);
	// 查找轮廓
	List<MatOfPoint> contours = new ArrayList<>();

	Mat hierarchy = new Mat();
	//RETR_EXTERNAL 只检测出最外轮廓。第一个轮廓指向最外的序列,除此之外没有别的连接。
	Imgproc.findContours(result, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);