how to find mesh of an image?

i have an image .suggest some code how to start with it.new to generating mesh

7 Comments

Mesh of an image? Can you elaborate what you expect?
i have generate mesh of an given image
What does "mesh" mean to you in this context?
intensity
with respect to intensity i have to generate mesh
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.
Are you looking for a contour plot?

Sign in to comment.

Answers (1)

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 

Tags

Asked:

on 16 Apr 2018

Commented:

on 16 Apr 2018

Community Treasure Hunt

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

Start Hunting!