Contrast enhancement for grayscale images


A grayscale image captures the intensity of light in pixels. In digital image processing, intensity values are discrete integers ranging from 0 as the lowest intensity or darkest, to 255 as the highest intensity or brightest. As opposed to RGB images with numerous color variations, disparity between darkness and brightness or namely contrast is the only distinguishing factor among pixels for grayscale images. Hence it is vital to have a good contrast to accurately capture information and better visualize features.

In this blog, we will deal with an example where contrast is low. We will then define histogram to measure and use a few techniques to enhance contrast. While aiming to capture edges as image feature, we will demonstrate the impact an image with a good contrast has on this process. Continue reading

OpenCV with extra modules

This blog details building an openCV using extra modules, mainly the opencv_contirb, in Windows.


  1. Download and install Visual Studio 2015 and CMake.
    NOTE: By default, C++ is not installed in Visual Studio 2015. After basic installation, modify the installation by following the path : Programming Language -> C++)
  2. Download and install the following Python packages to their default locations:

Continue reading

Image Filtering and Noise Reduction


In this blog, we will look at image filtering which is the first and most important pre-processing step that almost all image processing applications demand. The content is structured as following:

  1. In the context of noisy gray-scale images, we will explore the mathematics of convolution and three of the most widely used noise reduction algorithms.
  2. Next, we will analyze the pros and cons of each algorithm and measure their effectiveness by applying them to a test case.
  3. We will hence conclude by the defining parameters to look for when choosing between these three algorithms.

Continue reading