I need to write a function which will match the histogram of image2
to the image that will be remapped, let's call it image1
. But I am not allowed to use histeq
. Could you please help me with the code?
ps: Also I am wondering how would I do that operation if I were allowed to use histeq
? What should I do after extracting red-green and blue channels? (I could not use 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);
Regards, Amadeus