Adjust histogram of image to match N-bin histogram ofreference image
B = imhistmatch(A,Ref) example
B = imhistmatch(A,Ref,N) example
[B,hgram]= imhistmatch(___) example
B = imhistmatch(A,Ref) image A istransformed so that the histogram of the returned image B approximatelymatches the histogram of reference image Ref builtwith 64 (default value) equally spaced histogram bins. The returnedimage B will have no more than 64 discrete levels.
Images A and Ref canbe any of the permissible data types.
If both A and Ref aretruecolor RGB images, then each color channel of A ismatched independently to the corresponding color channel of Ref.
If A is a truecolor RGB imageand Ref is a grayscale image, then each channelof A is matched against the single histogramderived from Ref.
If A is a grayscale image, then Ref mustalso be a grayscale image.
Images A and Ref neednot be equal in size.