图像处理(问题) [英] Image Processing ( Problem )

查看:65
本文介绍了图像处理(问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一幅包含多行不同颜色的图像,该行可以重叠,我需要从图像中计算行数,
并且还需要检测线面积.
我怎么能做到这一点.


致以问候
Manoj

I have a image containing Multiple lines in different color''s and this line can be overlap I need to count Number of line''s from Image,
and also need to detect line area.
How could I achieve it.


With Regards
Manoj

推荐答案

我会尝试类似的方法

1.检查图像中现有的颜色
2.对于每种现有颜色,霍夫变换 [集群算法 [ ^ ].
I''d try something like that

1. Check for existing colours in the image
2. For each existing colour, Hough-transform[^] the image to get straight lines (could be tricky if colours actually are gradients)
3. You should now have some equations that represent straight lines. An equation should have two parameters. Find a formula that transforms two sets of such parameters into a distance.
4. Every pair of lines whose distance is less than a threshold (experiment for the value) are indeed segments of the same line. You could use a clustering algorithm[^].


lukeer的解决方案提供者很好,但是可能需要很多工作.
您也可以快速浏览图片.

由于这些是线,因此您将而不是曲线可以通过以下方式轻松实现:
1)遍历图像的矩阵,这将是O(n ^ 2),并且找到的每种颜色(不是背景)都将变为O(n ^ 2).抓住最小和最大x和y坐标,然后可以使用这些值获得每条线的两个点.

现在,找到颜色"
1)如果图像颜色是纯色(没有渐变),那么这就是我在上面放置的颜色.但是
2)如果线条颜色有些失真(由于jpeg压缩等),则只需使用距离功能比较2种颜色即可.由于颜色是具有(R,G,B)的向量,因此您可以具有距离D(colorA,ColorB)并使用阈值,因此如果D(colorA,colorB)
希望对您有帮助.
the solution provider by lukeer is good, but could take a lot of work.
you can also do it with a quick pass over the image.

since those are lines, you will and not curves you can easily do this by:
1) walk the matrix of the image, this is going to be O(n^2) and for each color you find (that is not background). grab the min and max x and y coordinates, then you can get the two points of each line with these values.

now, finding "colors"
1) if the image colors are solid (no gradients) then is just what I placed above. but
2) if line colors are a bit distorted (due to jpeg compression etc) then you just use a distance function to compare 2 colors. since a color is a vector with (R,G,B), you can have the distance D(colorA,ColorB) and use threshold, so if D(colorA,colorB)<threshold it will be considered the same color.

hope it helps.


可以帮助您,通过比较其带宽,像素等,上传两个图像并比较两个图像是相同的.

真的很棒............


比较两个图像
Sure it will help you,Uploading two images and comparing both images are same by comparing its bandwidth,pixel,etc.

Really a nice article...........


Comparing two images


这篇关于图像处理(问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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