Convert image to color pencil sketch in OpenCV

I want to convert an image to a colored pencil sketch using OpenCV. And I read the page. I want to convert the image into a pencil sketch in OpenCV. The effect I'm looking for is similar to http://www.showandtell-graphics.com/photosketch.html I used color deviation by code

b_d = (b_2==255? 255: min(255, b_1*255 /(255- b_2)));        
g_d = (g_2==255? 255: min(255, g_1 *255/(255- g_2)));             
r_d = (r_2 ==255? 255: min(255, r_1 *255/(255- r_2)));  

It seems the work is not very good. Help pls.

+3
source share
1 answer

The general procedure is described in detail in the link that you gave us, so to achieve this effect you need 3 images.

Make a copy of the original image and convert it to shades of gray .

.

# 1 , # 2 , # 3 - .

# 3 ( ) . .

, , blend # 3 # 1.

? , this .

+6

All Articles