Image Enhancement Techniques using OpenCV - Python
Last Updated : 15 Jun, 2026
Image enhancement is the process of improving the quality and appearance of an image to make it more suitable for viewing, analysis or further processing. It helps highlight important details and correct imperfections present in an image.
Improve image contrast, sharpness and brightness.
Reduce noise, blur and unwanted distortions.
Enhance colors and visual details.
Improve image quality for analysis and interpretation.
Image Enhancement Techniques
1. Brightness and Contrast Adjustment
Brightness and contrast adjustment improves image visibility by controlling overall brightness and the difference between light and dark regions.
Brightness controls how light or dark an image appears.
Contrast controls the difference between bright and dark areas.
Proper adjustment helps reveal details and improve image quality.
OpenCV provides the cv2.addWeighted() function for this purpose.
Noise reduction is an image enhancement technique used to remove unwanted noise and improve image quality. It helps create smoother images while preserving important details.
Makes images easier to analyze and process.
OpenCV provides filters such as Median Blur and Gaussian Blur for noise reduction.
The cv2.medianBlur() function is particularly effective for removing salt-and-pepper noise.
Image resizing and scaling are used to change the dimensions of an image. They help fit images to specific sizes while maintaining acceptable image quality.
Used to enlarge or shrink an image.
Different interpolation methods help preserve image quality.
OpenCV provides the cv2.resize() function for resizing images.
Image inversion, also known as negative transformation, creates the negative of an image by reversing its pixel intensities. Dark pixels become light and light pixels become dark.
Converts an image into its negative representation.
Highlights certain details that may be less visible in the original image.
Performed by subtracting each pixel value from 255.
Histogram equalization is an image enhancement technique used to improve image contrast by redistributing pixel intensity values. It makes details in dark or low contrast regions more visible.
Improves visibility of details in low contrast areas.
Redistributes pixel intensities over a wider range.
OpenCV provides the cv2.equalizeHist() function for histogram equalization.
Image enhancement includes several other techniques that help improve image quality, extract useful information and prepare images for analysis.
Morphological Transformations: Used to modify the shape and structure of objects in an image through operations such as dilation, erosion, opening and closing.
Edge Detection: Identifies object boundaries by detecting sharp changes in pixel intensity using methods such as Canny, Sobel and Laplacian.
Color Correction: Adjusts color balance and intensity to produce more natural and visually appealing images.
Image Gradients: Highlights intensity changes in an image and is commonly used for edge detection and segmentation.
mage Cropping: Removes unwanted regions to focus on the important parts of an image.
Image Rotation: Changes the orientation of an image by rotating it through a specified angle.
Image Blending: Combines multiple images into a single image using weighted averaging techniques.
Image Thresholding: Converts an image into binary or segmented regions based on pixel intensity values.
Image Deblurring: Reduces blur caused by motion, camera shake or focus issues to improve image clarity.