标签:bin ima ram com mic rgb camera 图片 atl
imwrite(原始图像,目标图像,‘quality‘,比率)
比率:[0, 100] 值越小,压缩比率越大
%% JPEG压缩 I = imread(‘cameraman.tif‘); % imshow(I); imwrite(I,‘test.jpg‘,‘quality‘,10); J = imread(‘test.jpg‘); subplot(1,2,1),imshow(I); subplot(1,2,2),imshow(J);
(1)RGB转灰度
灰度图像 = rgb2gray(RGB图像)
%% RGB转灰度 I = imread(‘coloredChips.png‘); subplot(1,2,1),imshow(I); J = rgb2gray(I); subplot(1,2,2),imshow(J);
(2)灰度图像二值化
二值图像 = imbinarize(灰度图像)
%% 灰度图像二值化 I = imread(‘cameraman.tif‘); subplot(1,2,1),imshow(I); J = imbinarize(I); subplot(1,2,2),imshow(J);
标签:bin ima ram com mic rgb camera 图片 atl
原文地址:https://www.cnblogs.com/fengxb1213/p/12879446.html