Skip to main content

This tool converts your photo into a cartoon-like image

Project description

Cartooner

This tool converts your photo into a cartoon-like image

Samples

input

output

install

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)

Dependences

  • 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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file cartooner-0.0.2.tar.gz.

File metadata

  • Download URL: cartooner-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for cartooner-0.0.2.tar.gz
Algorithm Hash digest
SHA256 198f89e61c72f066ba240756d0fb6f04dccbbcedc42d175cddd1d052c0ff465b
MD5 a5d6667eb8851f8082e4741a94676c7a
BLAKE2b-256 abcaed83226ad5f2dc933d7cf352d4893933eae79699b21e3a9db854223be956

See more details on using hashes here.

File details

Details for the file cartooner-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cartooner-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for cartooner-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 56c735be4cb8d8bda3863ca0c97d2d1a648b2bbb75dbe136fe011bb8b92597c7
MD5 4e5a71550d5af2591129e534c39b1261
BLAKE2b-256 fb05db4deea58f2258c94664f606bb1f5799b2208ce645f21a96678af111f263

See more details on using hashes here.

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