本文介绍了边缘滤波后的多边形匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 基本上我要做的就是检查两张图片之间的区别。 现在我已经完成了4方式已经(他们给我一个相当不错的估计值)我正在努力做另一个第五种方式。 (这只是一个有趣的项目,我试图学习它atm) 所以这就是我所拥有的: http://img809.imageshack.us/img809/5138/edgecomp.png [ ^ ] 这是同一部手机的2张不同图片。 现在我想做的是比较这两个形状/多边形或整个图像是否匹配。现在我可以逐个像素地比较它,但很快你就会意识到为什么这不是一种可行的方式,因为如果我拍摄同一部手机的照片但是从另一个高度(和/或角度)手机的照片边将绘制略微不同的多边形。我尝试比较每个多边形的点数但没有任何成功。 有什么想法吗?解决方案 如果你有一个连续线你可以使用A *搜索算法替换它,这样你会找到任何一个空行: WPF:A * search [ ^ ] 然后你可以使用Douglas-Peucker或simular算法来简化这条线: Polyline Simplification [ ^ ] 现在它只是一个找到类似的形状。 PS:假设图片是Soble或Canny边缘检测? Hi,Basically what I am trying to do is check the difference between two images.Now I have done it 4 ways already (and they give me a pretty good estimated value) I am struggling to do it another fifth way. (it is just a fun project, I am trying to "learn" it atm) So here is what I have:http://img809.imageshack.us/img809/5138/edgecomp.png[^]These are 2 different pictures of the same cellphone.Now what I would like to do is to compare these two "shapes"/"polygons" or the whole images if they match. Now I could just compare it pixel by pixel but soon you will realize why that''s not a way to go, because if I take the photo of the same phone but from another height (and/or angle) the phone''s edges will draw a slightly different polygon. I tried comparing the number of points of each polygon but without any success.Any ideas? 解决方案 If you have a continuos line you could replace it by using an A* search algorithm, That way you would find any hole lines:WPF: A* search[^]Then you could simplify the line by using Douglas-Peucker or simular algorithm:Polyline Simplification[^]Now it would just be a metter of finding simular shapes.PS: Assuming the pictures are Soble or Canny edge detection? 这篇关于边缘滤波后的多边形匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-26 23:56