Image.normhist#
- Image.normhist() Self[source]#
Histogram normalisaton
- Returns:
normalised image
- Return type:
Imageinstance
Return a histogram normalized version of the image which highlights image detail in low-contrast areas of an image.
Examples
>>> from machinevisiontoolbox import Image >>> img = Image([[10, 20, 30], [40, 41, 42], [70, 80, 90]]) >>> img.normhist().A array([[ 0, 32, 64], [ 96, 128, 159], [191, 223, 255]], dtype=uint8)
Note
The histogram of the normalized image is approximately uniform, that is, all grey levels ae equally likely to occur.
Color images automatically converted to greyscale
References
Important
Uses OpenCV function
cv2.equalizeHistwhich accepts single-channel, CV_8U images.See also