Define a curve in terms of (X,Y) values
3 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149083/image.jpeg)
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 个评论
回答(1 个)
pfb
2015-4-15
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 个评论
pfb
2015-4-15
编辑:pfb
2015-4-16
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?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!