首页 > 解决方案 > 如何在 MATLAB 中以原始质量保存带有新绘制线条的图像

问题描述

我想在我的图片上画十条线,然后用新线保存它,但质量相同,没有 MATLAB 的白框,我该怎么做?

在此处输入图像描述




clear all;
clc



% read the image " its size 3000*4000"
Image = imread('55-3_a.jpg');
% show the image
imshow(Image)


% here i choose two points to draw the lines from them
first_point = [1.452032968374603e+03, 1.446231354344933e+03];
second_point = [0, 4000];

% here i draw ten dashed lines
for line_number = 1: 10
   hold on
   line( second_point  ,first_point - (line_number* 20), 'Color','red','LineWidth', 0.001,'LineStyle','--')
    hold off
end
% and here i draw the normal line
line( [0 4000],[1455, 1455],'Color','red','LineWidth',0.0001);


% here i want to save the image with its new lines with the same quality
% and without any white frame from MATLAB


标签: matlabmatlab-figure

解决方案


推荐阅读