[英]plotting 3D edge in matlab
I have a 3D matrix of a MRI image and used matlab edge function and it gave me a 3D matrix as follow which some of the points are 1 (means edges). 我有一个MRI图像的3D矩阵,并使用了matlab边缘函数,它为我提供了一个3D 矩阵 ,如下所示,其中一些点为1(均值边缘)。
I want to show this surface in matlab but I don't know that how I should do this. 我想在Matlab中显示此表面,但我不知道该怎么做。 I know that I should use surf.
我知道我应该使用冲浪。
As @bdecaf said, you can use find
to determine the height of the points, or in other words, in which of the 100 layers does the point lie. 正如@bdecaf所说,您可以使用
find
来确定这些点的高度,换句话说,该点位于100层中的哪一层中。 You can do that as follows: 您可以按照以下步骤进行操作:
z1=zeros(30,100);
temp=find(b);
[row,col,layer]=ind2sub(size(b),temp);
for i=1:size(x,1)
z1(row(i),col(i))=layer(i);
end
You can get an image as follows: 您可以得到如下图像:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.