边缘检测后获取边缘坐标(Canny) [英] Get edge co-ordinates after edge detection (Canny)

查看:2087
本文介绍了边缘检测后获取边缘坐标(Canny)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用OpenCV了很短的时间,并且对图像进行了Canny Edge Detection,并且之后还进行了膨胀处理,以进一步将对象(在我的情况下为正方形)与背景分离.

I have been working with OpenCV for a fairly short time, and have performed Canny Edge Detection on an image, and also performed dilation after that to further separate the object (in my case a square) from the background.

我的问题现在是使用一种算法来识别2D中的可抓取区域,该算法要求我处理这些边缘中的点的坐标.有什么方法可以使用OpenCV获取角的坐标,以便找到构成正方形边缘的直线的方程式?我知道正方形的大小.我的问题涉及二维坐标几何,因此需要坐标.

My problem, now is to identify graspable regions in 2D using an algorithm that requires me to handle co-ordinates of the points in those edges. Is there any way I can use OpenCV to get the co-ordinates of the corners so I can find the equation of the lines forming the edge of the square? I know the size of the square. My problem involves 2D co-ordinate geometry, and hence the need for co-ordinates.

如果需要,我可以在边缘检测和扩张后提供图像.帮助将不胜感激.

I can provide the image after edge detection and dilation if need be. Help would be appreciated a lot.

推荐答案

仅提供第二种方法-不保证可以使用.

Just offering a second method - not guaranteed to work.

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