GithubHelp home page GithubHelp logo

marr-hildreth-edge-detection's Introduction

marr-hildreth-edge-detection

In this project Marr-Hildreth edge detection is implemented to output a binary image of edge points.

Combines Laplacian with 2D Gaussian which is Laplacian of a Gaussian (LoG).

Algorithm:

  • Filter image with N x N Gaussian filter.
  • Compute Laplacian using 3 x 3 mask or kernel.
  • Find zero crossing of image from above step.

This filter text file will have the following format:

<rows> <columns>  
<H/ L>  
<mask values>  

The <H/L> part will either be H = high-pass filter or L = low-pass filter.

A (3 by 3) Gaussian filter would look like this:

3 3  
L  
1  2  1  
2  4  2  
1  2  1

A (3 by 3) Laplacian filter would look like this:

3 3  
H  
1  1  1  
1 -8  1  
1  1  1

Images to undergo edge detection are in inputDir, two filters laplacian and gaussian are in filterDir, after computation images are saved to outputDir.

The program takes three command line arguments

marrHildreth ./inputDir ./filterDir ./outputDir

Each image is blurred using the 3 x 3 Gaussian filter 9 times. This is approximately equivalent to filtering with a 9 x 9 filter. In other words, each image is blurred, and then the output of the previous blurring is used as the input to the next blurring. Then Laplacian filter is applied to the final output image of Gaussian blurring. Zero crossing points are computed for output image of Laplacian filter to get the final edge map. Finally, edge map is save to output directory.

marr-hildreth-edge-detection's People

Contributors

bharat1226 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.