C#WPF计算两条折线之间的相似度 [英] C# WPF calculate similarity between two polylines

查看:323
本文介绍了C#WPF计算两条折线之间的相似度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一条带有大量点的第一条主折线。

然后我有一个点数较少的第二条折线。第二条折线源于第一条通过优化(例如Ramer-Douglas-Peucker算法或其他)。

我需要以最快的方式评估优化的好坏程度(即知道第二条折线与第一条折线的相似程度)。

通过这样做,我将能够比较不同的优化算法,但我需要这样做而不需要花费太多时间。

Thanx任何帮助

I have an first primary polyline with a large number of point.
Then I have a second polyline with a smaller number of point. The second polyline derives from the first through an optimization (es. Ramer-Douglas-Peucker algorithm or something other).
I need to evaluate how good is the optimization (that is to know how similar is the second polyline in comparison with the first) in the fastest way possible.
By doing this I'll be able to compare different optimization algorithms but I need to do it without taking too much time.
Thanx for any help

推荐答案

你的问题没有解决方案。



谢尔盖说得对,

There is no solution to your question the way you ask it.

Sergei is right when he says
引用:

你还没准备好解决这样的问题,因为你不知道如何定义问题。

You are not ready to solve such problems, because you have no clue on how to define the problems.





编程的第一条规则:你必须很好地掌握这个问题才能解释电脑该做什么。这是强制性的,因为计算机速度快而且很愚蠢,他永远不会做客。



建议:尝试手工解决问题。

取一组任意折线,一些是常规折线,另一些是常规折线。

拿一个方形,一个矩形,一个十字形,一个三角形,一个星形,一个五边形,一个六角形,马蹄形......,你可以玩大小。

选择一个形状,并以图形方式与其他形状一起检查并选择最佳形状。重复很多次,直到你定义了最佳答案的规则。



你对最佳选择的定义会产生一系列新问题需要解决。



First rule of programming: You have to master the problem well enough to explain the computer what to do. It is mandatory because the computer is fast but stupid, he will never guest something.

Advice: Try to solve the problem by hand.
Take a set of arbitrary polylines, some regular, others non regular.
Take a sqare, a rectangle, a cross, a triangle, a star, a pentagon, an hexagon, a horse shoe ... , and you can play with sizes.
Pick one shape and check it against the others graphically and choose the best one. repeat many time, until you have defined the rules for the best answer.

Your definition of best choice will make a new set of problems to solve.


这篇关于C#WPF计算两条折线之间的相似度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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