C# Класс burningmime.curves.CurvePreprocess

Показать файл Открыть проект

Открытые методы

Метод Описание
Linearize ( List src, System.Double md ) : List

Creates a list of equally spaced points that lie on the path described by straight line segments between adjacent points in the source list.

RdpReduce ( List pts, System.Double error ) : List

"Reduces" a set of line segments by removing points that are too far away. Does not modify the input list; returns a new list with the points removed. The image says it better than I could ever describe: http://upload.wikimedia.org/wikipedia/commons/3/30/Douglas-Peucker_animated.gif The wiki article: http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm Based on: http://www.codeproject.com/Articles/18936/A-Csharp-Implementation-of-Douglas-Peucker-Line-Ap

RemoveDuplicates ( List pts ) : List

Removes any repeated points (that is, one point extremely close to the previous one). The same point can appear multiple times just not right after one another. This does not modify the input list. If no repeats were found, it returns the input list; otherwise it creates a new list with the repeats removed.

Приватные методы

Метод Описание
PerpendicularDistance ( System.Windows.Vector a, System.Windows.Vector b, System.Double abDist, System.Double aCrossB, System.Windows.Vector p ) : System.Double
RdpRecursive ( List pts, System.Double error, int first, int last, List keepIndex ) : void

Описание методов

Linearize() публичный статический Метод

Creates a list of equally spaced points that lie on the path described by straight line segments between adjacent points in the source list.
public static Linearize ( List src, System.Double md ) : List
src List Source list of points.
md System.Double Distance between points on the new path.
Результат List

RdpReduce() публичный статический Метод

"Reduces" a set of line segments by removing points that are too far away. Does not modify the input list; returns a new list with the points removed. The image says it better than I could ever describe: http://upload.wikimedia.org/wikipedia/commons/3/30/Douglas-Peucker_animated.gif The wiki article: http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm Based on: http://www.codeproject.com/Articles/18936/A-Csharp-Implementation-of-Douglas-Peucker-Line-Ap
public static RdpReduce ( List pts, System.Double error ) : List
pts List Points to reduce
error System.Double Maximum distance of a point to a line. Low values (~2-4) work well for mouse/touchscreen data.
Результат List

RemoveDuplicates() публичный статический Метод

Removes any repeated points (that is, one point extremely close to the previous one). The same point can appear multiple times just not right after one another. This does not modify the input list. If no repeats were found, it returns the input list; otherwise it creates a new list with the repeats removed.
public static RemoveDuplicates ( List pts ) : List
pts List Initial list of points.
Результат List