我將 cameraman.tif 劃分為 3x3 塊,我想將 histeq 函式應用于所有這些 3x3 塊并嘗試獲取新影像。我需要在 MATLAB 上對這些 3x3 塊進行直方圖均衡的幫助。
I = imread("cameraman.tif");
for i = 2:3:255
for j = 2:3:255
B = I(i:i 2 , j:j 2);
J = double(B);
end
end
uj5u.com熱心網友回復:
嘗試這個:
img = imread('cameraman.tif');
fun = @(heq) histeq(heq.data)
b = blockproc(img,[3,3],fun);
figure, imshow(imtile([img b],[]));
結果
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/456519.html
上一篇:將陣列提升到一定功率的問題
