检测变形线

2023-09-11 04:52:48 作者:waiting for you

我已经要求在 http://dsp.stackexchange.com/ 这个问题,但没有得到任何答复!希望能得到什么建议位置:

I've already asked this question on http://dsp.stackexchange.com/ but didn't get any answer! hope to get any suggestion here:

我有一个项目中,我必须承认在不同的位置2线,线成直角,但可以在不同的表面进行投影。我使用的OpenCV。

I have a project in which I have to recognize 2 lines in different "position", the lines are orthogonal but can be projected on different surfaces. I'm using opencv.

的交点可以在框架上的任何地方。线是红色(的图像只显示灰度)。

The intersection can be anywhere on the frame. The lines are red (the images show just the gray scale).

更新

-I'll使用灰度摄像头!!!!!!!!!

-I'll be using a gray scale camera !!!!!!!!!

-the背景和物体在其上的线将被投影可以改变

-the background and objects on which the lines will be projected can change

我不要求为code ,但只有约我怎么能解决这个提示?我试过 houghlines 的功能,但它仅适用于平直的表面。 提前致谢 !

I'm not asking for code, but only for hints about how can I solve this? I tried houghlines function but it works only for straight surfaces. thanks in advance !

推荐答案

这是并不困难的任务,因为它包括直线。我也做了类似类型的项目。

This is not that difficult task as it include straight line. I have done similar kind of project.

如果您的图片是彩色首先,隐蔽其灰度。 然后用校准值滤波图像模糊。 现在,减去从灰度图像的模糊图像。 在步骤3后,如果你的形象,你会看到上线的强度的地方 比图像的其他部分高,因为这些行了对比,当我们申请中位数 过滤减去值大于图像的其余部分。 要得到你需要使用创建一个二进制图像,即一个更清洁的区别。只有黑色和白色 特定THRESH举行。 6.Finally你有玉线,如果他们是噪音,你可以第4步后,使用顶帽过滤和 之后第5步。高斯滤波 First of all if your image is colored covert it to gray scale. Then use a calibrated median filter to blur the image. Now subtract the blurred image from the gray scale image. After step 3 if you look at the image you will see that the on the places of lines the intensity is higher than the other parts of image because these line are contrasted and when we apply median filter the subtracted value is more than the rest of image. to get a cleaner distinction you need to use create a binary image ie. only black and white with a particular thresh hold. 6.Finally you got yu lines if their is noise you can use top hat filtering after step 4 and gaussian filtering after step 5.

您可以从本文裂纹检测

相关推荐