Code Monkey home page Code Monkey logo

edges-detection's Introduction

Edges detection of an image using Numpy, PIL, Math and Requests packages

Project Status: Active โ€“ The project has reached a stable, usable state and is being actively developed.

One simple program using Python for detecting edges.
The following gist offers a program scaled in seven parts:

  1. Import Numpy and related packages
  2. Load image remotely and define scaling variables
  3. Create output image
  4. Convert image to grayscale
  5. Compute intensity convolution using a for loop
  6. Draw magnitude in black and white
  7. Print out input and output images

Getting Started

This Python program built in 21 lines helps you render edges from a given image. The below instructions will help you run this Python program on your local machine for development and testing purposes, as well as in third party sites hosted in the cloud.

  • (#) and (''') are used to comment the following gist.

Prerequisites

I am using Jupyter Notebook on localhost (Ubuntu 18.04 bionic).
You can use Python IDEs and code editors on remote servers (see Tips).

Tips

If you are not using Linux/Unix and still want to try this simple Python program:

Basic commands in Jupyter

  • Note that in Jupyter you add new lines by typing "b" from your keyboard whilst the notebook is opened.
  • Avoid runing the entire code in a single cell in order to understand the steps.
  • Use "ctrl + enter" to execute each line if you want to get the output.
  • Use "dd" outside a cell to delete it.
  • Use "a" outside a cell to add a new cell above it.
  • Use "b" outside as cell to add a new cell below it.
  • Running the last cell should execute the permutations as program output.

Running the tests

  • I used Ubuntu (18.04 bionic) to launch Jupyter Notebook on localhost.
  • Localhost instantiates while using $ jupyter notebook in the terminal.
  • Check if Jupyter is correctly installed: $ jupyter --version

Built With

  • Jupyter - An open source software for creating notebooks
  • Numpy - The fundamental package for scientific computing with Python
  • Math - Mathematical functions defined by the C standar
  • PIL - Create images, annotate, retouch existing ones
  • Requests - A non-GMO HTTP library for Python, safe for human consumption

Versioning

I used no vesioning system for this gist, which repos status is flagged as concept because it is intended to be a demo or POC (proof-of-concept).

Author

  • Isaac Arnault - Suggesting a way to render edges for specific images such as: coins, architecture images.

Practicum

Store the below image remotely (on your IDE / PC) and try to detect edges using Python.

parking.png

edges-detection's People

Contributors

isaacarnault avatar

Watchers

 avatar

Forkers

zivafajfar

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.