Font Size: a A A

Color Consistency Based Color Pencil Drawing Generation

Posted on:2020-10-09Degree:MasterType:Thesis
Country:ChinaCandidate:F YuanFull Text:PDF
GTID:2518305981452864Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
Colored pencil drawing is an important primitive in non-photorealistic rendering,which can automatically convert a natural image into the artistic effect of pencil drawing.There are broad prospects and uses in the fields of film and social media.However,there are still some issues in the existing color pencil drawing generation algorithms:(1)the outline lines are not sufficiently prominent and even missing;(2)the picture details are not rich enough to display the layering of the original picture well;(3)contour does not match the color of the subject;(3)the hue is too saturated,and there is a case where the overall hue is not harmonious.This paper proposes a color pencil drawing generation technique for color consistency preservation,which extracts the outline and hue of the image separately,textures the tones,and then combines with the contour map to obtain the final result image.In the contour extraction,this paper considers the two key factors of the line position and color of the contour respectively.Considering that when the pencil draws the outline,the contour of the edge is thick and the gray value is relatively deep,while the contour with weak edge is thin and the gray value is relatively shallow,which is exactly the same as the gradient of the image.Therefore,the gradient operator of the image is extracted.The outline of the image,however,when calculating the gradient value of the image,there may be a large value at the non-edge position.In order to remove these noises,the Canny edge detection operator expands and acts as a mask on the gradient map,which can maintain the gradient value and width of the gradient at the edge,while simultaneously removing noise at non-edges.The color of the outline takes the color of the corresponding object in the image,but the pixels corresponding to the edges of the two objects may be taken when the color value is taken.In the pencil sketching surface,according to the far and near drawing method,the edge should be the contour of the foreground object,corresponding to the color of the foreground object.Therefore,this paper uses a depth map based on saliency to set the color of the pixel with a large depth value near the edge to the color of the foreground object with a small depth value,so as to achieve the effect that the color at the edge of the two objects is consistent with the color of the foreground object.In the color tone extraction,since the pencil drawing background color of the painter is usually higher than the actual picture brightness,this paper takes the Y component of the YUV color space as the processing object and divides each pixel in the original image by its Y value.The maximum Y value of its local area is taken as the converted brightness value.This local processing method improves the brightness value of the entire picture,and in most cases the conversion effect is also ideal,but some edges and shadows are not handled properly.If the brightness values on both sides of a certain edge are relatively large,the side with the smaller brightness value will be darker after adjustment.The shadow area is reversed since the brightness value of the entire shadow area in the original picture is relatively small,the brightness value after conversion becomes large.For these issues caused by local processing,this paper is based on two aspects from global optimization.1)The pixels with the same brightness value in the original picture should be the same after conversion.Since the value of the edge is small,the value of the shadow is too large,so the intermediate value is a relatively ideal choice;2)the brightness value in the original picture is similar.The pixel conversion should also be similar as well.This aspect can make the whole brightness value smooth.On the other hand,since most of the brightness values are ideal after conversion,it is also possible to correct those abnormal brightness values.Tone texture rendering,considering the artist in the process of drawing pencil painting,often through repeated painting in the same place to form the background texture,in order to simulate this process,this paper will render the background texture map through multiple regions to make it similar to the tone map.The experimental comparison and analysis with the related algorithms show that the pencil drawing outline lines generated by the algorithm are relatively clear and complete,the colors and corresponding objects are also more matched,and the whole image is more harmonious in color,which is close to the background color of the real pencil drawing.
Keywords/Search Tags:Color outline extraction, Tone rendering, Global information, Color pencil drawing, Color consistency
PDF Full Text Request
Related items