CN101853517A - Real image oil painting automatic generation method based on stroke limit and texture - Google Patents

Real image oil painting automatic generation method based on stroke limit and texture Download PDF

Info

Publication number
CN101853517A
CN101853517A CN 201010183613 CN201010183613A CN101853517A CN 101853517 A CN101853517 A CN 101853517A CN 201010183613 CN201010183613 CN 201010183613 CN 201010183613 A CN201010183613 A CN 201010183613A CN 101853517 A CN101853517 A CN 101853517A
Authority
CN
China
Prior art keywords
stroke
texture
oil painting
image
painting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 201010183613
Other languages
Chinese (zh)
Other versions
CN101853517B (en
Inventor
黄华
程威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN2010101836135A priority Critical patent/CN101853517B/en
Publication of CN101853517A publication Critical patent/CN101853517A/en
Application granted granted Critical
Publication of CN101853517B publication Critical patent/CN101853517B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The invention relates to a real image oil painting automatic generation method based on stroke limit and texture. In order to solve the problems of Hertzmann multi-layered drawing algorithm that the outline of an oil painting is not clear enough and the texture is not intense enough, the method cuts an image into different areas through a mean shift method, limits the growth of the strokes of the oil painting based on the cutting results, so that the outline of the drawing result is clear; a corresponding oil painting texture field is generated based on the strokes, visualized through a linear integral convolution (LIC) and synthesized with the oil painting result to construct the texture of the strokes of the oil painting so as to enhance the texture effect of the drawing result. Experiment results show that the method can significantly improve the stylish drawing effect of the image oil painting.

Description

A kind of true picture oil painting automatic generation method based on stroke restriction and texture
Technical field
The invention belongs to image processing method, a kind of true picture oil painting automatic generation method of specific design based on stroke restriction and texture.
Background technology
Aspect the oil painting stylizing of true picture, recent two decades comes, and the researchist has made some contributions.Haelberi has proposed a kind of method for drafting based on the stroke model, allows the user by creating a series of strokes that have been colored original true picture to be drawn, and this model need be set a large amount of man-machine interactively operation such as stroke size, shape, color.Litwinowicz has proposed a kind of automatic rendering algorithm based on stroke on Haelberi method basis, image division is become the impartial grid of size, be set by the user stroke size and length, gradient orthogonal directions with image is a stroke direction, in each grid, carry out stroke and arrange, generate the oil painting image.Hertzmann has proposed a kind of multilayer rendering model based on stroke, at first set up the gaussian pyramid reference image sequence by original image, then reference picture and painting canvas are divided into the impartial grid of size, color distortion decides the starting point and the color of stroke in the computation grid, the gradient information that calculates reference picture decides the trend of stroke, successively realize the layout of stroke on painting canvas from coarse to fine according to the stroke radius again, generate the oil painting image.Because it is relatively poor that multilayer is drawn precision, Hertzmann has proposed to be imported some weightings zones and image is done relaxative iteration improve the drafting precision by man-machine interactively.Guo etc. have proposed a kind ofly to extract typical stroke from sample oil painting image and make up stroke set, and study sample oil painting image style and artistic characteristics are finished the method for true picture oil painting stylizing.Lee etc. extract the movable information of image based on the continuous images sequence, according to the direction of the power decision stroke of movable information, with the sense of reality and the dynamically sense that strengthens expressive object.
Generally speaking, numerous generating in the disposal route of painting style picture by true picture, Hertzmann oil painting drafting framework does not need man-machine interactively, and multilayer is drawn the oil painting pattern and is met the process that the artist creates oil painting by hand, the oil painting stylizing image that generates has tangible oil painting feature, becomes the classical so far oil painting stylizing method based on true picture.
Summary of the invention
The purpose of this invention is to provide a kind of image oil painting stylizing that can make and generated respond well true picture oil painting automatic generation method based on stroke restriction and texture.
In order to achieve the above object, the technical solution used in the present invention is:
1) does convolution by original image with different convolution yardstick gaussian kernel and produce a series of gaussian pyramid reference pictures, carry out each layer reference that multilayer is drawn in the oil painting process as drawing, wherein gaussian kernel convolution yardstick is directly proportional with oil painting stroke radius size, and oil painting stroke radius size is followed successively by 8,4,2 pixel distances;
2) painting canvas image and the gaussian pyramid reference picture of working as anterior layer are divided into impartial grid, calculate color distortion (Euclidean distance with the pixel color value is weighed) total value of correspondence position pixel in each grid, if the color distortion total value has surpassed certain threshold value in the grid, new stroke starting point is then arranged in this grid, and newly the stroke starting point is the pixel position of correspondence position pixel color difference maximum in the grid;
3) be guidance with gradient information when the gaussian pyramid reference picture of anterior layer, in conjunction with the new stroke starting point that obtains, gradient orthogonal directions along stroke point moves when anterior layer stroke radius distance (each layer is followed successively by 8,4,2), follow original image average drifting (Mean Shift) segmentation result and be constraint, produce stroke system point sequence successively, these stroke system points are fitted to curve, are that strokes of pixel formation all in the anterior layer stroke size radius is worked as at the center with this curve;
4) be node with the stroke system point, stroke is divided into plurality of sections, give corresponding node identical gradient information each section pixel, the texture field of a stroke of structure;
5) repeating step 3) produce all strokes and on painting canvas, arranging at random, finish the oil painting of one deck and draw; Repeating step 4) produce all strokes corresponding texture field and adopt identical arrangement with stroke, the texture field of finishing one deck generates;
6) repeating step 5) oil painting of finishing each layer is successively drawn and the texture field of each layer generates;
7) adopt line integral convolution (LIC) method to do field visualized the texture field that obtains, adopt the three-dimensional illumination model of Phong to combine visualization result that obtains and the painting canvas image that obtains, introduce the oil painting texture for the painting canvas oil painting image that has obtained, generate final oil painting image.
In the production process of stroke system point sequence of the present invention, adopt the growth of original image Mean Shift segmentation result restriction stroke; Be stroke structure texture field, and generate final oil painting texture field, use the visual back of LIC to combine by the three-dimensional illumination model of Phong with the painting canvas oil painting image that generates, obtain final oil painting image, its detailed process is as follows:
(a) sign in inappropriate zone for the stroke lines mistake that prevents to produce, when producing the reference mark of curve stroke, using Mean Shift image partition method that original image is done cuts apart, whether the stroke reference mark of judging new generation according to the result of image segmentation belongs to same zone with first point of curve then, if the identical then new reference mark that produces keeps; If reference mark inequality then that should newly produce will not keep, and this stroke ends to generate subsequent control point;
(b) to each pixel of a stroke, the direction of setting it is the tangential direction of stroke curve, and the result after so making LIC visual can reflect the texture along stroke direction, in order to reduce calculated amount, adopts approximate data; Because only for working as anterior layer stroke radius size, adjacent strokes reference mark tangential direction changes little distance, therefore, is node with stroke skeleton reference mark, along stroke curve vertical direction this stroke overlay path is divided into plurality of sections between the adjacent strokes reference mark; With the node is reference, gives the gradient information identical with corresponding node for the pixel in each section, generates the texture field of a stroke thus;
Stroke is the same with successively placing, and also successively arranges in the texture field of corresponding stroke to generate, and obtains final oil painting texture field;
It is visual to use LIC to carry out the texture field that generates, and then obtains being used to make up the texture image of oil painting texture;
The field visualized result of LIC texture who generates is considered as the three-dimensional elevation information of oil painting texture, introduces the LIC texture for the oil painting of drawing by the Phong illumination model.
The present invention improves the Hertzmann method, uses Mean Shift method that image segmentation is become zones of different, is according to the growth that limits the oil painting stroke with the segmentation result, makes the drawing result clear-cut; To be combined to based on texture field LIC visualization result and the oil painting result that stroke generates, the texture of structure oil painting stroke makes that the drawing result texture is strong.
Description of drawings
Fig. 1 is the process flow diagram of Hertzmann oil painting drafting framework based on the true picture oil painting stylizing;
Fig. 2 is that Hertzmann framework oil painting is drawn the design sketch based on the true picture oil painting stylizing, and wherein Fig. 2 (a) is an original image, and Fig. 2 (b) draws the oil paint effect image for the Hertzmann framework;
Fig. 3 is the process flow diagram that the present invention is based on the true picture oil painting stylizing;
Fig. 4 is a Mean Shift image segmentation result synoptic diagram;
Fig. 5 is that wall scroll stroke reference mark generates synoptic diagram;
Fig. 6 is that wall scroll stroke texture field generates synoptic diagram;
Fig. 7 generates the white noise synoptic diagram;
Fig. 8 is a LIC streamline synoptic diagram;
Fig. 9 is a LIC texture synoptic diagram
Figure 10 is oil painting generative process and effect comparison synoptic diagram, Figure 10 (a) is an original image, Figure 10 (b) is a Hertzmann oil painting drafting framework result images, and Figure 10 (c) introduces image segmentation information to stroke restriction back result images, and Figure 10 (d) is a net result image behind the introducing LIC texture.
Embodiment
The present invention is described in detail below in conjunction with accompanying drawing.
Generally, the artist at first adopts comparatively coarse stroke to sketch the contours the general profile of oil painting in creation during oil painting, and the piecemeal details that adopts comparatively meticulous stroke to add oil painting is finished the creation of oil then.Simultaneously, oil painting is the vegetable oil filling colour with quick-dry type, and with paintbrush or draw that cutter makes on linen, cardboard or plank, therefore, the texture of oil painting is stronger.
Observe the drawing result of Hertzmann algorithm, can find that there are two problems in this algorithm: the oil painting stroke of generation is missed picture easily to different zones, makes the oil painting profile clear inadequately; Smooth region oil painting texture is strong inadequately.At above problem, the present invention improves the Hertzmann algorithm, uses Mean Shift method that image segmentation is become zones of different, is according to the growth that limits the oil painting stroke with the segmentation result, makes the drawing result clear-cut; To be combined to based on texture field LIC visualization result and the oil painting result that stroke generates, the texture of structure oil painting stroke makes that the drawing result texture is strong.Experimental result shows that the algorithm after the improvement can promote the drafting effect of image oil painting stylizing significantly.
Hertzmann oil painting drafting framework
Referring to Fig. 1, the multilayer rendering model based on stroke drafting oil painting that Hertzmann proposes is at first done convolution by original image and gaussian kernel and is produced a series of gaussian pyramid reference pictures, successively decreases according to the stroke radius then and successively carry out the oil painting drafting on painting canvas.Oil painting for each layer is drawn, and with painting canvas and the grid that is divided into equalization when the anterior layer reference picture, contrasts corresponding pixel points color distortion in each grid earlier, the starting point of new stroke on the decision painting canvas; Secondly be guidance with gradient information when the anterior layer reference picture, in conjunction with the new stroke starting point that obtains, gradient orthogonal directions along stroke point moves when anterior layer stroke radius distance, produce stroke system point sequence successively, these stroke system points are fitted to curve, are that all pixels that work as in the anterior layer stroke size radius at the center constitute a stroke with this curve; Produce all strokes and also on painting canvas, arrange at random, finish the oil painting of one deck and draw.In the same way, finish the oil painting of each layer successively and draw, generate final painting style and draw.
The gaussian pyramid reference image sequence
Hertzman oil painting drafting framework is successively drawn from big to small according to oil painting stroke radius.Generally can carry out three layers of drafting, and the stroke radius size is successively decreased by 8,4,2.In each layer drawing process, at first create a reference layer by fuzzy original image.Gaussian kernel and original image convolution can be realized this goal.
Note f is original input picture, f GBe the reference layer image behind the process Gaussian convolution:
f G ( x i ) = ∫ e - | x j - x i | 2 2 σ d 2 · f ( x j ) d x j ∫ e - | x j - x i | 2 2 σ d 2 · d x j - - - ( 1 )
In the formula (1), x iAnd x jBe two adjacent locations of pixels vectors; σ d=R DeltR l, σ dBe the convolution yardstick of gaussian kernel, wherein R lBe the stroke radius size of l layer oil painting when drawing, successively reduce R with the increase of the number of plies DeltBe the coefficient of control gaussian filtering nuclear size, R DeltBig more, it is abstract more fuzzy to generate reference layer, gets R here Delt=1.0.
Individual layer is drawn
After generating reference layer, the drafting of each layer oil painting all is made up of two subsequent processes.At first painting canvas and reference layer are compared,, determine whether need to arrange new stroke on the painting canvas in the zone that both differ greatly; Be the stroke starting point with the new stroke area coordinate of determining then, the gradient fields of combining image generates stroke and random sequence and play up all strokes on painting canvas for instructing, and finishes the drafting when anterior layer.
1) new stroke area coordinate determines
Determine to need on the painting canvas to arrange the zone of new stroke, at first will determine the difference between painting canvas and the reference layer.Image segmentation is become R here, Grid* R GridThe grid of size, wherein R Grid=R GridR l, R GridBe the grid coefficient, the control grid size is got R here Grid=1.0.Image grid difference A then ErrorBut through type (2) expression:
In the formula, (r Pi, g Pi, b Pi) be painting canvas cloth image f POn pixel, f PBefore ground floor is drawn was the image of any pure color; (r Gi, g Gi, b Gi) be reference layer f GOn pixel; A ErrormThe difference size in m grid for painting canvas image and reference layer.
If image grid difference is higher than a certain threshold value T, judge that then painting canvas needs to arrange new stroke in this grid.And with the pixel coordinate of correspondence position pixel color distortion maximum in this grid starting point as this stroke, color is as the color of this stroke.
2) generation of new stroke is arranged
Determining that the gradient fields of combining image generates the oil painting stroke after anterior layer is drawn the starting point of all new strokes.Utilize the Sobel operator can obtain the gradient information of image.The Sobel operator has two, and one is the detection level edge, and another is the detection of vertical edge, and each approaches a partial derivative, as the formula (3).
s y = - 1 0 1 - 2 0 2 - 1 0 1 s x = - 1 - 2 - 1 0 0 0 1 2 1 - - - ( 3 )
After getting access to image gradient information, the tangential direction along previous stroke reference mark, mobile R lDistance produces a back stroke reference mark, can produce a series of strokes reference mark successively.
Suppose that the gradient on the both direction at current stroke reference mark is respectively g xAnd g y, then produce the direction d at next stroke reference mark xAnd d yFor:
d x=-g y,d y=g x (4)
This is tangential direction place, a current stroke reference mark straight line, needs also to judge that whether its trend is consistent with the tangential direction at last stroke reference mark.The tangential direction that makes a last stroke skeleton point is D xAnd D y, if
d x□D x+d y□D y<0 (5)
Illustrate that this direction is opposite with the tangential direction at a last stroke reference mark, then should get the opposite direction of current tangential direction, promptly
d x=-d x,d y=-d y (6)
Be normalized to
(d x,d y)=(d x,d y)/(d x 2+d y 2) 1/2 (7)
In addition, in order to produce the oil painting stroke of different-style, introduce parameter f cTangential direction is done correction, thereby can adjust the degree of crook of stroke
(d x,d y)=f c□(d x,d y)+(1-f c)□(D x,D y) (8)
Obtained the generation direction at next stroke reference mark thus, can calculate the next stroke skeleton of this stroke point coordinate like this and be
(x,y)=(x+R□d x,y+R□d y) (9)
In order to strengthen the rationality that stroke generates, abide by the growth that following two constraint conditions stop stroke:
(1) when reference picture and painting canvas image correspondence position pixel color distance during, no longer produces follow-up stroke reference mark less than reference picture correspondence position pixel color and this stroke color difference;
(2) when the length of stroke surpasses the extreme length M that sets, no longer produce follow-up stroke reference mark.
After generating stroke reference mark sequence, use B-spline curves match stroke reference mark sequence, produce a stroke skeleton curve, from skeleton R lAll pixels in the distance range constitute this stroke jointly.With all pixels of this stroke at painting canvas f PThe pixel value of correspondence position replaces to the color of this stroke correspondence, promptly finishes this stroke at painting canvas f POn play up.The randomness of stroke is arranged in all strokes on the anterior layer painting canvas at random when strengthening artificial Freehandhand-drawing, finishes when the oil painting of anterior layer and draws.
Multilayer is drawn
After finishing the drawing process of preceding one deck, the current painting canvas image f that is obtaining POn the basis, with f PReference picture contrast with when anterior layer continues to finish the drafting when anterior layer.So finishing multilayer draws.Fig. 2 has provided a width of cloth true picture and corresponding Hertzman arithmetic result.
Observe Hertzmann framework oil painting drawing result, the stylized image of generation has tangible abstract sense, possesses the painting style artistic characteristics.But be not difficult to find the result of the generation part that also comes with some shortcomings.In Hertzmann oil painting drafting framework, the generation of oil painting stroke is at first calculated the corresponding pixel points color distortion by painting canvas and reference picture and is determined the stroke starting point in grid, and grow along the stroke tangential direction, produce a series of distortions of the facts by an official historian and draw the reference mark, match stroke reference mark generates the trunk skeleton of stroke; Reference mark curve with match is the center then, and all pixels in anterior layer stroke radius constitute the overlay path of this stroke jointly.Stop the generation of stroke by two constraint conditions: the length of oil painting stroke can not surpass certain length; The color distortion of painting canvas and reference picture corresponding pixel points is less than the color distortion of painting canvas and this stroke color.In the stroke generation model of this algorithm, be not similar to the range constraint that the outline that sketches the contours when the artist creates oil painting brings.Because the oil painting stroke generates end condition and retrains not enough robust, some stroke grows to non-reasonable zone, and profile is clear inadequately as a result to cause generating at last oil painting, and as in Fig. 2 (b), positions such as personage's eyes, face seem that stroke is too in disorder in performance.In addition, in manual creation oil painting process since the imbalance inconsistent and firmly size that the cut of brush, pigment are piled up etc. factor caused enriches texture and strong match volume, oil painting stroke in the Hertzmann oil painting drafting framework is the lines of a solid color, therefore the oil painting stylizing image texture that generates a little less than, in the bigger zone of color distortion, it can also be seen that the texture of stroke, in the little zone of color distortion, basically become a homochromy color lump, a little less than the texture sense.As in Fig. 2 (b), the picture background change color is very weak than the oil painting texture sense as a result that the zonule generates.
Based on above analysis to Hertzmann oil painting drafting framework, the present invention improves two problems that this framework exists.In oil painting stroke generative process, introduce the constraint of Mean Shift image segmentation, express to strengthen contours of objects; Use the texture field LIC visualization result that produces based on stroke to draw and introduce texture, promote oil painting texture texture as oil painting.The frame diagram that the present invention improves algorithm as shown in Figure 3.
Stroke based on image segmentation generates
Create by hand in the process of oil painting works the artist, need on painting canvas, to sketch the contours of earlier the general profile of works usually with lines.Can finish the moulding and the layout of the expressed object of works on the one hand, intuitively embody the general shape of expressing object visibly; On the other hand, do not upset for fear of moulding, artist normally piecemeal carries out that oil painting draws.In fact these profile lines are taking on the effect that painting canvas is divided into zones of different, prevent that the stroke picture is to different zones.
Usually, in a scene, the field color at same part place changes little, and image Segmentation Technology can will be formed different object pixels difference clusters to corresponding zones of different, that is to say that the normal conditions as a result of image segmentation are semantic.Therefore, can simulate artistical creative feature, image segmentation is become different zones, with the border the cut apart profile as drawing process, and restriction oil painting stroke only generates in a zone, thereby prevents that stroke from signing in zones of different.
Mean Shift image segmentation is a kind of image segmentation mode based on non-parametric estmation.Depend on present great majority characteristics of image priori hypothesis is compared with the clustering algorithm of grasping, Mean Shift method is carried out cluster at the data set to any dimension, any distribution under the condition of priori, can obtain good segmentation result when applying to image segmentation.Therefore, the present invention chooses Mean Shift method and original image is done is cut apart, and obtains being used for the area dividing that stroke generates restriction.
For the multidimensional characteristic data set of any distribution form, can estimate its probability density function with the Parazon method.Wherein each data point is satisfying under the situation of certain condition, along the gradient direction drift iteration of its probability density function, must find a local probability density extreme point.Therefore, Mean Shift image partition method is formed space multidimensional data point with pixel color and coordinate, for each data point, by the iteration of repeatedly drifting about, converges to different cluster points.Difference according to cluster centre is divided into n class, and the class that quantity is too small is incorporated into other adjacent classes, the net result of formation image segmentation.The segmentation result of this paper Fig. 2 (a) as shown in Figure 4.
For the stroke lines that prevent to produce mistake is signed in inappropriate zone, when producing the reference mark of curve stroke, judge that whether the new reference mark that produces belongs to same zone with first point of curve, if the identical then new reference mark that produces keeps; If reference mark inequality then that should newly produce will not keep, and this stroke ends to generate subsequent control point.
In Fig. 5, provided a stroke and generated the reference mark synoptic diagram.P wherein 1For in grid, do the stroke starting point that the color distortion contrast is determined by reference picture and painting canvas, along p 1The gradient orthogonal directions, according to original stroke model, move when anterior layer stroke radius size distance, produce next stroke reference mark p 2Then from p 2Beginning in like manner produces follow-up serial stroke reference mark p successively 3..., p i, p I+1, p nIf after original image done image segmentation, a preceding i reference mark is not in a zone with back n-i.Draw to irrational zone for fear of stroke, the present invention uses Mean Shift image segmentation result to retrain the generation of stroke.Because p I+1..., p nStroke reference mark and stroke starting point p 1Not in same zone, then from p I+1Begin not regeneration of follow-up stroke reference mark, the structure control point that constitutes this stroke finally is p 1..., p iBehind the reference mark that has obtained this stroke, be the center with the reference mark curve of match, all pixels in anterior layer stroke radius constitute the overlay path of this stroke jointly.
Though the result of image segmentation generally is semantic, might not be smooth in zones of different boundary separatrix, there is more burr.Destroy the flatness of stroke for fear of this burr, expanded in the complete stroke process by stroke curve skeleton, stroke is freely expanded and is not subjected to region limits, to eliminate the influence of border burr, can guarantee the integrality when each bar stroke produces like this, strengthen the sense at random that stroke generates.Result after the improvement is shown in Figure 10 (c).
Texture based on LIC generates
Rely on the covering power and the transparency of pigment, oil painting can show rendered object fully, rich color, and match volume is strong.This match volume is also in close relations with the vestige texture that the draw tool that is adopted stays on painting canvas.
Therefore, can introduce suitable oil painting stroke texture, to promote the drafting effect of oil painting stylizing.
LIC is a kind of vector field visualization technique, and it is by doing convolution along grain direction to white noise with low-pass filter, and its result can embody the texture of streamline.Observe the oil painting stroke texture of artist's creation, the field visualized texture of LIC is very similar to the texture that the oil painting stroke is sketched the contours.Therefore, the present invention at first generates a texture field pattern based on the oil painting stroke in conjunction with the drawing process successively of oil painting, use the LIC method to do visual then to this texture field, and be combined to former result, to make up the texture that painting style is drawn, promote the effect of oil painting stylizing.
The generative process of any stroke all is the skeleton reference mark that obtains stroke earlier, becomes skeleton curve with the matched curve of skeleton reference mark then, is that the overlay path that all pixels in the anterior layer stroke radius constitute this stroke is worked as at the center with the skeleton curve.In the stroke generative process, generated the texture field of a stroke accordingly.Because the field visualized technology of LIC can embody the internal direction structure of appearance, therefore to each pixel of a stroke, the direction of setting it is the tangential direction of stroke curve, and the result after so making LIC visual can reflect the texture along stroke direction.In order to reduce calculated amount, adopt a kind of approximate data here, as shown in Figure 6.Because only for working as anterior layer stroke radius size, adjacent strokes reference mark tangential direction changes little distance, therefore, is node with stroke skeleton reference mark, along stroke curve vertical direction this stroke overlay path is divided into plurality of sections between the adjacent strokes reference mark; With the node is reference, gives the gradient information identical with corresponding node for the pixel in each section, generates the texture field of a stroke thus.
Carry out in the process of multilayer drafting at the Hertzmann drafting framework, stroke is the same with successively placing, and also successively arranges in the texture field of corresponding stroke to generate, and obtains final oil painting texture field.
It is visual to use LIC to carry out the texture field that generates, and then obtains being used to make up the texture image of oil painting texture.At first do binaryzation and generate a white noise sound spectrogram, as shown in Figure 7 according to input value at random; To every bit on the image, be guidance then, get the dot generation streamline successively along the positive and negative direction of this point vector, as shown in Figure 8 with pixel region field information; At last the white noise value and the low-pass filter convolution kernel of all pixel correspondences on the streamline are done convolution, the result who obtains is as the pixel value of output texture.As shown in Figure 9.
Synthesizing of oil painting texture
The present invention introduces the LIC texture by the Phong illumination model for the oil painting of drawing.The Phong illumination model is a three-dimensional illumination model, regards the reflection of the light of body surface as reflection of ambient light, light source diffuse reflection and light source direct reflection three's combination, and its mathematic(al) representation as the formula (10).
Figure GDA0000021762400000141
Wherein, I is the final intensity of illumination of body surface, A ColorBe ambient lighting intensity, A CoeffBe ambient lighting intensity reflection coefficient, D ColorBe body surface light scattering intensity, the color of body surface material just, D CoeffBe body surface light scattering intensity reflection coefficient, L ColorBe incident illumination intensity, S ColorFor direct reflection is looked after intensity, S CoeffFor minute surface is looked after the intensity reflection coefficient anyway, N is the normal vector of body surface, L iBe the vector of i light source of body surface point sensing, R is the direct reflection direction vector, can be calculated by R=2N (N L), and V is the direction of visual lines vector.
In the present invention, the field visualized result of LIC texture who generates is considered as the three-dimensional elevation information of oil painting texture, therefore, the gradient of trying to achieve the LIC texture maps is the normal vector N on oil painting surface.Generate the D of formula on the correspondence as a result based on the oil painting of stroke restriction Color, the color of body surface material just.Normal conditions, other parameters are set to fixed constant, A Color=(1.0,1.0,1.0), A Coeff=0.9, D Coeff=0.3, L Color=(1.0,1.0,1.0), S Color=(1.0,1.0,1.0), S Coeff=0.2, i=1, light source position coordinate are (0.0,0.0,300.0), and the observation place coordinate is (0.0,0.0,300.0).。In this way, be input with the field visualized result of LIC texture who generates, draw for oil painting and introduce texture, the result is shown in Figure 10 (d).

