CN109523603A - A kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage medium - Google Patents
A kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage medium Download PDFInfo
- Publication number
- CN109523603A CN109523603A CN201811240306.9A CN201811240306A CN109523603A CN 109523603 A CN109523603 A CN 109523603A CN 201811240306 A CN201811240306 A CN 201811240306A CN 109523603 A CN109523603 A CN 109523603A
- Authority
- CN
- China
- Prior art keywords
- path
- coloring
- image
- delineate
- delineating
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage mediums, and the method includes carrying out gray proces to selected digital image, obtain gray proces image;Edge detection is carried out to gray proces image, obtains image subject contour line;Image subject contour line is divided into several segments, acquisition is several to delineate path;According to each line weight value for delineating path, be arranged it is each delineate path delineate mode;According to preset gray threshold range, all pixels point in all image subject contour lines is clustered, obtains several coloring color lumps;Tiling arrangement is carried out by preset direction by the lines of preset length, establish every coloring path and determines the coloring number in each coloring path according to the gray value of each coloring color lump;According to the paint delineated path, delineate mode, coloring path and coloring number drafting selected digital image.It can be painted automatically by implementing the embodiment of the present invention and provide the paint of texturing methods or types of texture strokes style.
Description
Technical field
The present invention relates to computer fields, and in particular to a kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device
And storage medium.
Background technique
With the development of science and technology, intelligent robot is more and more extensive with field, also widely used in life
Intelligent robot, the robot that can be drawn a picture are also welcomed by the people.In the landscape painting of Chinese painting, the texturing methods or types of texture strokes is Chinese painting
One of presentation technique is the technique of painting for showing the train of thought texture of mountain stone, ridges and peaks and trunk epidermis.The main performance hand of early stage landscape painting
Method is to sketch the contours profile with lines, applies color later.With the development of drawing, for train of thought, lines, the matter of mountain stone trees in performance scenery with hills and waters
Ground, bumps, is supported or opposed at yin-yang, and the technique of writing of chapped wiping has been gradually formed, and profile is first ticked when drawing, then drawn, shape with light dry black side pen
At the unique specific term of Chinese painting " texturing methods or types of texture strokes ", it not only has the bearties in form such as itself lines, dynamics, skin texture, and scenery with hills and waters is simple and honest, empty
Spirit the inner beauties such as is unfolded and is also all lain among texturing methods or types of texture strokes form.The landscape painting that the appearance of the texturing methods or types of texture strokes indicates really moves to maturity.
Since 1100, with the continuous development of Chinese painting, the texturing methods or types of texture strokes, which has been evolved into from basic skill, has life essence
The artistic speech form of mind, it not only has independent aesthetic value, and with the development of the times, the texturing methods or types of texture strokes also embodies different times
Taste characteristic.The texturing methods or types of texture strokes is the artistic speech form that successive dynasties landscapist extract in the practice of knowledge nature good fortune, and
The system of complete set is formd in continuous development, to be provided with unique position, the texturing methods or types of texture strokes be in landscape painting skill and technique most
An importance for being worth research, also capable of most representing artist's orientation of aesthetics.
Therefore, the texturing methods or types of texture strokes drawing presentation technique for how allowing auto-portrait robot to grasp mountain stone in Chinese painting becomes auto-portrait robot
One, field is worth the project of research.
Summary of the invention
The present invention provides a kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage medium, can draw automatically
Draw the paint with texturing methods or types of texture strokes style.
First embodiment of the invention provides a kind of drawing method based on texturing methods or types of texture strokes style, comprising:
Selected digital image is obtained, and gray proces are carried out to the selected digital image, obtains gray proces image;
Edge detection is carried out to the image subject in the gray proces image, obtains image subject contour line;Wherein, institute
Stating includes several inflection points on image subject contour line;
Using each inflection point as cut-point, described image body profile line is divided into several segments, obtains several sub- profiles
Line, and path is delineated according to several sub- contour lines acquisitions are several;
According to each line weight value for delineating path, be arranged it is each it is described delineate path delineate mode;Wherein,
The mode of delineating includes: that paintbrush pushing height or lines delineate number;
The all pixels point gray value in described image body profile line is extracted, and according to preset gray threshold range,
The all pixels point is clustered, several coloring color lumps are obtained;
In each coloring color lump, tiling arrangement is carried out by preset direction by the lines of preset length, is established
The coloring path of each coloring color lump, and each coloring path is determined according to the gray value of each coloring color lump
Coloring number;
According to it is described delineate path, delineate mode, coloring path and colour number draw the selected digital image drawing make
Product.
Further, described that gray proces are carried out to the selected digital image, gray proces image is obtained, specifically:
It is calculated by the following formula the gray value of each pixel of the selected digital image, the selected digital image is carried out at gray scale
Reason obtains gray level image;
F (i, j)=0.30R (i, j)+0.59G (i, j)+0.11B (i, j);
Wherein f (i, j) is gradation conversion function, and i, j represent a pixel in the position of two-dimensional space vector, i.e., i-th
Row, jth column;R (i, j) is the i-th row, the R value in the rgb color mode of the pixel of jth column;G (i, j) is the i-th row, jth column
Pixel rgb color mode in G value;B (i, j) is the i-th row, the B value in the rgb color mode of the pixel of jth column.
It is further, described to delineate path according to several sub- contour lines acquisitions are several, specifically:
The angle between two adjacent cross-talk contour lines is calculated, it, will be described adjacent if the angle is less than preset value
Two cross-talk contour lines merge, and the contour line after merging is delineated path as one;Otherwise, directly by each sub- contour line
Path is delineated as one;Then it obtains and described several delineates path.
Optionally, described according to each line weight value for delineating path, each hook for delineating path is set
Picture mode, specifically:
It is determined according to the area ratio of each color lump area and drawing area for delineating path and each described delineates path
Line weight value;
Each line weight value for delineating path is compared with preset line weight value, is obtained each described
It delineates the corresponding paintbrush in path and pushes height;Wherein, the preset line weight value is, previously according to the area of drawing area
With pushing height when paintbrush drawing, the calculated different thickness values for pushing the lines sketched out corresponding to height.
Optionally, described according to each line weight value for delineating path, each hook for delineating path is set
Picture mode, specifically:
It is determined according to the area ratio of each color lump area and drawing area for delineating path and each described delineates path
Line weight value;
Each line weight value for delineating path is compared with preset line weight value, is obtained each described
It delineates the corresponding lines in path and delineates number;Wherein, the preset line weight value is, previously according to the area of drawing area
Number is delineated with lines when paintbrush drawing, calculated lines delineate the thickness value of the lines sketched out corresponding to number.
Further, described to delineate path according to, delineate mode, coloring path and the coloring number drafting selection of land
The paint of image, specifically:
According to it is each it is described delineate path and its it is corresponding delineate mode, draw each lines for delineating path, draw
Produce the profile diagram of the selected digital image;
According to the coloring path of each coloring color lump and corresponding coloring number, the profile diagram of the selected digital image is drawn
Inner vein then completes the drafting of the paint of the selected digital image.
Second embodiment is provided on the basis of first embodiment of the invention accordingly
Second embodiment of the invention provides a kind of picture-drawing device based on texturing methods or types of texture strokes style, comprising: image grayscale handles mould
Block, image subject edge detection module delineate path acquisition module, delineate mode determining module, color lump acquisition module, coloring road
Diameter and coloring number determining module and graphics module;
Wherein, described image gradation processing module carries out at gray scale for obtaining selected digital image, and to the selected digital image
Reason, obtains gray proces image;
Described image body rim detection module, for carrying out edge inspection to the image subject in the gray proces image
It surveys, obtains image subject contour line, wherein include several inflection points on described image body profile line;
The path of delineating obtains module, is used for using each inflection point as cut-point, by described image body profile line
It is divided into several segments, obtains several sub- contour lines, and delineate path according to several sub- contour lines acquisitions are several;
It is described to delineate mode determining module, for each institute to be arranged according to each line weight value for delineating path
State delineate path delineate mode;Wherein, the mode of delineating includes: that paintbrush pushing height or lines delineate number;
The color lump obtains module, for extracting all pixels point gray value in described image body profile line, and root
According to preset gray threshold range, all pixels point is clustered, obtains several coloring color lumps;
The coloring path and coloring number determining module, for passing through preset length in each coloring color lump
Lines carry out tiling arrangement by preset direction, the coloring path of each coloring color lump is established, and according to each described
The gray value of coloring color lump determines the coloring number in each coloring path;
The graphics module, for delineating path according to, delineating described in mode, coloring path and coloring number drafting
The paint of selected digital image.
Corresponding third embodiment of the invention provides a kind of drawing terminal device based on texturing methods or types of texture strokes style, including processing
It device, memory and is stored in the memory and is configured as the computer program executed by the processor, the processing
Device realizes the drawing method based on texturing methods or types of texture strokes style described in first embodiment of the invention when executing the computer program.
Corresponding fourth embodiment of the invention provides kind of a computer readable storage medium, the computer-readable storage medium
Matter includes the computer program of storage, wherein controls the computer readable storage medium in computer program operation
The equipment at place executes the drawing method based on texturing methods or types of texture strokes style described in first embodiment of the invention.
By implementing the embodiment of the present invention, have the advantages that:
The embodiment of the invention provides a kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage medium,
After carrying out gray proces to selected digital image, edge detection is carried out, the image subject contour line of selected digital image is extracted,
Then according to the inflection point on body profile line, image subject contour line is split, obtains several cross-talk contour lines, further according to
Sub- contour line acquisition delineates the several of image subject profile and delineates path, then according to the thickness value for delineating path, determines each
What section delineated path delineates mode;For the drawing inside image subject, first by all pixels point in image subject contour line
It is clustered according to the gray value of each pixel, several coloring color lumps is obtained, and then in each coloring color lump, by pre-
If the lines of length carry out tiling arrangement by preset direction, the coloring path of each coloring color lump is obtained, and according to each
The gray value of color color lump determines the coloring number in each coloring path, finally path and delineates mode according to above-mentioned delineate, draw
The profile of selected digital image main body is drawn to the texture inside image subject, further according to coloring path and coloring number to realize
Automatic drawing provides the paint of texturing methods or types of texture strokes style.
Detailed description of the invention
Fig. 1 is the drawing method flow diagram based on texturing methods or types of texture strokes style that first embodiment of the invention provides;
The image subject profile that the drawing method based on texturing methods or types of texture strokes style that Fig. 2 is provided by first embodiment of the invention is painted
Figure;
The drawing works effect that the drawing method based on texturing methods or types of texture strokes style that Fig. 3 is provided by first embodiment of the invention is painted
Figure;
Fig. 4 is the structural schematic diagram for the picture-drawing device based on texturing methods or types of texture strokes style that second embodiment of the invention provides;
Description of symbols: 201, image grayscale processing module;202, image subject edge detection module;203, road is delineated
Diameter obtains module;204, mode determining module is delineated;205, color lump obtains module;206, it colours path and coloring number determines mould
Block;207, graphics module.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Such as Fig. 1, a kind of drawing method based on texturing methods or types of texture strokes style that first embodiment of the invention provides includes:
S101, selected digital image is obtained, and gray proces is carried out to selected digital image, obtain gray proces image.
S102, edge detection is carried out to the image subject in gray proces image, obtains image subject contour line;Wherein,
It include several inflection points on image subject contour line.
S103, using each inflection point as cut-point, image subject contour line is divided into several segments, obtains several sub- contour lines,
And path is delineated according to several sub- contour lines acquisitions are several.
S104, according to each line weight value for delineating path, be arranged it is each delineate path delineate mode;Wherein, it hooks
Picture mode includes: that paintbrush pushing height or lines delineate number.
S105, all pixels point gray value in image subject contour line is extracted, and according to preset gray threshold range,
All pixels point is clustered, several coloring color lumps are obtained.
S106, in each coloring color lump, carry out tiling arrangement by preset direction by the lines of preset length, establish
The coloring path of each coloring color lump, and each coloring number for colouring path is determined according to the gray value of each coloring color lump.
S107, basis delineate path, delineate mode, coloring path and colour the paint that number draws selected digital image.
For step S101, optionally, selected digital image be can be, but not limited to as mountain stone landscape image.Selected digital image can be with
For the photograph of live shooting or the image obtained from the network media.
Preferably, it is calculated by the following formula the gray value of each pixel of selected digital image, selected digital image is carried out at gray scale
Reason obtains gray level image;
F (i, j)=0.30R (i, j)+0.59G (i, j)+0.11B (i, j);
Wherein f (i, j) is gradation conversion function, and i, j represent a pixel in the position of two-dimensional space vector, i.e., i-th
Row, jth column;R (i, j) is the i-th row, the R value in the rgb color mode of the pixel of jth column;G (i, j) is the i-th row, jth column
Pixel rgb color mode in G value;B (i, j) is the i-th row, the B value in the rgb color mode of the pixel of jth column.
Specifically, from the network media or being taken on site to mountain stone landscape image, calculated according to above-mentioned formula each in image
The gray value of pixel, value range 0-255 obtain the grayscale image of landscape image so that black-white-gray state is presented in image, from
And remove it is extra variegated in image, to improve the treatment effeciency of server.
Edge detection is carried out to the image subject in the stone image of mountain for step S102, specifically:, obtains selected mountain stone
The contour line of mountain stone in image, contour line at this time are irregular curves, and there are multiple inflection points.
For step S103, specifically: with the inflection point on the contour line of mountain stone in the stone image of mountain, as cut-point, by mountain
The contour line of stone is divided into several segments, obtains several cross-talk contour lines, and then, calculates the folder between two adjacent cross-talk contour lines
Angle merges two adjacent cross-talk contour lines if angle is less than preset value, and hooks the contour line after merging as one
Draw path;Otherwise, path directly is delineated using each sub- contour line as one;Then it obtains and several delineates path.
Preferably, preset value can be, but not limited to as any one value between 30 degree to 40 degree, specific value and can
It is adjusted according to the actual situation.Because traditional Chinese Painting is all the drafting of one section of one section of style of writing, by the way that the contour line of mountain stone is carried out
Segmentation forms so that the subsequent contour line to different sections carries out different processing and has discrepant style of writing.
It for step S104, is obtaining after several segments delineate path, according to each corresponding fringe region in path of delineating
The area ratio of color lump area and drawing area determines each line weight value for delineating path, further according to each line for delineating path
Thickness value, be arranged it is each delineate path delineate mode.
Preferably, the area of drawing area is the area of painting canvas or drawing paper.
Specifically, delineating there are two types of modes: it is optional, the first determine it is each delineate path to delineate mode as follows: will
Each line weight value for delineating path is compared with preset line weight value, and acquisition is each to delineate the corresponding paintbrush in path
Push height;Wherein, preset line weight value is that the pushing when area and paintbrush previously according to drawing area are painted is high
Degree, the calculated different thickness values for pushing the lines sketched out corresponding to height are preset according to picture in the actual operation process
The height pushed when size and the paintbrush drawing of cloth calculates lines when the corresponding paintbrush of 2~3 height delineates path
Thickness value sets 2~3 profile thickness value sections to correspond to the paintbrush pushing height for delineating path, according to obtained contour line
The thickness of item is worth pushing height when corresponding section setting paintbrush is started writing.
Optionally, second of determination it is each delineate path to delineate mode as follows:
Each line weight value for delineating path is compared with preset line weight value, acquisition is each to delineate path
Corresponding lines delineate number;Wherein, preset line weight value is, when the area and paintbrush previously according to drawing area are painted
Lines delineate number, and calculated lines delineate the thickness value of the lines sketched out corresponding to number.In actual operation, root
Corresponding 2~3 profiles of the thickness value for setting 2~3 sections according to the thickness value of lines delineate number, what thicker lines were delineated
Number is more.
The gray value of all pixels point of connected region inside mountain stone contour line, root are extracted for step S105, specifically:
According to multiple preset intensity value ranges, by all pictures of connected region inside the mountain stone contour line in same intensity value ranges
Vegetarian refreshments is clustered, and same color lump is classified as, to obtain several coloring color lumps.
For step S106, in each coloring color lump, by preset length lines by unified direction coloring color lump
Inside carries out tiling arrangement, obtains the coloring path of each color lump, further according to each coloring color lump gray value determine it is each
The coloring number in color path, such as: when presetting the section that gray value is 0-128, coloring number is 1 time, and gray value is
When 129-255, coloring number is 2 times, according to the gray value interval of each coloring color lump, to determine the coloring of each coloring color lump
Number.
For step S107, as shown in Figures 2 and 3, according to it is each delineate path and its it is corresponding delineate mode, draw every
One delineates the lines in path, draws out the profile diagram of selected digital image.
According to the coloring path of each coloring color lump and corresponding coloring number, the inside of the profile diagram of selected digital image is drawn
Texture then completes the drafting of the paint of selected digital image.
Specifically, obtained profile is delineated path, delineates mode, coloring path and coloring number, electric treatment letter is generated
Number control mechanical arm and more switching devices of configuration clamp different writing brushes, dip ink or pigment is painted, when drawing
The profile of mountain stone image is first drawn, then draws the texture of coloring coordinates measurement mountain stone image.
Second embodiment is provided on the basis of first embodiment of the invention accordingly.
As shown in figure 4, second embodiment of the invention provides a kind of picture-drawing device based on texturing methods or types of texture strokes style, comprising: image
Gradation processing module 201, image subject edge detection module 202 delineate path acquisition module 203, delineate mode determining module
204, color lump obtains module 205, coloring path and coloring number determining module 206 and graphics module 207;
Wherein, image grayscale processing module 201 carries out gray proces for obtaining selected digital image, and to selected digital image, obtains
To gray proces image;
Image subject edge detection module 202 is obtained for carrying out edge detection to the image subject in gray proces image
Image subject contour line is obtained, wherein includes several inflection points on image subject contour line;
It delineates path and obtains module 203, for image subject contour line being divided into several using each inflection point as cut-point
Section obtains several sub- contour lines, and delineates path according to several sub- contour lines acquisitions are several;
Mode determining module 204 is delineated, for according to each line weight value for delineating path, setting is each to delineate path
Delineate mode;Wherein, the mode of delineating includes: that paintbrush pushing height or lines delineate number;
Color lump obtains module 205, for extracting all pixels point gray value in image subject contour line, and according to default
Gray threshold range, all pixels point is clustered, obtain several coloring color lump;
Path and coloring number determining module 206 are coloured, for passing through the lines of preset length in each coloring color lump
Tiling arrangement is carried out by preset direction, establishes the coloring path of each coloring color lump, and according to the gray scale of each coloring color lump
Value determines the coloring number in each coloring path;
Graphics module 207 delineates path for basis, delineates mode, coloring path and coloring number drafting selected digital image
Paint.
Further, image grayscale processing module 201 obtains gray proces for carrying out gray proces to selected digital image
Image, specifically:
It is calculated by the following formula the gray value of each pixel of selected digital image, gray proces are carried out to selected digital image and obtain ash
Spend image;
F (i, j)=0.30R (i, j)+0.59G (i, j)+0.11B (i, j);
Wherein f (i, j) is gradation conversion function, and i, j represent a pixel in the position of two-dimensional space vector, i.e., i-th
Row, jth column;R (i, j) is the i-th row, the R value in the rgb color mode of the pixel of jth column;G (i, j) is the i-th row, jth column
Pixel rgb color mode in G value;B (i, j) is the i-th row, the B value in the rgb color mode of the pixel of jth column.
Further, it delineates path and obtains module 203, for delineating path, tool according to several sub- contour lines acquisitions are several
Body are as follows:
The angle between two adjacent cross-talk contour lines is calculated, if angle is less than preset value, by two adjacent cross-talk wheels
Profile merges, and the contour line after merging is delineated path as one;Otherwise, it is directly hooked each sub- contour line as one
Draw path;Then it obtains and several delineates path.
Optionally, mode determining module 204 is delineated, for being arranged each according to each line weight value for delineating path
That delineates path delineates mode, specifically:
Determine that each lines for delineating path are thick according to the area ratio of each color lump area and drawing area for delineating path
Thin value;
Each line weight value for delineating path is compared with preset line weight value, acquisition is each to delineate path
Corresponding paintbrush pushes height;Wherein, preset line weight value is, when the area and paintbrush previously according to drawing area are painted
Pushing height, the calculated different thickness values for pushing the lines sketched out corresponding to height.
Optionally, mode determining module 204 is delineated, for being arranged each according to each line weight value for delineating path
That delineates path delineates mode, can be with are as follows:
Determine that each lines for delineating path are thick according to the area ratio of each color lump area and drawing area for delineating path
Thin value;
Each line weight value for delineating path is compared with preset line weight value, acquisition is each to delineate path
Corresponding lines delineate number;Wherein, preset line weight value is, when the area and paintbrush previously according to drawing area are painted
Lines delineate number, and calculated lines delineate the thickness value of the lines sketched out corresponding to number.
Further, graphics module 207 delineate path for basis, delineate mode, coloring path and coloring number drafting
The paint of selection of land image, specifically:
According to it is each delineate path and its it is corresponding delineate mode, draw each lines for delineating path, draw out selected
The profile diagram of image;
According to the coloring path of each coloring color lump and corresponding coloring number, the inside of the profile diagram of selected digital image is drawn
Texture then completes the drafting of the paint of selected digital image.
3rd embodiment is provided on the basis of first embodiment of the invention accordingly.
Third embodiment of the invention provides a kind of drawing terminal device based on texturing methods or types of texture strokes style, comprising: processor, storage
It device and is stored in memory and is configured as the computer program executed by processor, processor executes real when computer program
The drawing method based on texturing methods or types of texture strokes style in the existing bright first embodiment of this law.
Fourth embodiment is provided on the basis of first embodiment of the invention accordingly.
Fourth embodiment of the invention provides kind of a computer readable storage medium, and computer readable storage medium includes storage
Computer program, wherein computer program operation when control computer readable storage medium where equipment execute this hair
The drawing method based on texturing methods or types of texture strokes style in bright first embodiment.
By implementing the embodiment of the present invention, have the advantages that:
The embodiment of the invention provides a kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage medium,
After carrying out gray proces to selected digital image, edge detection is carried out, the image subject contour line of selected digital image is extracted,
Then according to the inflection point on body profile line, image subject contour line is split, obtains several cross-talk contour lines, further according to
Sub- contour line acquisition delineates the several of image subject profile and delineates path, then according to the thickness value for delineating path, determines each
What section delineated path delineates mode;For the drawing inside image subject, first by all pixels point in image subject contour line
It is clustered according to the gray value of each pixel, several coloring color lumps is obtained, and then in each coloring color lump, by pre-
If the lines of length carry out tiling arrangement by preset direction, the coloring path of each coloring color lump is obtained, and according to each
The gray value of color color lump determines the coloring number in each coloring path, finally path and delineates mode according to above-mentioned delineate, draw
The profile of selected digital image main body is drawn to the texture inside image subject, further according to coloring path and coloring number to realize
Automatic drawing provides the paint of texturing methods or types of texture strokes style.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein being used as separate part description
Unit may or may not be physically separated, component shown as a unit may or may not be
Physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to the actual needs
Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention is implemented
In example attached drawing, the connection relationship between module indicates there is communication connection between them, specifically can be implemented as one or more
Communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can understand and real
It applies.
It is the preferred embodiment of the present invention above, it is noted that for those skilled in the art,
Various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as this hair
Bright protection scope.
Claims (9)
1. a kind of drawing method based on texturing methods or types of texture strokes style characterized by comprising
Selected digital image is obtained, and gray proces are carried out to the selected digital image, obtains gray proces image;
Edge detection is carried out to the image subject in the gray proces image, obtains image subject contour line;Wherein, the figure
As including several inflection points on body profile line;
Using each inflection point as cut-point, described image body profile line is divided into several segments, obtains several sub- contour lines, and
Path is delineated according to several sub- contour lines acquisitions are several;
According to each line weight value for delineating path, be arranged it is each it is described delineate path delineate mode;Wherein, described
The mode of delineating includes: that paintbrush pushing height or lines delineate number;
The all pixels point gray value in described image body profile line is extracted, and according to preset gray threshold range, by institute
It states all pixels point to be clustered, obtains several coloring color lumps;
In each coloring color lump, tiling arrangement is carried out by preset direction by the lines of preset length, is established each
It is described coloring color lump coloring path, and according to it is each it is described coloring color lump gray value determine it is each it is described coloring path
Color number;
According to it is described delineate path, delineate mode, coloring path and colour number draw the paint of the selected digital image.
2. the drawing method as described in claim 1 based on texturing methods or types of texture strokes style, which is characterized in that it is described to the selected digital image into
Row gray proces obtain gray proces image, specifically:
It is calculated by the following formula the gray value of each pixel of the selected digital image, gray proces are carried out to the selected digital image and are obtained
To gray level image;
F (i, j)=0.30R (i, j)+0.59G (i, j)+0.11B (i, j);
Wherein f (i, j) is gradation conversion function, and i, j represent a pixel in the position of two-dimensional space vector, i.e. the i-th row, the
J column;R (i, j) is the i-th row, the R value in the rgb color mode of the pixel of jth column;G (i, j) is the i-th row, the pixel of jth column
G value in the rgb color mode of point;B (i, j) is the i-th row, the B value in the rgb color mode of the pixel of jth column.
3. the drawing method as described in claim 1 based on texturing methods or types of texture strokes style, which is characterized in that described according to several sub- wheels
Profile acquisition is several to delineate path, specifically:
The angle between two adjacent cross-talk contour lines is calculated, if the angle is less than preset value, by described adjacent two sections
Sub- contour line merges, and the contour line after merging is delineated path as one;Otherwise, directly using each sub- contour line as
One delineates path;Then it obtains and described several delineates path.
4. the drawing method as described in claim 1 based on texturing methods or types of texture strokes style, which is characterized in that described described to be delineated according to each
The line weight value in path, be arranged it is each it is described delineate path delineate mode, specifically:
Each line for delineating path is determined according to the area ratio of each color lump area and drawing area for delineating path
Thickness value;
Each line weight value for delineating path is compared with preset line weight value, obtains each described delineate
The corresponding paintbrush in path pushes height;Wherein, the preset line weight value is, previously according to the area and picture of drawing area
Pushing height when pen drawing, the calculated different thickness values for pushing the lines sketched out corresponding to height.
5. the drawing method as described in claim 1 based on texturing methods or types of texture strokes style, which is characterized in that described described to be delineated according to each
The line weight value in path, be arranged it is each it is described delineate path delineate mode, specifically:
Each line for delineating path is determined according to the area ratio of each color lump area and drawing area for delineating path
Thickness value;
Each line weight value for delineating path is compared with preset line weight value, obtains each described delineate
The corresponding lines in path delineate number;Wherein, the preset line weight value is, previously according to the area and picture of drawing area
Lines delineate number when pen drawing, and calculated lines delineate the thickness value of the lines sketched out corresponding to number.
6. the drawing method as described in claim 1 based on texturing methods or types of texture strokes style, which is characterized in that described to delineate road according to
Diameter delineates mode, coloring path and colours the paint that number draws the selection of land image, specifically:
According to it is each it is described delineate path and its it is corresponding delineate mode, draw each lines for delineating path, draw out
The profile diagram of the selected digital image;
According to the coloring path of each coloring color lump and corresponding coloring number, the inside of the profile diagram of the selected digital image is drawn
Texture then completes the drafting of the paint of the selected digital image.
7. a kind of picture-drawing device based on texturing methods or types of texture strokes style characterized by comprising image grayscale processing module, image subject side
Edge detection module delineates path acquisition module, delineates mode determining module, color lump acquisition module, coloring path and coloring number
Determining module and graphics module;
Wherein, described image gradation processing module carries out gray proces for obtaining selected digital image, and to the selected digital image,
Obtain gray proces image;
Described image body rim detection module, for carrying out edge detection to the image subject in the gray proces image,
Image subject contour line is obtained, wherein includes several inflection points on described image body profile line;
The path of delineating obtains module, for using each inflection point as cut-point, described image body profile line to be divided into
Several segments obtain several sub- contour lines, and delineate path according to several sub- contour lines acquisitions are several;
It is described to delineate mode determining module, for each hook to be arranged according to each line weight value for delineating path
That draws path delineates mode;Wherein, the mode of delineating includes: that paintbrush pushing height or lines delineate number;
The color lump obtains module, for extracting all pixels point gray value in described image body profile line, and according to pre-
If gray threshold range, all pixels point is clustered, obtain several coloring color lump;
The coloring path and coloring number determining module, for passing through the line of preset length in each coloring color lump
Item carries out tiling arrangement by preset direction, establishes the coloring path of each coloring color lump, and according to each coloring
The gray value of color lump determines the coloring number in each coloring path;
The graphics module draws described select for delineating path according to, delineating mode, coloring path and coloring number
The paint of image.
8. a kind of drawing terminal device based on texturing methods or types of texture strokes style, including processor, memory and be stored in the memory and
It is configured as the computer program executed by the processor, the processor realizes such as right when executing the computer program
It is required that the drawing method based on texturing methods or types of texture strokes style described in any one of 1-6.
9. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes the calculating of storage
Machine program, wherein the equipment where controlling the computer readable storage medium in computer program operation executes such as
Drawing method as claimed in any one of claims 1 to 6 based on texturing methods or types of texture strokes style.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811240306.9A CN109523603B (en) | 2018-10-24 | 2018-10-24 | Drawing method and device based on chap style, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811240306.9A CN109523603B (en) | 2018-10-24 | 2018-10-24 | Drawing method and device based on chap style, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109523603A true CN109523603A (en) | 2019-03-26 |
CN109523603B CN109523603B (en) | 2022-12-02 |
Family
ID=65772950
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811240306.9A Active CN109523603B (en) | 2018-10-24 | 2018-10-24 | Drawing method and device based on chap style, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109523603B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109191539A (en) * | 2018-07-20 | 2019-01-11 | 广东数相智能科技有限公司 | Oil painting generation method, device and computer readable storage medium based on image |
CN110349231A (en) * | 2019-05-23 | 2019-10-18 | 广东智媒云图科技股份有限公司 | A kind of drawing method, electronic equipment, storage medium |
CN110570480A (en) * | 2019-07-19 | 2019-12-13 | 广东智媒云图科技股份有限公司 | Sketch drawing method of drawing robot, electronic equipment and storage medium |
CN110570497A (en) * | 2019-08-19 | 2019-12-13 | 广东智媒云图科技股份有限公司 | Drawing method and device based on layer superposition, terminal equipment and storage medium |
CN110751703A (en) * | 2019-10-22 | 2020-02-04 | 广东智媒云图科技股份有限公司 | Winding picture generation method, device, equipment and storage medium |
CN111027492A (en) * | 2019-12-12 | 2020-04-17 | 广东智媒云图科技股份有限公司 | Animal drawing method and device for connecting limb characteristic points |
WO2020228187A1 (en) * | 2019-05-16 | 2020-11-19 | 杭州睿琪软件有限公司 | Edge detection method and apparatus, electronic device and computer-readable storage medium |
CN112192562A (en) * | 2020-08-28 | 2021-01-08 | 珠海市一微半导体有限公司 | Drawing guiding method and chip of intelligent drawing robot and intelligent drawing robot |
CN112192563A (en) * | 2020-08-28 | 2021-01-08 | 珠海市一微半导体有限公司 | Painting control method and chip of intelligent painting robot and intelligent painting robot |
CN113139895A (en) * | 2021-04-29 | 2021-07-20 | 广州亿航智能技术有限公司 | Design method, terminal and storage medium for unmanned aerial vehicle formation performance matrix type graph |
CN113326819A (en) * | 2021-08-02 | 2021-08-31 | 佛山隆深机器人有限公司 | Robot sketch drawing method and device and robot workbench |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103129303A (en) * | 2011-11-23 | 2013-06-05 | 方强华 | Novel wrinkle method for Chinese landscape paintings and application thereof |
CN105678835A (en) * | 2015-11-23 | 2016-06-15 | 温州大学 | Modeling, drawing and rendering method for digital three-dimensional freehand Chinese brush landscape painting |
CN106846390A (en) * | 2017-02-27 | 2017-06-13 | 迈吉客科技(北京)有限公司 | A kind of method and device of image procossing |
CN108171650A (en) * | 2017-12-14 | 2018-06-15 | 华侨大学 | One kind has the function of that stroke optimizes Chinese flower ink and wash style stroke generation method |
US10008011B1 (en) * | 2014-11-26 | 2018-06-26 | John Balestrieri | Methods for creating a simulated watercolor-painted image from a source image |
-
2018
- 2018-10-24 CN CN201811240306.9A patent/CN109523603B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103129303A (en) * | 2011-11-23 | 2013-06-05 | 方强华 | Novel wrinkle method for Chinese landscape paintings and application thereof |
US10008011B1 (en) * | 2014-11-26 | 2018-06-26 | John Balestrieri | Methods for creating a simulated watercolor-painted image from a source image |
CN105678835A (en) * | 2015-11-23 | 2016-06-15 | 温州大学 | Modeling, drawing and rendering method for digital three-dimensional freehand Chinese brush landscape painting |
CN106846390A (en) * | 2017-02-27 | 2017-06-13 | 迈吉客科技(北京)有限公司 | A kind of method and device of image procossing |
CN108171650A (en) * | 2017-12-14 | 2018-06-15 | 华侨大学 | One kind has the function of that stroke optimizes Chinese flower ink and wash style stroke generation method |
Non-Patent Citations (1)
Title |
---|
卫琦: "一种树的三维水墨画风格非真实感绘制方法的研究与实现", 《中国优秀硕士学位论文全文库》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109191539B (en) * | 2018-07-20 | 2023-01-06 | 广东数相智能科技有限公司 | Oil painting generation method and device based on image and computer readable storage medium |
CN109191539A (en) * | 2018-07-20 | 2019-01-11 | 广东数相智能科技有限公司 | Oil painting generation method, device and computer readable storage medium based on image |
WO2020228187A1 (en) * | 2019-05-16 | 2020-11-19 | 杭州睿琪软件有限公司 | Edge detection method and apparatus, electronic device and computer-readable storage medium |
US11636604B2 (en) | 2019-05-16 | 2023-04-25 | Hangzhou Glorify Software Limited | Edge detection method and device, electronic equipment, and computer-readable storage medium |
CN110349231A (en) * | 2019-05-23 | 2019-10-18 | 广东智媒云图科技股份有限公司 | A kind of drawing method, electronic equipment, storage medium |
CN110349231B (en) * | 2019-05-23 | 2023-04-28 | 广东智媒云图科技股份有限公司 | Drawing method, electronic equipment and storage medium |
CN110570480A (en) * | 2019-07-19 | 2019-12-13 | 广东智媒云图科技股份有限公司 | Sketch drawing method of drawing robot, electronic equipment and storage medium |
CN110570480B (en) * | 2019-07-19 | 2023-03-24 | 广东智媒云图科技股份有限公司 | Sketch drawing method of drawing robot, electronic equipment and storage medium |
CN110570497A (en) * | 2019-08-19 | 2019-12-13 | 广东智媒云图科技股份有限公司 | Drawing method and device based on layer superposition, terminal equipment and storage medium |
CN110751703A (en) * | 2019-10-22 | 2020-02-04 | 广东智媒云图科技股份有限公司 | Winding picture generation method, device, equipment and storage medium |
CN110751703B (en) * | 2019-10-22 | 2023-05-16 | 广东智媒云图科技股份有限公司 | Winding picture generation method, device, equipment and storage medium |
CN111027492A (en) * | 2019-12-12 | 2020-04-17 | 广东智媒云图科技股份有限公司 | Animal drawing method and device for connecting limb characteristic points |
CN111027492B (en) * | 2019-12-12 | 2024-01-23 | 广东智媒云图科技股份有限公司 | Animal drawing method and device for connecting limb characteristic points |
CN112192563B (en) * | 2020-08-28 | 2021-08-24 | 珠海市一微半导体有限公司 | Painting control method and chip of intelligent painting robot and intelligent painting robot |
CN112192562B (en) * | 2020-08-28 | 2021-08-24 | 珠海市一微半导体有限公司 | Drawing guiding method and chip of intelligent drawing robot and intelligent drawing robot |
CN112192563A (en) * | 2020-08-28 | 2021-01-08 | 珠海市一微半导体有限公司 | Painting control method and chip of intelligent painting robot and intelligent painting robot |
CN112192562A (en) * | 2020-08-28 | 2021-01-08 | 珠海市一微半导体有限公司 | Drawing guiding method and chip of intelligent drawing robot and intelligent drawing robot |
CN113139895A (en) * | 2021-04-29 | 2021-07-20 | 广州亿航智能技术有限公司 | Design method, terminal and storage medium for unmanned aerial vehicle formation performance matrix type graph |
CN113326819A (en) * | 2021-08-02 | 2021-08-31 | 佛山隆深机器人有限公司 | Robot sketch drawing method and device and robot workbench |
CN113326819B (en) * | 2021-08-02 | 2021-11-05 | 佛山隆深机器人有限公司 | Robot sketch drawing method and device and robot workbench |
Also Published As
Publication number | Publication date |
---|---|
CN109523603B (en) | 2022-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109523603A (en) | A kind of drawing method based on texturing methods or types of texture strokes style, device, terminal device and storage medium | |
CN108038853B (en) | Ceramic tile surface defect identification method based on convolutional neural network and active learning | |
CN107423698B (en) | A kind of gesture estimation method based on convolutional neural networks in parallel | |
CN103699900B (en) | Building horizontal vector profile automatic batch extracting method in satellite image | |
CN106530309B (en) | A kind of video matting method and system based on mobile platform | |
CN102663788B (en) | Pen light-colored artistic effect drawing method based on unreality feeling | |
CN108682017A (en) | Super-pixel method for detecting image edge based on Node2Vec algorithms | |
CN104063890A (en) | Method for cartooning human face and system thereof | |
CN110246181A (en) | Attitude estimation model training method, Attitude estimation method and system based on anchor point | |
CN111161137A (en) | Multi-style Chinese painting flower generation method based on neural network | |
EP3822917A1 (en) | Using convolutional neural network style transfer to automate graphic design creation | |
CN102496180A (en) | Method for automatically generating wash landscape painting image | |
Zhao et al. | License plate location based on Haar-like cascade classifiers and edges | |
CN111127596B (en) | Incremental Voronoi sequence-based layered oil painting brush drawing method | |
CN106529432A (en) | Hand area segmentation method deeply integrating significance detection and prior knowledge | |
CN102147867A (en) | Method for identifying traditional Chinese painting images and calligraphy images based on subject | |
CN111046976A (en) | Virtual manicure try-on method based on deep learning | |
CN110097616A (en) | A kind of joint drawing method, device, terminal device and readable storage medium storing program for executing | |
CN108805139A (en) | A kind of image similarity computational methods based on frequency-domain visual significance analysis | |
CN113838158B (en) | Image and video reconstruction method and device, terminal equipment and storage medium | |
He | Application of local color simulation method of landscape painting based on deep learning generative adversarial networks | |
Zhao et al. | Research on the application of computer image processing technology in painting creation | |
CN110188600A (en) | A kind of drawing evaluation method, system and storage medium | |
CN103914840B (en) | A kind of human body contour outline extraction method for non-simple background | |
CN210072659U (en) | Image recognition module based on deep neural network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |