完整代码:
clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
I=imread('1.png');%%此处导入自己需要检测的图片
[x,y,z]=size(I);
figure('Name','Processing Steps'),subplot(3,2,1), imshow(I),title('Image 1: Original Image');
I=uint8(I);
temp1=I;
half_intensity=I/2;
subplot(3,2,2), imshow(half_intensity),title('Image 2: Half Intensity Image');
Double_intensity=I*2;
subplot(3,2,3), imshow(Double_intensity),title('Image 3: Double Intensity Image');
temp2=