MATLAB怎麼實現對圖象的分塊然後並且對各塊進行直方圖均衡

  • 作者:由 匿名使用者 發表于 攝影
  • 2022-09-04

MATLAB怎麼實現對圖象的分塊然後並且對各塊進行直方圖均衡超級瑪麗2019.04.13 回答

A=imread(‘D:\ebook\lena。bmp’);

A1=rgb2gray(A);

B1=A1(1:128,1:128);

B2=A1(129:256,129:256);

B3=A1(129:256,1:128);

B4=A1(1:128,129:256);

B11=histeq(B1);

B22=histeq(B2);

B33=histeq(B3);%%直方圖均衡化

>> figure

subplot(2,4,1),imshow(A1);

subplot(2,4,2),imshow(B1);

subplot(2,4,3),imshow(B2);

subplot(2,4,4),imshow(B3);

subplot(2,4,5),imshow(B4);

subplot(2,4,6),imshow(B11);%%直方圖均衡化結果

subplot(2,4,7),imshow(B22);%%直方圖均衡化結果

subplot(2,4,8),imshow(B22);%%直方圖均衡化結果

MATLAB怎麼實現對圖象的分塊然後並且對各塊進行直方圖均衡

Top