Skip to main content

This tool converts your photo into a cartoon-like image

Project description


This tool converts your photo into a cartoon-like image





pip install cartooner

how to use

from cartooner import cartoonize
import cv2
import os
import time

input_file = ... # input image file name
output_file = ... # output image file name
image = cv2.imread(input_file)
output = cartoonize(image)

cv2.imwrite(output_file, output)


  • numpy
  • scipy
  • opencv-python
pip install -r requirement.txt

How it works

This cartoonizer uses K-means algorithm to cluster the histogram of image. The value K is auto selected by the method in this paper.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cartooner, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size cartooner-0.0.2-py3-none-any.whl (6.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cartooner-0.0.2.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page