使用霍夫变换寻找直线,但还需要跟踪在这些直线上找到的点

发布于 2024-12-09 10:45:08 字数 444 浏览 1 评论 0原文

这并不是真正的 2D 问题,而是实际上 3D 问题的简化。所以这不是一个直接的图像分析问题。

我有一组 2D 点,将用来渲染 3D 表面图。我可以将所有点绘制为顶点,但这很浪费,因为其中许多点将形成线条和其他可以更容易渲染的简单形状。我可以使用 OpenCV 的霍夫变换来找到这些线;然而 OpenCV 函数并没有告诉我集合中的哪些点位于这些线上。

我需要知道位于霍夫变换中找到的线上的点子集,以便我知道将它们渲染为顶点,或者知道那些*位于的点的子集所以我知道不要渲染它们。

换句话说,如果我无法以某种方式排除不再需要绘制的顶点,那么找到简化的形状没有任何好处。

另一个细节:应用程序不断添加可能需要或不需要渲染的新点。我想我可以根据需要对全套点重新运行霍夫变换(每个渲染帧一次),但这又是低效的,因为图像不一定会改变那么多。还有其他方法来解决这个问题吗?

This isn't really a 2D problem, but actually a simplification of a 3D problem. So it's not a straight image analysis question.

I have a set of 2D points that I will use to render a 3D surface map. I could draw all of the points as vertices but this is wasteful as many of these points will form lines and other simple shapes that can be rendered much more easily. I can use the Hough Transform with OpenCV to find these lines; however the OpenCV function doesn't tell me what points in my set would lie on these lines.

I need to know either the subset of points that don't lie on lines found in the Hough Transform, so I know to render them as vertices, or those that *do so I know not to render them.

In other words, it doesn't do any good to find simplified shapes if I can't somehow exclude the vertices I don't need to draw anymore.

Another detail: The application is constantly adding new points that may or may not need to be rendered. I figure I can re-run the Hough Transform on the full set of points as needed (once per rendering frame) but again this is inefficient since the image won't necessarily change that much. Is there another way to approach the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

要走干脆点 2024-12-16 10:45:08

霍夫变换给出直线方程(即无限长的直线而不是线段)。

一旦你有了这些方程,你就可以测试每个点距一条线有多远并决定它是否在线与否(给定最大距离)。

添加新点时,您可以进行相同的测试,看看它们是否足够接近任何现有的线。

The Hough transform gives you equations of lines (ie infinitely long lines not segments).

Once you have these equations you could test how far each point is from a line and decide whether it is on the line or not (given some maximum distance).

When you add new points you can do the same test to see if they are sufficiently close to any of the existing lines.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文