数字图像处理之在matlab中做彩色图像的加减乘除
图像与数做运算
clc; clear all;
A = imread(‘C:\Users\Administrator\Desktop\333.jpg’);
i = A - 66;
j = A + 36;
k = A*20;
l = A/5;
figure;
subplot(221),imshow(A);
subplot(223),imshow(i);
subplot(224),imshow(j);
figure;
subplot(221),imshow(A);
subplot(223),imshow(k);
subplot(224),imshow(l);
[注意每一次imshow之前都要有一句figure否则无法显示]
图片顺序分别为 原图;原图减去一个数;原图加上一个数