Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Vertical distance method to extract feature points of discrete coordinate data in Matlab

Shulou Source: shulou.com Published: 2022-06-01 00:50:30 10月03日 Update

This article mainly introduces Matlab how to use vertical distance method to extract discrete coordinate data feature points related knowledge, the content is detailed and easy to understand, simple and fast operation, has a certain reference value, I believe that after reading this Matlab how to use vertical distance method to extract discrete coordinate data feature points article will have a harvest, let's take a look.

The vertical distance method is a line feature vertex compression algorithm that determines whether to retain the vertex according to the distance between the middle vertex and the two adjacent vertices in front and back. When the distance obtained is greater than the given limit difference (threshold), the vertex is retained, otherwise the vertex is deleted (as shown in the following image).

The median distance from all points to a straight line is generally used as the threshold. At the same time, the tool function I wrote can deal with not only two-dimensional data points, but also three-dimensional or even higher-dimensional data points.

1. Tool function

In case you can't find the tool function, here is the first one:

Function [newPntSet,vertPnt] = getFeaturePnt (pntSet)% @ author:slandarer% newPntSet: feature point% vertPnt: original curve vertical [rows,cols] = size (pntSet); if rows

Tags: Data features coordinates curves vertices discrete original two-dimensional functions regions tools knowledge drawings aids content front points vectors legends perpendicular lines extension lines Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker Apple Xiaomi NVidia