This tool converts your photo into a cartoon-like image
pip install cartooner
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
This cartoonizer uses K-means algorithm to cluster the histogram of image. The value K is auto selected by the method in this paper.