直方图匹配我需要编写一个函数,将的image2
直方图匹配可映射图像,让我们把它image1
。但我不允许使用histeq
。你能帮我用代码吗?MATLAB - 两幅图像
PS:我也想知道我会怎么做,如果操作我被允许使用histeq
?提取红绿蓝通道后应该怎么做? (我不能使用histeq(R2,R1)
?)
image1 = imread('color1.jpeg');
image2 = imread('color2.jpeg');
R1 = image1(:, :, 1);
G1 = image1(:, :, 2);
B1 = image1(:, :, 3);
R2 = image2(:, :, 1);
G2 = image2(:, :, 2);
B2 = image2(:, :, 3);
问候, 艾玛迪斯
我不明白'HnRed1'是在他的代码中。他在哪个区域跳过了哪些步骤? – Xentius
不知道,也许'hist(Red1)'? – BorisM
查看http://en.wikipedia.org/wiki/Histogram_equalization,它解释了'histq'的作用。 – BorisM