连接给定图上的点 [英] Connecting the dots on the given diagram

查看:197
本文介绍了连接给定图上的点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在给定图表上连接点的最佳或最简单的方法是什么。我想连接点形成一个矩形。这些点最初是蓝色的。

What is the best or easiest way to connect the dots on the given diagram. I would like to connect the dots to form a rectangle. The dots are initially blue color.


推荐答案

如果您要创建 tetragon (带4个vertix的形状)而不是强>(具有4个垂直和所有角度等于90度的形状) - i。 e。连接点,人们可以简单地分类为线,最简单的方法是创建具有点坐标的数组,然后应用 cv :: approxPolyDP cv :: convexHull

If you want to create tetragon (shape with 4 vertixes) instead of rectangle (shape with 4 vertixes and all angles equal to 90 degrees) - i. e. connect points that human can simply classify as lines, the simplest way is creating array with points coordinates, and then applying cv::approxPolyDP or cv::convexHull.

这篇关于连接给定图上的点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