Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Histogram Matching

A = imread('concordaerial.png');
Ref = imread('concordorthophoto.png');

B = imhistmatch(A,Ref);

I = imread('office_4.jpg');
ref = imread('office_2.jpg');
montage({I,ref})
title('Input Image (Left) vs Reference
Image (Right)');
J = imhistmatch(I,ref,'method','polynomial');
K = imhistmatch(I,ref,'method','uniform');
montage({J,K})
title('Histogram-Matched Image Using Polynomial Method
(Left) vs Uniform Method (Right)');

Multiple N Values Applied to RGB Images

A = imread('office_2.jpg'); % Dark Image


Ref = imread('office_4.jpg'); % Reference image
[B64, hgram] = imhistmatch(A, Ref, 64);
[B128, hgram] = imhistmatch(A, Ref, 128);
[B256, hgram] = imhistmatch(A, Ref, 256);

You might also like