Giter VIP home page Giter VIP logo

imageproccesing_ex2's Introduction

Image Convolution and Edge Detection

Assignment number 2 in Computer Vision & Image Proccessing course. All tasks and functions were written in the ex2_utils.py file and they were all tested in the ex2_main.py file.


Using Python and the OpenCV library, implementation of:

  1. Convolution
  2. Image derivatives
  3. Image Blurring
  4. Edge detection via LoG zero-crossing
  5. Hough Circles
  6. Bilateral filter

Convolution

Comparing 2D Convolution Output to OpenCV

MSE: 0.00028858193628147563
Max Error: 0.4800071418285348

Image derivatives

Calculate gradient of an image. An image derivative - gradient - is defined as the change in the pixel value of an image.
Directions (angles) / Magnitude


Image Blurring

Image blurring is achieved by convolving the image with a low-pass filter kernel. It is useful for removing noise. It actually removes high frequency content (eg: noise, edges) from the image. So edges are blurred a little bit in this operation (there are also blurring techniques which don't blur the edges). Here we are blurring an image using a Gaussian kernel, my implementation.
OpenCV blurred My blurred

MSE:0.001328

Edge detection via LoG zero-crossing

In edge detection, we find the boundaries or edges of objects in an image, by determining where the brightness of the image changes dramatically. Edge detection can be used to extract the structure of objects in an image. If we are interested in the number, size, shape, or relative location of objects in an image, edge detection allows us to focus on the parts of the image most helpful, while ignoring parts of the image that will not help us. Detecting edges using "ZeroCrossingLOG" method - Zero-Crossing Detector Using the Laplacian of Gaussian (LoG) Filter
Comparing LoG zero-crossing Output to OpenCV


Hough Circles:

The circle Hough Transform (CHT) is a basic feature extraction technique used in digital image processing for detecting circles in imperfect images. The circle candidates are produced by “voting” in the Hough parameter space and then selecting local maxima in an accumulator matrix. Find Circles in an image using a Hough Transform algorithm extension.
Original Output Original Output

Time[Mine]: 43.060 sec [CV]: 0.051 sec Time[Mine]: 0.664 sec [CV]: 0.004 sec

Time[Mine]: 1.766 sec [CV]: 0.005 sec [Mine]: 2.415 sec [CV]: 0.001 sec

[Mine]: 3.333 sec [CV]: 0.006 sec

Bilateral filter

Original OpenCV Mine

MSE: 0.003615234375 Max Error: 4

imageproccesing_ex2's People

Contributors

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