How to work out Pythagoras Error from image points?
古いコメントを表示

Hi There,
How do you work out pythagoras error using matlab?
As an example if you look at the image attached I have a number of actual points (ten in total, referred to as actual positions) that are the x, y coordinates for various locations in an image, I want to create a mechanism that the user can select where they think these points are on an image (called user placed positions).
I'd like to calculate the pythagoras error for each user selected point in relation to the actual points held in an array.
So for the example provided, the error is the same as the hypotenuse of the triangle whose sides are 5 (7-2) and 2 (4-2 or D-B as it were). By simple Pythagorus' theorem, the error is the Square root of the sum of the two sides, ie. 5.2.
How would I do this?
I'd REALLY appreciate some help!
Many thanks!
回答 (1 件)
Walter Roberson
2017 年 11 月 1 日
0 投票
pdist2()
2 件のコメント
DocD
2017 年 11 月 2 日
Walter Roberson
2017 年 11 月 2 日
actual_points = [0, 5];
user_point = [2, 0];
pdist2(user_point, actual_points)
actual_points can be a 2D array in which the rows are the desired coordinates of one point; pdist2() would then return the distance from user_point to each of the points described by a row in actual_points.
カテゴリ
ヘルプ センター および File Exchange で Image Arithmetic についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!