cartoonizing real images
Date: 2023-01-03 14:34:38
does anybody know we can translate from real image captured using cameras be converted to the cartoon space ?
Please note that my goal is not to create animations or the likes, but just to translate to "cartoon colors" if possible.
will simple requantization to a space where there is less quantization levels work Or some other specific transforms are better ?
any help will be useful, as I wasn't able to find any material on this.
Thnx in advance.
Answers:
Pyramid mean shift + outline of detected edges seems does the job.
The code:
cv::Mat segmented, gray, edges;
cv::pyrMeanShiftFiltering(input, segmented, 15, 40);
cv::cvtColor(segmented, gray);
cv::Canny(gray, edges, 150, 150);
cv::cvtColor(edges, edgesBgr, CV_GRAY2BGR);
cv::Mat result = bgr - edgesBgr;
Here is a result i got:
Details: OpenCV Tutorial Part 6