Claims (2)

1. true picture oil painting automatic generation method based on stroke restriction and texture may further comprise the steps:
1) does convolution by original image with different convolution yardstick gaussian kernel and produce a series of gaussian pyramid reference pictures, carry out each layer reference that multilayer is drawn in the oil painting process as drawing, wherein gaussian kernel convolution yardstick is directly proportional with oil painting stroke radius size, and oil painting stroke radius size is followed successively by 8,4,2 pixel distances;
2) painting canvas image and the gaussian pyramid reference picture of working as anterior layer are divided into impartial grid, calculate color distortion (Euclidean distance with the pixel color value is weighed) total value of correspondence position pixel in each grid, if the color distortion total value has surpassed certain threshold value in the grid, new stroke starting point is then arranged in this grid, and newly the stroke starting point is the pixel position of correspondence position pixel color difference maximum in the grid;
3) be guidance with gradient information when the gaussian pyramid reference picture of anterior layer, in conjunction with the new stroke starting point that obtains, gradient orthogonal directions along stroke point moves when anterior layer stroke radius distance (each layer is followed successively by 8,4,2), follow original image average drifting (Mean Shift) segmentation result and be constraint, produce stroke system point sequence successively, these stroke system points are fitted to curve, are that strokes of pixel formation all in the anterior layer stroke size radius is worked as at the center with this curve;
4) be node with the stroke system point, stroke is divided into plurality of sections, give corresponding node identical gradient information each section pixel, the texture field of a stroke of structure;
5) repeating step 3) produce all strokes and on painting canvas, arranging at random, finish the oil painting of one deck and draw; Repeating step 4) produce all strokes corresponding texture field and adopt identical arrangement with stroke, the texture field of finishing one deck generates;
6) repeating step 5) oil painting of finishing each layer is successively drawn and the texture field of each layer generates;
7) adopt line integral convolution (LIC) method to do field visualized the texture field that obtains, adopt the three-dimensional illumination model of Phong to combine visualization result that obtains and the painting canvas image that obtains, introduce the oil painting texture for the painting canvas oil painting image that has obtained, generate final oil painting image.
2. the true picture oil painting automatic generation method based on stroke restriction and texture as claimed in claim 1 is characterized in that: in the production process of stroke system point sequence, adopt the growth of original image Mean Shift segmentation result restriction stroke; Be stroke structure texture field, and generate final oil painting texture field, use the visual back of LIC to combine by the three-dimensional illumination model of Phong with the painting canvas oil painting image that generates, obtain final oil painting image, its detailed process is as follows:
(a) sign in inappropriate zone for the stroke lines mistake that prevents to produce, when producing the reference mark of curve stroke, using Mean Shift image partition method that original image is done cuts apart, whether the stroke reference mark of judging new generation according to the result of image segmentation belongs to same zone with first point of curve then, if the identical then new reference mark that produces keeps; If reference mark inequality then that should newly produce will not keep, and this stroke ends to generate subsequent control point;
(b) to each pixel of a stroke, the direction of setting it is the tangential direction of stroke curve, and the result after so making LIC visual can reflect the texture along stroke direction, in order to reduce calculated amount, adopts approximate data; Because only for working as anterior layer stroke radius size, adjacent strokes reference mark tangential direction changes little distance, therefore, is node with stroke skeleton reference mark, along stroke curve vertical direction this stroke overlay path is divided into plurality of sections between the adjacent strokes reference mark; With the node is reference, gives the gradient information identical with corresponding node for the pixel in each section, generates the texture field of a stroke thus;
Stroke is the same with successively placing, and also successively arranges in the texture field of corresponding stroke to generate, and obtains final oil painting texture field;
It is visual to use LIC to carry out the texture field that generates, and then obtains being used to make up the texture image of oil painting texture;
The field visualized result of LIC texture who generates is considered as the three-dimensional elevation information of oil painting texture, introduces the LIC texture for the oil painting of drawing by the Phong illumination model.
CN2010101836135A 2010-05-26 2010-05-26 Real image oil painting automatic generation method based on stroke limit and texture Expired - Fee Related CN101853517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101836135A CN101853517B (en) 2010-05-26 2010-05-26 Real image oil painting automatic generation method based on stroke limit and texture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101836135A CN101853517B (en) 2010-05-26 2010-05-26 Real image oil painting automatic generation method based on stroke limit and texture

