如何使用opencv查找模糊角位置? [英] how to find blur corner position with opencv?
问题描述
我想找到一个模糊图像的角位置,该图像内有一个角.类似于以下示例:
I want to find the corner position of an blurred image with a corner inside it. like the following example:
我可以确保图像中只有一个角,并且我认为
I can make sure that only one corner is inside the image, and I assume that
角落是黑白棋盘的一部分.
the corner is part of a black and white chessboard.
如何使用openCV检测交叉位置?谢谢!
How can I detect the cross position with openCV? Thanks!
推荐答案
而不是像其他人建议的那样,立即大幅度地工作,我建议先缩小尺寸(这会产生去模糊的效果),然后进行一次哈里斯(Harris)找到拐角,然后放大其位置,并以较大的分辨率通过大窗口(足够大以包含强度的明显鞍点)通过findCornerSubpix.
Rather than work right away at a ridiculously large scale, as suggested by others, I recommend downsizing first (which has the effect of deblurring), do one pass of Harris to find the corner, then upscale its position and do a pass of findCornerSubpix at full resolution with a large window (large enough to encompass the obvious saddle point of the intensity).
通过这种方式,您可以两全其美:快速检测以初始化细化,并根据原始图像进行精确细化.
In this way you get the best of both worlds: fast detection to initialize the refinement, and accurate refinement given the original imagery.
另请参见此其他相关答案
这篇关于如何使用opencv查找模糊角位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!