Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

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

 


Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com