Publications (2)

Publication Number Publication Date
CN101853517A true CN101853517A (en) 2010-10-06
CN101853517B CN101853517B (en) 2011-11-16

Family

ID=42804982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101836135A Expired - Fee Related CN101853517B (en) 2010-05-26 2010-05-26 Real image oil painting automatic generation method based on stroke limit and texture

Country Status (1)

Country Link
CN (1) CN101853517B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254332A (en) * 2011-07-25 2011-11-23 康佳集团股份有限公司 Oil painting generating method and system based on mobile terminal
CN102542593A (en) * 2011-09-30 2012-07-04 中山大学 Interactive video stylized rendering method based on video interpretation
CN102938157A (en) * 2012-10-31 2013-02-20 郑博研 Method and system for generating stylized freehand sketching based on circular region B spline curves
CN103400353A (en) * 2013-08-02 2013-11-20 成都品果科技有限公司 Method for converting picture into oil painting
CN103606176A (en) * 2013-11-25 2014-02-26 北京理工大学 Two-dimension flow field directionality sparse texture synthesis method with reinforced feature
CN104820963A (en) * 2015-04-24 2015-08-05 云南大学 Scratch-based Yunnan out-of-print woodcut digital simulation synthesis method
CN106327422A (en) * 2015-07-01 2017-01-11 北京大学 Image stylized reconstruction method and device
CN106650871A (en) * 2015-10-30 2017-05-10 北京柯斯元科技有限公司 Method for identifying random texture anti-counterfeiting label
CN107833225A (en) * 2017-10-18 2018-03-23 中南民族大学 Feature based drives the image partition method and system of heuristic four colour codes label
CN109191539A (en) * 2018-07-20 2019-01-11 广东数相智能科技有限公司 Oil painting generation method, device and computer readable storage medium based on image
CN111127596A (en) * 2019-11-29 2020-05-08 长安大学 Incremental Voronoi sequence-based layered oil painting brush drawing method
CN112734874A (en) * 2021-01-04 2021-04-30 厦门美图之家科技有限公司 Oil painting generation method and device, computer equipment and storage medium
CN113077477A (en) * 2021-03-19 2021-07-06 中山大学 Image vectorization method and device and terminal equipment
CN113935892A (en) * 2021-09-09 2022-01-14 完美世界(北京)软件科技发展有限公司 Oil painting style scene rendering method and equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6011536A (en) * 1998-04-17 2000-01-04 New York University Method and system for generating an image having a hand-painted appearance
CN1889125A (en) * 2006-07-26 2007-01-03 深圳市嘉易通医疗科技有限公司 Medical radiation image detail enhancing method
WO2008010707A1 (en) * 2006-07-18 2008-01-24 Ertain B.V. Image coloring device comprising a computer
CN101251893A (en) * 2008-03-28 2008-08-27 西安电子科技大学 Self-adapting multi-dimension veins image segmenting method based on wavelet and average value wander
CN101383008A (en) * 2008-10-23 2009-03-11 上海交通大学 Image classification method based on visual attention model
CN101540055A (en) * 2009-04-13 2009-09-23 浙江大学 Cartoon stylization method facing online real-time application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6011536A (en) * 1998-04-17 2000-01-04 New York University Method and system for generating an image having a hand-painted appearance
WO2008010707A1 (en) * 2006-07-18 2008-01-24 Ertain B.V. Image coloring device comprising a computer
CN1889125A (en) * 2006-07-26 2007-01-03 深圳市嘉易通医疗科技有限公司 Medical radiation image detail enhancing method
CN101251893A (en) * 2008-03-28 2008-08-27 西安电子科技大学 Self-adapting multi-dimension veins image segmenting method based on wavelet and average value wander
CN101383008A (en) * 2008-10-23 2009-03-11 上海交通大学 Image classification method based on visual attention model
CN101540055A (en) * 2009-04-13 2009-09-23 浙江大学 Cartoon stylization method facing online real-time application

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254332B (en) * 2011-07-25 2015-06-17 康佳集团股份有限公司 Oil painting generating method and system based on mobile terminal
CN102254332A (en) * 2011-07-25 2011-11-23 康佳集团股份有限公司 Oil painting generating method and system based on mobile terminal
CN102542593A (en) * 2011-09-30 2012-07-04 中山大学 Interactive video stylized rendering method based on video interpretation
CN102938157A (en) * 2012-10-31 2013-02-20 郑博研 Method and system for generating stylized freehand sketching based on circular region B spline curves
CN102938157B (en) * 2012-10-31 2015-08-05 郑博研 A kind of stylized Freehandhand-drawing based on disk B-spline curve generates method and system
CN103400353B (en) * 2013-08-02 2017-06-16 成都品果科技有限公司 A kind of method for converting picture into oil painting
CN103400353A (en) * 2013-08-02 2013-11-20 成都品果科技有限公司 Method for converting picture into oil painting
WO2015014130A1 (en) * 2013-08-02 2015-02-05 成都品果科技有限公司 Method for converting picture into oil painting
CN103606176A (en) * 2013-11-25 2014-02-26 北京理工大学 Two-dimension flow field directionality sparse texture synthesis method with reinforced feature
CN103606176B (en) * 2013-11-25 2016-03-30 北京理工大学 A kind of two-dimensional flow field directivity sparse texture synthetic method of Enhanced feature
CN104820963A (en) * 2015-04-24 2015-08-05 云南大学 Scratch-based Yunnan out-of-print woodcut digital simulation synthesis method
CN104820963B (en) * 2015-04-24 2018-01-23 云南大学 The digital simulation synthetic method of Yunnan alignment out of print based on indentation
CN106327422B (en) * 2015-07-01 2019-05-07 北京大学 A kind of image stylization method for reconstructing and device
CN106327422A (en) * 2015-07-01 2017-01-11 北京大学 Image stylized reconstruction method and device
CN106650871A (en) * 2015-10-30 2017-05-10 北京柯斯元科技有限公司 Method for identifying random texture anti-counterfeiting label
CN106650871B (en) * 2015-10-30 2022-04-22 北京柯斯元科技有限公司 Method for identifying random texture anti-counterfeiting mark
CN107833225A (en) * 2017-10-18 2018-03-23 中南民族大学 Feature based drives the image partition method and system of heuristic four colour codes label
CN107833225B (en) * 2017-10-18 2020-06-16 中南民族大学 Image segmentation method and system based on feature-driven heuristic four-color label
CN109191539A (en) * 2018-07-20 2019-01-11 广东数相智能科技有限公司 Oil painting generation method, device and computer readable storage medium based on image
CN111127596A (en) * 2019-11-29 2020-05-08 长安大学 Incremental Voronoi sequence-based layered oil painting brush drawing method
CN111127596B (en) * 2019-11-29 2023-02-14 长安大学 Incremental Voronoi sequence-based layered oil painting brush drawing method
CN112734874A (en) * 2021-01-04 2021-04-30 厦门美图之家科技有限公司 Oil painting generation method and device, computer equipment and storage medium
CN113077477A (en) * 2021-03-19 2021-07-06 中山大学 Image vectorization method and device and terminal equipment
CN113077477B (en) * 2021-03-19 2023-01-24 中山大学 Image vectorization method and device and terminal equipment
CN113935892A (en) * 2021-09-09 2022-01-14 完美世界(北京)软件科技发展有限公司 Oil painting style scene rendering method and equipment and storage medium

