Giter Club home page Giter Club logo

deimos's Introduction

Deimos

Deimos is an experimental computer vision library in C

I am trying to distill my knowledge into a computer vision guide, which serves as an introductory guide to this field and goes into details about the algorithms implemented below. I welcome any suggestions/critiques, thanks!

Features

  • Geometric Transformations
    • Rotation
    • Scaling
    • Shearing/Warping
  • Smoothing
    • Gaussian filter
    • Median filter
    • Bilateral filter
    • Box filter
  • Edge detection
    • Unsharp mask
    • Laplacian Filter (Difference of Gaussian)
    • Sobel operator
  • Color
    • Greyscale
    • Contrast
  • Thresholding
    • Global
    • Otsu's Method
  • Feature extraction
    • Harris corner detection

Build (Make)

git clone [email protected]:aadv1k/deimos
cd deimos/
make

Build (without make)

If you don't have make on windows, you can instead use the build.bat, it gets the job done.

git clone [email protected]:aadv1k/deimos
cd deimos/
.\build.bat

Examples

Note The filters are un-optimized, they work best on smaller images

.\cv gray ..\data\img1.jpg .\output.png
.\cv sharpen --sigma 3 ..\data\img1.jpg .\output.png
.\cv blur --kernel 9 --sigma 5 ..\data\img1.jpg .\output.png

Usage

Usage:
  C:\Users\Aadv1k\Desktop\deimos\bin\deimos.exe <command> <args> input output

Examples:
  deimos blur --sigma 3.4 --kernel 5 input.png output.png
  deimos gray input.png output.png
  deimos median --kernel 3 input.png output.png
  deimos sharpen --sigma 0.6 --kernel 3 input.png output.png

Commands:
  Smoothing:
    blur, gaussian    Apply Gaussian blur to the image.
    median            Apply median filter to the image.
    bilateral         Apply bilateral filter to the image.
    box, mean         Apply box filter onto the image.

  Edge Detection:
    sobel             Apply Sobel filter to the image.
    laplacian         Apply Laplacian filter onto the image.
    sharpen           Sharpen image via an unsharp mask.

  Thresholding:
    global-threshold  Apply the global threshold filter over the image. 'sigma' would be the threshold.
    otsu-threshold    Apply Otsu's threshold filter over the image.

  Feature Extraction:
    harris-corners    Detect corners within the image via Harris corner detection.

  Transformations:
    rotate            Rotate the image by `sigma` deg.
    scale             Scale the image by sigma factor; if sigma is negative then downscale else upscale
    shear             Shear or skew the image at both axis by sigma factor.
    flipX             Horizontally mirror the image
    flipY             Vertically mirror the image

Color enhancements:
    gray              Convert image to grayscale.
    contrast          Increase/decrease contrast based on `sigma`

Other Commands:
    help              Print this help message.

Options:
  --sigma             Specify the primary modifier for the convolutions.
  --kernel            Define the kernel size for convolutions (if applicable).
  --no-threshold      Disable specifying a threshold for the sobel operator, default to setting gradient magnitude 

Gallery

Note this showcases only some of the many avaliable filters

Gaussian blur

.\bin\deimos blur --kernel 9 --sigma 3 .\data\img1.jpg .\img1-gaussian-3-9.png
Original Image Gaussian Blur
Original Image Gaussian Blur

Median filter

.\bin\deimos median --kernel 9 .\data\img1.jpg ..\output.jpg
Original Image Median Filter
Original Image Median Filter

Unsharp mask

.\bin\deimos sharpen --kernel 9 --sigma 1.2 .\data\img1.jpg ..\output.jpg
Original Image Unsharp Mask
Original Image Unsharp Mask

Laplacian filter

.\bin\deimos laplacian --kernel 3 --sigma 1.5 .\data\img1.jpg .\output.jpg
Original Image Laplacian Filter
Original Image Laplacian Filter

Otsu's Threshold

.\bin\deimos sobel otsu-threshold .\data\img1.jpg .\output.jpg
Original Image Otsu's threshold
Original Image Laplacian Filter

Sobel operator

.\bin\deimos sobel --no-threshold .\data\img1.jpg .\output.jpg
Original Image Sobel Operator
Original Image Laplacian Filter

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.