Borrar filtros
Borrar filtros

Need help-Image Smoothing problem ?

1 visualización (últimos 30 días)
Annika
Annika el 4 de Ag. de 2014
Comentada: Annika el 5 de Ag. de 2014
Hello,
I am working on a project, where I have to plot some COMSOL images. I choose to get data from COMSOL and plot it through MATLAB, as i have many images. Its a 2D plot.
I am attaching both the images. Problem is I get a very smooth image from COMSOL but when plotting it through MATLAB give me not so good image.
I tried using some noise filter , but could not get a good reslt.
Can some one suggest me, how can i smoothen the image?
First image is COMSOL generated and second is MATLAB plotted.
Thanks Anushka

Respuesta aceptada

Image Analyst
Image Analyst el 4 de Ag. de 2014
You are just using a colorbar with not many colors (64) so it looks posterized. Use a colormap with higher precision/more colors
colormap(jet(256));
  2 comentarios
Annika
Annika el 4 de Ag. de 2014
Thank you so much.
Annika
Annika el 5 de Ag. de 2014
May I also know how did you keep this number 256? What is the range of numbers that can be used? Cause when i inter-change the axis 'Y' to 'Z' and 'Z' to 'Y', i again view posterized image. I already tried using 128 and 64 instead of 256 but it still looks not ok. Below is the code i used and also attaching image,
if true
for i=3:length(datamat)
sig{i}=XY2Mat(datamat{1},datamat{2},datamat{i},200,250);
figure(i);
imagesc(sig{i});
caxis([-max(abs(datamat{i})) max(abs(datamat{i}))])
colormap(jet(512));
colorbar
xlabel('Y')
ylabel('Z')
hold on;
end
end

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Red 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