![]() |
Functions | |
void | imProcessExpandHistogram (const imImage *src_image, imImage *dst_image, double percent) |
void | imProcessEqualizeHistogram (const imImage *src_image, imImage *dst_image) |
Performs an histogram expansion based on a percentage of the number of pixels.
Percentage is used to obtain the amount of pixels of the lowest level and the highest level, relative to the total of pixels. The histogram is used an each level is summed while the result is less than the obtained amount from 0 (for the lowest level) and from the last level (for the highest). If it is zero, then only empty counts of the histogram will be considered.
Images must be (IM_BYTE, IM_SHORT or IM_USHORT)/(IM_RGB or IM_GRAY). Can be done in-place.
To expand the gamut without using the histogram, by just specifying the lowest and highest levels use the IM_GAMUT_EXPAND tone gamut operation (imProcessToneGamut).
im.ProcessExpandHistogram(src_image: imImage, dst_image: imImage, percent: number) [in Lua 5]
im.ProcessExpandHistogramNew(src_image: imImage, percent: number) -> new_image: imImage [in Lua 5]
Performs an histogram equalization.
Images must be (IM_BYTE, IM_SHORT or IM_USHORT)/(IM_RGB or IM_GRAY). Can be done in-place.
im.ProcessEqualizeHistogram(src_image: imImage, dst_image: imImage) [in Lua 5]
im.ProcessEqualizeHistogramNew(src_image: imImage) -> new_image: imImage [in Lua 5]