Need help-Image Smoothing problem ?

8 vues (au cours des 30 derniers jours)
Annika
Annika le 4 Août 2014
Commenté : Annika le 5 Août 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

Réponse acceptée

Image Analyst
Image Analyst le 4 Août 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 commentaires
Annika
Annika le 4 Août 2014
Thank you so much.
Annika
Annika le 5 Août 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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by