image thumbnail


バージョン (2.08 KB) 作成者: Brett Shoelson
Operates on two images (grayscale, binary, or color), returning a histogram-matched version

ダウンロード 2.4K 件

更新 2016/9/1


[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.

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

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).


Brett Shoelson (2022). matchHistograms (, MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010a
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!