how to find mesh of an image?
5 次查看(过去 30 天)
显示 更早的评论
i have an image .suggest some code how to start with it.new to generating mesh
7 个评论
Walter Roberson
2018-4-16
What does a "mesh" mean to you in this context? It would help if you could post a link to an example of what you would like the output to look like.
回答(1 个)
KSSV
2018-4-16
I =imread('pic.bmp') ; [y,x] = find(I==0) ; [m,n] = size(I) ;
[X,Y] = meshgrid(1:n,1:m) ;
idx = knnsearch([X(:) Y(:)],[x y]) ;
Z = ones(m,n) ; Z(idx) = 0 ;
pcolor(X,Y,Z) ; shading interp
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!