Skip to content

Implementation of Quarter Laplacian Filter for Edge Aware Image Processing using the approach mentioned in the research paper added in the repository.

License

Notifications You must be signed in to change notification settings

ChiragVaghela10/quarter_laplacian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quarter Laplacian Filter

This repository implements Quarter Laplacian Filter for Edge Aware Image Processing using the approach mentioned in this paper.

Usage

Image smoothing is the fundamental operation in image processing. We use it to remove image details or noise in the image. While performing smoothing operation, it is needed to remove small gradients and preserve the large ones which is called edge preserving. This repository uses Laplasian filter originally obtained from diffusion equation.

Implementation

It is implemented using classical box filter method but instead of using entire Laplacian Kernel this method uses quarter of Laplacian Kernel.

Standard Laplacian Kernels are as follows:

[0,   1/4, 0  ]   [-1/16, 5/16, -1/16]   [1/12, 1/6, 1/12]
[1/4, -1,  1/4] , [5/16,  -1,    5/16] , [1/6,  -1,   1/6]
[0,   1/4, 0  ]   [-1/16, 5/16, -1/16]   [1/12, 1/6, 1/12]

This implementation uses right most Kernel which is the most isotropic kernel as mentioned in the paper. Therefore, the quarter Laplacian filters would be as follows:

     [1/3, 1/3, 0]        [0, 1/3, 1/3]        [0,   0,   0]        [0,     0, 0]
K1 = [1/3, -1,  0] , K2 = [0,  -1, 1/3]   K3 = [0,  -1, 1/3] , K4 = [1/3,  -1, 0]
     [0,   0,   0]        [0,   0,   0]        [0, 1/3, 1/3]        [1/3, 1/3, 0]

Installation

NOTE: Linux based OS or MacOS required to run this shell script.

  1. Clone the repository from git.

  2. Open the command line interface (CLI) of your OS and move to the project folder ICIP1_quarter_laplacian/ using cd command.

  3. Run the installation script using following command

    $ ./install.sh

this script will automatically create a new directory namely env_dir/ to create a virtual environment, activate that environment and install all the required library into that.

NOTE: If you get permission denied error while running this script, kindly run the command

$ chmod 755 install.sh
  1. Once the project is installed and environment is activated, main.py can be run using Python3 as follows

    $ python3 main.py [image_name]

It is important to note that we are using Python3 for the implementation purpose. Also, user can provide image name with its path as an optional parameter to main.py which will be considered as base original image and all operations will be performed on that image. If parameter is not provided, all smoothing operations will be performed on this standard camera-man image which is similar to the one shown in paper of ICIP1.

Authors

Chirag Vaghela

About

Implementation of Quarter Laplacian Filter for Edge Aware Image Processing using the approach mentioned in the research paper added in the repository.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published