image quality different in matlab

2 views (last 30 days)
Miles Brim
Miles Brim on 1 Jun 2023
Commented: Miles Brim on 1 Jun 2023
I have the following code. It generates a figure and then converts it into a pixel array "X". In another program I read that pixel array into a Java image and display it at the same resolution. The image qualities are very different. Why is this? How can I fix it? The first picture below is the figure in MATLAB, the second is the figure in Java.
fig=figure;
plot(L,mah)
hold
scatter(L(outliers==1),mah(outliers==1),'o')
legend(["Measurements","Outliers"])
xlabel("Measurement Sequence")
ylabel("Mahalanobis Distance")
title("Outlier Plot - Minimum Covariance Determinant Method")
set(gcf,'Position',[100 100 1120 840])
F = getframe(gcf);
[X, ~] = frame2im(F);
  3 Comments
Miles Brim
Miles Brim on 1 Jun 2023
OK, yes, I know it is matlab: Here are the two images, one with graphics smoothing turned off.
fig.GraphicsSmoothing = 'off';

Sign in to comment.

Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!