从表面图中获取颜色信息

时间:2013-05-08 15:37:39

标签: matlab

spX = linspace(min(x), max(x),200);
spY = linspace(min(y), max(y),200);
[xC,yC] = meshgrid(spX,spY);

zC = bin2mat(x,y,z,xC,yC);
zCi = inpaint_nans(zC);

figure;
surface(xC(1,:),yC(:,1),zC);
shading('interp');
axis equal

如果我在matlab中使用surf2patch函数,我想获得与顶点或面相关的颜色

1 个答案:

答案 0 :(得分:0)

不太确定你在找什么......

surf_h = findobj(gca, 'Type', 'Surf', 'Tag', []);
CData  = get(surf_h, 'CData');