摘要 |
<p>Disclosed is a method for converting a picture into an oil painting. The present invention relates to the technical field of image processing. The method comprises: steps 1: performing Gaussian filtering on an input picture, extracting a brightness channel image of the filtered picture, and generating a direction flow graph according to the brightness channel image; step 2: drawing a first layer of the oil painting on blank canvas; and step 3, changing a filtering parameter, repeating the foregoing steps, overlapping and drawing another layer of single-layer oil painting on the basis of the oil painting of the previous layer, and obtaining a final oil painting result image after single-layer oil paintings are drawn for many times. The picture is filtered to different extents to obtain images with different blur degrees, and the oil painting is drawn in layers according to the blurred images. RGB values of pixels at joints between the oil paintings of different layers are greatly changed, and the RGB values of the oil painting of the same layer are continuous, so that a concavo-convex and layered picture is obtained, a final oil painting is highly layered, the effect of the oil painting is highlighted, and user requirements are greatly met.</p> |