LocalHistoEqualize method (Main Control)
Builder Syntax |
int LocalHistoEqualize(int nWidth, int nHeight, int nxExt, int nyExt, unsigned uType, unsigned uSmooth); |
Delphi Syntax |
Function LocalHistoEqualize (nWidth: L_INT; nHeight: L_INT; nxExt: L_INT; nyExt: L_INT; uType: L_UINT; uSmooth: L_UINT): L_INT; |
Overview |
Refer to Changing Brightness and Contrast |
Remarks
(Medical only) Linearizes the number of pixels locally in a bitmap, based on the specified color space. This can be used to bring out the detail in dark areas of an image, and smooth the edges between blocks.
This method applies the histogram equalizer locally on the image. The image is divided into local rectangles of dimension (nWidth, nHeight). The number of pixels inside each local rectangle are linearized according the histogram calculated for an extended rectangle around each local rectangle. The extended rectangles are of dimension
((nWidth+2 * nxExt) , ( nHeight + 2 * nyExt)).
For an example, see the following drawing:
A rectangle and its associated extension, where the histogram is calculated.
Use this method to bring out details in an image that has portions that are too dark or too bright. An example of this is a picture taken with a flashlight in a dark room. In such a picture, the subject receives good light while the background is very dark. The application of the local histogram brings out details, but creates a blocky artifact. Use uSmooth to reduce the blockiness of the result.
This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.
This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.
See Also