Giter Club home page Giter Club logo

python-canny-edge-detection's Introduction

Introduction

Edge Detection is one of the major study in computer vision. By detecting the edge of an image, image segmentation and data extraction can thus be performed which have great benefits in the area of image processing and machine learning for object detection.

In this project, a simple Canny Edge Detector is conducted by using numpy and pillow package with python, which is a multi-stage algorithm to detect a wide range of edges in images.Canny edge detector generally including the following steps:

  1. Gaussian Smoothing
  2. Sobel Operator
  3. Non-max suppression
  4. Thresholding
  5. Hough transform

The image are first requried to convert into grey scale. Second, Gaussian smoothing should be apply to the image to remove the details and noise of the image. Sopel operator thus is performed on the 2d image for spatial gradient measurement on an image so to emphasizes the regions of correspording edges.The results of the Sopel operator ideally will output all edges with different thickness thay may be connected. Weak edges therefore should be removed and convetering different think edges into lines for visualization which is done by non-max suppression and thresholding.

Results

Input Image: Demo_Img_1

RGB to Greyscale image: Demo_Img_2

Apply Gaussian smoothing: Demo_Img_3

x, y gradient after apply sobel operator: Demo_Img_4 Demo_Img_5

Magnitude gradient: Demo_Img_6

Non-max suppression: Demo_Img_7

Thresholding: Demo_Img_8

python-canny-edge-detection's People

Contributors

kwanwchan9 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.