Giter Site home page Giter Site logo

cartoonize's Introduction

Cartoonize

Using opencv in computer vision, the model converts realtime images into cartoon effects. In order to get the basic cartoon effect, we used the bilateral filter and some edge dectection mechanism. The bilateral filter reduces the color palette, or the numbers of colors that are used in the image, which is essential for the cartoon look and edge detection is to produce bold silhouettes. The real challenge, however, lies in the computational cost of bilateral filters. We will thus use some tricks to produce an acceptable cartoon effect in real time.

We will adhere to the following procedure to transform an RGB color image into a cartoon:

  • Apply a bilateral filter to reduce the color palette of the image.
  • Convert the original color image into grayscale.
  • Apply a median blur to reduce image noise in the grayscale image.
  • Use adaptive thresholding to detect and emphasize the edges in an edge mask.
  • Combine the color image from step 1 with the edge mask from step 4.

Libraries Needed

  • Open cv
  • Numpy (optional)
  • Matplotlib

Run in Colab

Open In Colab

Transformed Pictures

The model was used on random pictures to test its efficiency

  • Image one Image one

  • Image two Image two

  • Image three Image three

  • Image four Image four

Git clone

Download and unzip this entire repository from GitHub, either interactively, or by entering the following in your Terminal.

https://github.com/jerryduncan/Cartoonize.git

cartoonize's People

Contributors

jerryduncan avatar

Stargazers

 avatar Francis Xavier Monari avatar Nishi avatar OSINTAI avatar Kristian Mariyanov avatar Kevinkicho avatar  avatar Lawrence Francis avatar

Watchers

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