MatLab减少绘制图像中的bitdepth?

McM*_*cMa 5 matlab plot

我正在绘制两个场景之间的功能匹配,如下所示:

%...import, preprocessing, and stuff

%"Sandwich" Image1 and Image2 in a new image Image
ImSize=[size(Image1,1)+size(Image2,1),max(size(Image2,2),size(Image2,2))];

Image=zeros(ImSize);
Image(1:size(Image1,1),1:size(Image1,2))=Image1;
Image(size(Image1,1)+1:end,1:size(Image2,2))=Image2;

%show Image
imshow(Image,[]);
hold on

%plot keypoints and matching lines in all colors
cc=hsv(size(Keypoints1,1));

for ii=1:size(Keypoints1,1)

    plot(Keypoints1(ii,1),Keypoints1(ii,2),'o','color',cc(ii,:))
    plot(Keypoints2(ii,1),Keypoints2(ii,2)+size(Image1,1),'o','color',cc(ii,:))

    line([Keypoints1(ii,1),Keypoints2(ii,1)],[Keypoints1(ii,2),Keypoints2(ii,2)+size(Image1,1)],'color',cc(ii,:),'LineWidth',0.5)
end
Run Code Online (Sandbox Code Playgroud)

这个正常工作正常,Matlab绘制了整个bitdepth 在此输入图像描述

但随着行数的增加,我将开始看到导致二进制图像甚至全黑的bitdepth减少: 在此输入图像描述

我知道密谋这么多线远非理想,但我仍然想知道为什么会这样.是否有任何matlab数据机制我应该理解解释这种行为?

注意:这只是显示图像的问题,将它们保存为.bmp,jpg,...将生成正常图片.

kus*_*usi 2

尝试不同的渲染器?将其添加到脚本的开头

h=figure;
set(h,'renderer','opengl');
Run Code Online (Sandbox Code Playgroud)

除了“opengl”之外,还可以尝试“painters”和“zbuffer”