- Try setting the interpolation to "bilinear", as it defaults to nearest neighbor: MATLAB imshow Documentation.
- Disable GPU-specific scaling by opening the NVIDIA Control Panel and setting: "Antialiasing - FXAA" to Off, "Antialiasing - Mode" to Application-controlled and "Image Scaling" to Off
- Try using "image" instead of "imshow": MATLAB image Documentation.
Very jagged edges when imshow an image on a second monitor
10 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am trying to display a 3840x720 RGB image (tiff or PNG) on a secondary monitor of resolution 3840x720 via display port.
I can create the figure, display the image, scale it properly and display full screen on the second monitor.
hfig = figure;
I = imread('image.tif');
set(hfig, 'Numbertitle','off',...
'Toolbar','none',...
'MenuBar', 'None',...
'WindowState','fullscreen',...
'Position','[1921 361 50 50]',...
'Color',[0 0 0],...
'GraphicsSmoothing','off');
imshow(I,'InitialMagnification','fit');
set(gca,'Position',[0 0 1 1],'xtick',[],'ytick',[],'Visible','off');
However, no matter what I try, I get badly jagged edges.
When I display the same image with an image view such as xnview, I get a clean image displayed.
See attached image side by side that shows how "broken" the curved line is on the matlab image (right). There is a bit on the xnview side but that is in the image.

I tried to force and modify some OpenGL settings but no change.
opengl hardware
opengl('OpenGLLineSmoothing',0);
If I make a 2560x1440 image and display on another monitor of that resolution via HDMI, I also get bad image. These two external displays are on the Nvidia M2200 graphics card. I tried to deactivate every possible processing on the adapter but still no luck and xnview works fine.
But using the same matlab code (replacing the position only), I can display the image properly on my main laptop screen (1920x1080 monitor) instead of the secondary monitor. This is on the integrated Intel HD 630 graphics adapter.
Any help would be greatly appreciated in figuring this one out...
0 件のコメント
回答 (1 件)
Karan Singh
2025 年 2 月 3 日 7:01
The answer can vary across different domains, as the issue could stem from anything ranging from GPU settings to using the right functions. Here are some of my guesses:
Since the issue is vague, a trial-and-error approach might be the best way forward.
Karan
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!