Fake differences between figures generated on different machines
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi all,
Matlab figures generated on different machines cannot be compared pixel-to-pixel.
In the attached left-hand figure, you can see a figure obtained with Machine A
In the attached right-hand figure, you can see a figure obtained with Machine B
In the attached figure at the bottom, you can see the pixel-to-pixel difference obtained by the BeyondCompare software tool.
There is actually no difference between the data on both figures. These differences are coming from probably different color depths (or things like that, I am not really sure)
Is there a way to avoid such 'fake' differences when the figures are generated on different machines?
댓글 수: 1
DGM
2023년 6월 6일
편집: DGM
2023년 6월 6일
This isn't really an answer but if you're relying on figure capture (which seems entirely reasonable in this case), then I'm pretty sure some minor inconsistency is to be expected. The cause may vary depending on the particulars of the code (how the figure is set up and captured) and the differences between the test platforms (version, hardware, graphics options).
Severe geometry variation may be caused if a call to saveas() or print() occurs before the figure is completely set up. This could be fixed with a call to drawnow() where appropriate.
Smaller differences may be caused by differences in all that contributes to the rendering process. I don't pretend to know how or if that could be fixed, and it probably depends on knowing what the rendering settings are and how it's being captured.
Disclaimer: I don't have exportgraphics(), so I'm unfamiliar with whether it helps fix or reduce any of the described issues observed with saveas(), print(), and getframe().
In this particular case, it looks like there are a bunch of lines that are just missing entirely (e.g. the plot box). I can't tell if that's an interpolation issue due to the image being resized or if it's a simple matter of the plot box simply being drawn differently in the first place.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!