Borrar filtros
Borrar filtros

how to find mesh of an image?

4 visualizaciones (últimos 30 días)
ramya
ramya el 16 de Abr. de 2018
Comentada: Walter Roberson el 16 de Abr. de 2018
i have an image .suggest some code how to start with it.new to generating mesh
  7 comentarios
Walter Roberson
Walter Roberson el 16 de Abr. de 2018
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.
Walter Roberson
Walter Roberson el 16 de Abr. de 2018
Are you looking for a contour plot?

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 16 de Abr. de 2018
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 

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by