File Exchange

image thumbnail

matchHistograms

version 1.0.0.1 (2.08 KB) by Brett Shoelson
Operates on two images (grayscale, binary, or color), returning a histogram-matched version

3 Downloads

Updated 01 Sep 2016

View License

[imOut, hist] = matchHistograms(img1,img2,nbins)
Matches the histogram of image1 to that of image 2, using the user-specified number of bins. Returns the histogram-matched image, as well as its histogram. Operates on two grayscale, two binary, or two color images.

INPUTS:
img1: the image to modify
img2: the image whose histogram is to be matched
nbins: number of histogram bins

OUTPUTS:
imgOut: the histogram-matched image
hist: the histogram of the output image

USAGE: this function works on two grayscale, two binary, or two color images. For color images, the number of color planes must match (i.e., size(img1,3) must match size(img2,3).

Cite As

Brett Shoelson (2020). matchHistograms (https://www.mathworks.com/matlabcentral/fileexchange/27396-matchhistograms), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Vairam, Might I suggest that you post your (specific) questions to CSSM?

Vairam

can you help how to use histogram and cumulative histogram function

anamica

anamica

anamica

hi !!! nice achievement..can u pls help me regarding the program of face recogniton using k-nearest neighbour classifier????/

Updates

1.0.0.1

Updated license

1.1.0.0

checking license.txt file to see if says MathWorks-sf

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux