Does MatLab reduce bitrate in constructed images?

I draw function matches between two scenes:

%...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 

This normal operation works well, and Matlab displays the entire bitdept enter image description here

but with an increase in the number of lines, I will begin to see a decrease in bitrate, resulting in binary images and even all blacks: enter image description here

I know that this many lines is far from ideal, but still I would like to know why this is happening. Are there any mechanisms for Matlab metrics that I need to understand to explain this behavior?

Note. This is only a problem with displaying images, saving them as .bmp, jpg, ... will lead to normal images.

+5
source share
1 answer

try different visualization tools? Add this to the top of your script

 h=figure; set(h,'renderer','opengl'); 

Instead of "opengl" also try "house painters" and "zbuffer"

+2
source

Source: https://habr.com/ru/post/1204168/


All Articles