二值图像角点检测
我有一个代表二进制图像的矩阵(1 代表代表“黑色”像素的每个单元格,0 代表“白色”像素)。黑色像素代表图像的图形(形状和填充),白色像素代表背景。我想做的是检测矩阵中表示的图形的角点。
2 个示例:
有什么想法或算法吗?
提前致谢。
I have a matrix that represents a binary image (1 for each cell that represents "black" pixels and 0 for "white" ones). The black pixels represent the figures (shape and fill) of the image and the white ones the background. What I want to do is to detect the corners of the figures represented in the matrix.
2 examples:
Any idea or algorithm for this?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 opencv 库,它们有 python 绑定 和很多用于角点检测的算法。
我的2c
Try the opencv libraries, they have python bindings and a lot of algorithms to do corner detection.
my2c
如果我理解正确的话,有一个使用 C++ 的模板允许您扫描每个像素,您可以这样做并将黑色替换为 1,将白色替换为 0。
当我使用 opencv 进行网络摄像头颜色检测时,我必须做类似的事情。如果您愿意的话,我可以向您展示我正在谈论的代码部分?虽然我可能误解了你的问题。然而,我的代码允许您扫描每个像素(或者我的帧是从网络摄像头获取的,您也可以对实际图片执行相同的操作)
If I understand you correctly there is a template using C++ that allows you to scan each pixel, and you could do that and replace the black's with 1's and white with 0's.
I had to do a similar thing when I did webcam color detection with opencv. I can show you the part of the code im talking about if you like? Although I may be misunderstanding your question. However my code allows you to scan each pixel (or frame altho mine is taken from a web-cam you could do the same with an actual picture too)