get rid of rugged edges plotted with trisurf

4 ビュー (過去 30 日間)
Saurabh Singh
Saurabh Singh 2012 年 5 月 31 日
I am using trisurf to plot a set of scattered data (that happens to be cartesian coordinates of a spherical surface whose equation is unknown). Further, there is a parameter Pindex for every (x,y,z) according to which colormap is used. However, the region of one particular color is having severely rugged edges. The link shows a part of image:
I am using this code for plotting:
tri=delaunay(x,y); trisurf(tri,x,y,z,Pindex);
I tried using griddata and gridfit but they are not giving proper results. Does anyone know what modification I need to do in my code to get smooth edges of the regions?
  2 件のコメント
Ryan
Ryan 2012 年 6 月 1 日
Could you do a convolution with some gaussian to smooth it? I believe the conv2() filter could help you.
Ryan
Ryan 2012 年 6 月 1 日
I also found this through google, I believe it will help you http://stackoverflow.com/questions/6330790/3d-gaussian-filter-in-matlab.

サインインしてコメントする。

回答 (3 件)

Saurabh Singh
Saurabh Singh 2012 年 6 月 1 日
Thanks Anton and others for the reply.
Actually I'm already using shading interp that I forgot to mention in my question.
Further, based on suggestions, I used imfilter command and tried Gaussian and few other filters on my plot. But the shape of plot (that needs to be spherical) is not being preserved.
1) Is there any image processing tool (like imfilter) that I can use in my case? 2) Is there any straight way without going to image processing to smoothen edges of few parts of the plot?

Patrick Kalita
Patrick Kalita 2012 年 6 月 1 日
Try changing the figure's renderer to ZBuffer:
set(gcf, 'Renderer', 'zbuffer');

Saurabh Singh
Saurabh Singh 2012 年 6 月 1 日
Thanks Kalita for the try...but isn't working as well....
Can anyone have an idea if any type of filter can do the job or may be any other surface plot command (that can plot from scattered datapoints (x,y,z) )

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by