Clear Filters
Clear Filters

Hi everyone can anyone help me please i want to find the distance between two points which have the same pixels values or between many points but the value of pixel have the same value i give the two matrices of interest points

1 view (last 30 days)
a = 1 : len
xoff(a) =Cxy(a,1) - Cxy1(a,1)
yoff(a) = Cxy(a,2) - Cxy1(a,2)
XYD(a) = sqrt(xoff(a).^2 + yoff(a).^2)
  2 Comments
tauseef ahmad
tauseef ahmad on 29 Apr 2016
this the code which i am trying a = 1 : len xoff(a) =Cxy(a,1) - Cxy1(a,1) ; yoff(a) = Cxy(a,2) - Cxy1(a,2); XYD(a) = sqrt(xoff(a).^2 + yoff(a).^2);
Image Analyst
Image Analyst on 29 Apr 2016
Edited: Image Analyst on 29 Apr 2016
I haven't the slightest idea what that sentence is trying to describe even after reading it several time. Perhaps you can attach a diagram or have another English speaker try to phrase it better. As of now, all I can suggest as a wild guess is to use improfile(), imdistline(), or use sqrt() and the Pythagorean Theorem. Or perhaps use pdist2() in the Stats toolbox.

Sign in to comment.

Answers (2)

tauseef ahmad
tauseef ahmad on 29 Apr 2016
Hi everyone can anyone help me please i want to subtract these two matrices the same number of element in matrix
xy=[125 133 0 0 0 0 0 0 0 0 0 0 0 0 ; 50 65 0 0 0 0 0 0 0 0 0 0 0 0]
x1y1=[0 0 0 0 0 0 102 0 0 0 0 120 0 0; 0 0 0 0 0 0 63 0 0 0 0 45 0 0]

Image Analyst
Image Analyst on 29 Apr 2016
Regarding your "Answer"
"Hi everyone can anyone help me please i want to subtract these two matrices the same number of element in matrix
xy=[125 133 0 0 0 0 0 0 0 0 0 0 0 0 ; 50 65 0 0 0 0 0 0 0 0 0 0 0 0]
x1y1=[0 0 0 0 0 0 102 0 0 0 0 120 0 0; 0 0 0 0 0 0 63 0 0 0 0 45 0 0]
"
Did you try the obvious:
difference = xy - x1y1

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!