Define a curve in terms of (X,Y) values
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear all,
I detected an artery borderline (Image B) on a grayscale image (image A). Now I would like to define the detected borderline in terms of (X,Y) values.
Would be much appreciated if any body could give me a hint. Ashkan
0 Kommentare
Antworten (1)
pfb
am 15 Apr. 2015
I assume that B is in a single matrix. The light point should then correspond to matrix elements above some threshold. If this is the case, it should be sufficient to do this
[y x] = find(B>t);
5 Kommentare
pfb
am 15 Apr. 2015
Bearbeitet: pfb
am 16 Apr. 2015
Well, that should not be that hard.
[Y,X] = size(B);
Gives you the size of the image in the vertical and horizontal direction (in pixels). You should know what that is in mm.
The "origin" is then
o = [X/2 Y/2];
Use round() if your matrix has odd dimensions and you want integer numbers.
Then
x = x-o;
y = y-o;
Again, these coordinates are "in pixels", but if you know the scale of the image it is easy to get the correct values. If Sx and Sy are the dimensions of the image in mms then
x = Sx/X*x;
y = Sy/Y*y;
Why your 3D model design software should care about where the origin of the axes is?
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!