Also Published As

Publication number Publication date
CN101853517B (en) 2011-11-16

Similar Documents

Publication Publication Date Title
CN101853517B (en) Real image oil painting automatic generation method based on stroke limit and texture
CN101887366B (en) Digital simulation and synthesis technology with artistic style of Yunnan heavy-color painting
CN101587593B (en) Sketch stylization method based on real images
CN101853523A (en) Method for adopting rough drawings to establish three-dimensional human face molds
CN102509357B (en) Pencil sketch simulating and drawing system based on brush stroke
CN101930614B (en) Drawing rendering method based on video sub-layer
CN101339669A (en) Three-dimensional human face modelling approach based on front side image
CN103914862A (en) Pencil sketch simulating method based on edge tangent stream
Guo et al. Application of computer aided modeling design in the expression techniques of sculpture art space
WO2022179097A1 (en) Method and system for automatically constructing editable model of isogeometric topology optimization result
CN107730587A (en) One kind is based on picture quick three-dimensional Interactive Modeling method
CN106709171B (en) A kind of decalcomania generation method based on repeat pattern discovery
Tong et al. Sketch generation with drawing process guided by vector flow and grayscale
Lee et al. Hybrid embroidery: exploring interactive fabrication in handcrafts
Shesh et al. Efficient and dynamic simplification of line drawings
CN102572305A (en) Method and system for processing video image
CN103366395A (en) Volume data non-photorealistic rendering method based on GPU (graphic processing unit) acceleration
CN101799931B (en) Painting rendering method based on colour feature study
Wang et al. Free-form sketch
Igarashi et al. Computational design of iris folding patterns
CN108022288B (en) Three-dimensional sketch simulation method for point cloud object
Wu et al. A sketch-based interactive framework for real-time mesh segmentation
Yang et al. Binary image carving for 3D printing
Massarwi et al. craft from 3D polygonal models using generalized cylinders
CN111260755A (en) Digital tie-dyeing pattern generation method based on deep learning and digital image processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111116

Termination date: 20160526

CF01 Termination of patent right due to non-payment of annual fee