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.

Source Distribution

cartooner-0.0.2.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

cartooner-0.0.2-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page