[Scilab-users] {EXT} Re: need a little help

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Tue Feb 19 09:10:16 CET 2019


Hello,

> De : users [mailto:users-bounces at lists.scilab.org] De la part de P M
> Envoyé : lundi 18 février 2019 18:09
>
> Actually my goal was to compare point coordinates to map coordinates
> and find the points on the map which are closest to the given point coordinates.
> [...]
> The points are building a line on the map

I'm not sure I understand your problem well but:

If you want to find the points of the maps that are close to a line, You might considere the Cartesian equation of the line

f(x, y) = 0 with f(x, y) = ax + by + c

and search for the points of the map which abs(f(x, y)) value is low.

From what I understand about your statement, you have a set of points = [ lineX, lineY] ; you  might extract the (a, b, c) parameters of the line by linear regression, something like

X = [x ; ones(x)];

A = y\X;

(if the line is not vertical) then look at abs(A(1)*x - y + A(2)) < threshold or something like that.

Otherwise, if you want to detect a line in a map, you might have a look at the Hough transform.

Regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

Public
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


More information about the users mailing list