Skip to content

Deep-k-Shroti/Image_Processing_Laboratory_IITKGP

Repository files navigation

Image_Processing_Laboratory_IITKGP

##Image_Processing_Laboratory_IITKGP(DIP) Laboratory Spring 2016.

This repository contains all DIP Lab Assignments. The Experiment are written in C++ without using OpenCV library except for reading of image and GUI (trackbar/slider) Code written using Visual Studio 2010.

##Directories included
/Assignment1
/Assignment2
/Assignment3
/Assignment4
/Assignment5
Each directory includes the experiment problem statement(.pdf),README(.txt), TestImages, source code(.cpp) and report(.pdf).

##The list of experiments:

  1. BMP File Format
    Write C/C++ modular functions to read, diagonally flip, and then write BMP image files. All functions must support at least 24-bit RGB, and 8-bit grayscale image formats.

    1. ReadBMP:
      • Input: Filename of input image.
      • Output: BMP header structure, Image pixel array loaded onto memory.
    2. ConvertFlipGrayscale:
      • Input: Image pixel array.
      • Output: Grayscale-converted and diagonally flipped (transposed) pixel array.
      • Input: Filename of output (grayscale) image, BMP header structure, Image pixel array.
    3. WriteBMP:
      • Output: BMP file written on disk.
        Use the above functions to read a 256 × 256 24-bit RGB colored Lena image, and write it as an 8-bit grayscale onto a different file on the disk.
  2. Histogram Equalization and Matching
    Write C++/Image-J modular functions to

    1. Perform histogram equalization on the 512 × 512 grayscale lena_gray_dark.jpg image. Perform the same on other low-contrast, dark, normal (gray/colored) images.
    2. Perform histogram matching of the same images with respect to a standard image (e.g. lena.jpg).
      Display the histograms of the original image and the enhanced images and document the observations.
  3. Spatial Filtering
    Write C/C++ modular functions/subroutines to design spatial filters - mean, median, gradient, Laplacian, Sobel kernels (horizontal, vertical, diagonal) on a stack of grayscale images (say, 15 images per stack)
    Use OpenCV (or) ImageJ for image reading, writing and GUI development only. Use the OpenCV tracker (slider) functionality to show outputs for varying sizes of neighborhoods. You may have different sliders to select (i) Image (ii) Filter (iii) Neighborhood size

    1. Input: Path to the stack of images. Input stack should contain the (provided) noisy images, and may also contain the normal test images, e.g. jetplane.jpg, lake.jpg.
    2. Output: Filtered stack of images should be shown beside input stack in the same pane of GUI with a slider to vary filter/kernel size/change image.
  4. Frequency Filtering
    Write C++/Image-J modular functions to perform the following operations on the 512 × 512 grayscale test images, e.g. jetplane.jpg, lake.jpg.

    1. FFT2 (takes input image filename as the argument; gives 2D FFT coefficients as output)
    2. IFFT2 (takes 2D FFT coefficients as input argument; gives the back-projected/ reconstructed image as output)
    3. Perform Ideal, Gaussian, and Butterworth low-pass and high-pass filtering, taking cut-off frequency, F, and image filename as input arguments) respectively with
      • Ideal_LPF
      • Ideal_HPF
      • Gaussian_LPF
      • Gaussian_HPF
      • Butterworth_LPF
      • Butterworth_HPF
        Display the (shifted) magnitude spectrums of the input, the filter and the filtered output. You may make use of the tracker/slider function to choose images, filter types and cut-off frequencies.
  5. Morphological Operations
    Write C++/Image-J modular functions to perform the following operations on the given test image, ricegrains_mono.bmp. All functions must support binary images.
    Make separate functions for erosion, dilation, opening, and closing of binary images.

    1. ErodeBinary, DilateBinary
      • Input: Binary image, structuring element
      • Output: Eroded/dilated image
    2. OpenBinary, CloseBinary
      • Input: Binary image, structuring element
      • Output: Opened/closed image

##References

##Setup

  • Download the directory
  • Create a project Win32 Console Application in Visual studio.
  • Copy the folder files to the project.
  • Include the ".cpp" file as the source file.
  • Include necessary OpenCV libraries [https://www.youtube.com/watch?v=LNlnjBLPJd8]
  • Run the ".cpp" code

About

Digital Image Processing Laboratory Spring 2016

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages