CN107705346A - A kind of hand-drawing image sequential adding method based on stroke length and spatial information - Google Patents
A kind of hand-drawing image sequential adding method based on stroke length and spatial information Download PDFInfo
- Publication number
- CN107705346A CN107705346A CN201711085606.XA CN201711085606A CN107705346A CN 107705346 A CN107705346 A CN 107705346A CN 201711085606 A CN201711085606 A CN 201711085606A CN 107705346 A CN107705346 A CN 107705346A
- Authority
- CN
- China
- Prior art keywords
- hand
- stroke
- drawing image
- lines
- length
- 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.)
- Pending
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/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Processing Or Creating Images (AREA)
Abstract
The present patent application belongs to computer vision and area of pattern recognition, implements a kind of hand-drawing image sequential adding method based on stroke length and spatial information, and the timing information adding method comprises the following steps:Except making an uproar, lines refine for s1, the background of hand-drawing image;S2, the annexation established between adjacent model constraint pixel;S3, lines tracking is carried out, vector quantization preserves tracking lines;S4, comprehensive length information and locus, sequence is weighted for each stroke sequential;S5, the timing information according to stroke, repaint hand-drawing image.The beneficial effect of the inventive method is:1st, the method that context of methods is perceived based on locus and lines are followed the trail of, more accurately fits the stroke order in hand-drawing image;2nd, the drawing custom of the mankind is simulated, by comprehensive stroke order and stroke length weight, Temporal Order is added for general hand-drawing image database.3rd, after hand-drawing image vector quantization preserves, it can ensure that Image Zooming is undistorted.
Description
Technical field
The invention belongs to computer vision and area of pattern recognition, is related to the hand based on stroke length and picture space information
Draw as timing information adding method.
Background technology
Hand-drawing image is instrument very directly perceived and general for the mankind, has the abstractness and generality of height, from
Period in ancient times is just used to portray the reality scene present in the mankind.Hand-drawing image is usually to be made up of elements such as Points And lines, is painted
System is simple, and easy-to-understand.For the shopping at network of modernization, delineating by simple lines, it is possible to retrieve
Commodity like to user or desired, nothing with the addition of more quick and easy and fresh purchase experiences suspected of user.
At present, there are many databases applied to hand-drawing image research, such as Flickr15k image libraries, TU-Berlin hands
Paint the hand-drawing image database such as identification database and Sketchy Database.But the hand-drawing image in most of database
In be free from timing information.At the same time, by investigation, in the market newest and comparative maturity tool image
Vector Magic, although picture can be carried out to vectorized process and preserved, it can not separate stroke in hand-drawing image
Timing information.For another aspect, the boundary extraction method of image is directed to, the method for being all based on eight neighborhood boundary search.
But this kind of method, the lines extracted all do not include no any semantic or timing information generally, such method and carry
The error of the lines of taking-up is larger, and definition can be poor.
So from hand-drawing image, the stroke timing information for meeting the drafting behavior of most people is extracted, is a ratio
Relatively have challenge and it is novel the problem of.
In order to add timing information for hand-drawing image, it is necessary to which the behavior to people's drafting hand-drawing image carries out research and built
Mould, pass through our research:In addition to spatial information, also have in terms of stroke length of the people for drawing hand-drawing image potential
Freehandhand-drawing stress, therefore, it is necessary to design a hand-drawing image sequential adding method based on stroke length and spatial information,
To solve problem above.
The content of the invention
It is an object of the invention to propose a kind of hand-drawing image sequential adding method based on stroke length and spatial information,
It uses following scheme:
Hand-drawing image sequential adding method based on stroke length and spatial information, it uses following scheme:
Hand-drawing image sequential adding method based on stroke length and spatial information, includes the steps:
S1, for hand-drawing image, carry out noise remove, improve the definition of image.And then to lines in hand-drawing image
Carry out micronization processes;
S2, pixel adjoining modeling, simulate mankind's drawing behavior pattern, and the connection established between model constraint pixel is closed
System;
S3, using pixel syntople model lines tracking is carried out to the hand-drawing image that provides, by the stroke lines of tracking
Bar vector quantization preserves;
S4, the length based on every stroke and locus, are weighted sequence, are that each stroke assigns sequential letter
Breath;
S5, the timing information according to hand-drawing image, are again drawn hand-drawing image.
2nd, the hand-drawing image sequential adding method according to claim 1 based on stroke length and spatial information, its
It is characterised by, in the step s1, further comprises for the pretreatment operation of hand-drawing image:
S11, using Gauss Denoising Algorithm, filter and remove noise point scattered in hand-drawing image, improve the clear of picture
Degree.
S12, lines Refinement operation is carried out to the stroke in hand-drawing image, that is, is more than 2 lines for pixel wide,
1 pixel of width is refined as, Loss occurs when preventing follow-up stroke from following the trail of.
3rd, the hand-drawing image sequential adding method according to claim 2 based on stroke length and spatial information, its
It is characterised by, the step s2 further comprises:
S21, Image Rendering by observing and studying people custom, the drawing behavior of most people include following special
Point:(1) image is drawn with order from left to right;(2) the order general framework followed from top to bottom draws picture.
S22, people's drawing behavioral characteristic (1) and (2) is summarized, improve the model based on eight neighborhood edge following algorithm, as
Eight neighborhood syntople design between element is as follows:
As shown in Fig. 3 in Figure of description, change border lines tracking order, the first direction that lines are followed the trail of is set for the right side
Lower direction (marked as 0), the last direction of search are upper left (marked as 7).For all pixels in hand-drawing image, I
The lower right that can always take the lead in following the trail of pixel, the stroke lines order for ensureing to be obtained by model of the present invention paints with the mankind
System custom is unanimous on the whole.
4th, the hand-drawing image sequential adding method based on stroke length and spatial information according to the 3 of claim,
Characterized in that, after the critical point model of eight neighborhood between designing pixel, for hand-drawing image
Stroke tracking eight neighborhood search is the tracking based on single pixel.The step s3 further comprises:
S31, because step s1 carries out micronization processes for hand-drawing image, the tracking of stroke is changed into single picture based on eight neighborhood
Vegetarian refreshments is followed the trail of, and greatly reduces amount of calculation, and ensure that the precision of eight neighborhood stroke tracking.
S32, the lines for tracking out, the coordinate of the point on each lines is preserved by tracking order.
5th, the hand-drawing image sequential adding method according to claim 4 based on stroke length and spatial information, its
Be characterised by, in the step s4, obtain the positional information of all pixels point of each lines in hand-drawing image, at the same also between
Connect to have obtained the length of every stroke lines.It is ranked up at this point for the sequential of hand-drawing image, specific steps further comprise:
S41, we have discovered that:Freehandhand-drawing picture would generally follow as abstract and summary, the people for reality scene
It is from coarse to fine, by the drawing order of profile to detail textures, so, the wheel of object typically can be first drawn with longer stroke
Exterior feature, shorter stroke is then reused to draw the detail textures of object, and a kind of Cahn-Ingold-Prelog sequence rule.Therefore, in hand-drawing image
Sequential sequence of the length of stroke length for the stroke lines also plays very important effect.
S42, the stroke order of retrieval based on space eight neighborhood, the influence of comprehensive stroke length, the present invention is for Freehandhand-drawing
The final definition method of the sequential of stroke is as follows in image:
Here OrderiRepresent be stroke in hand-drawing image sequential, OctiWhat is represented is eight based on locus adjacent
The sequence valve for the stroke that domain search algorithm obtains, LengthiWhat is represented is the length of the stroke, and N is the retrieval of eight neighborhood algorithm
The sum of stroke out.What β was represented is the parameter for adjusting stroke length weight, and the present invention is set to 0.4.So, one
Bar stroke length is longer, and for its sequential call number with regard to smaller, ranking is more forward.
6th, the hand-drawing image sequential addition side based on stroke length and spatial information according to claim 3,4 or 5
Method, it is characterised in that the determination of the sequential of each stroke segmental in hand-drawing image, be by two aspects in the step s4
Determine:On the one hand it is that the eight neighborhood single pixel tracing model based on spatial information determines, is on the other hand by based on manual draw
As stroke length information determined by stroke order.The weighting of two aspect orders, finally in a width hand-drawing image, obtain
The stroke sequential that the mankind draw custom can be simulated.
7th, the hand-drawing image sequential adding method according to claim 6 based on stroke length and spatial information, its
It is characterised by, in the step s5, after the timing information of every stroke for obtaining hand-drawing image, using matlab by manual draw
As the sequential according to every stroke, repaint, and preserve into .EPS vector bitmap-formats.
The invention has the advantages that:
The present invention carries out research modeling, for manual draw from the method for computer vision for people's drawing behavior
Stroke tracing algorithm as in provides most proper guidance, is farthest corrected and is fitted the mankind using computer and draw hand
The stroke order of drawing picture.The point of ambient noise and remote lines has been carried out going division operation by Gauss Denoising Algorithm, eliminated
Noise spot, improve the degree of purity of hand-drawing image.Lines thinning method is used simultaneously, enhances the levels of precision of lines tracking,
Be follow-up hand-drawing image stroke vectoring operations in important pre-treatment step.
In addition, the present invention devises the hand-drawing image sequential adding method based on spatial information and stroke length first, its
Middle stroke line length can be regarded as semantic feature, because long stroke often represents profile, short stroke representation details unity and coherence in writing.Institute
The combination of the space characteristics and semantic feature to hand-drawing image can be considered as with the present invention.Based on above-mentioned theory, the present invention is set
The locus sensing of meter and stroke lines method for tracing, substantially increase the degree of accuracy of fitting hand-drawing image timing information.Together
When, the present invention can be that current general hand-drawing image searching database adds Temporal Order, facilitate the development of follow-up study.
Brief description of the drawings
Fig. 1 is the flow chart of the hand-drawing image sequential adding method based on stroke length and spatial information in the present invention;
Fig. 2 is the algorithm frame for the hand-drawing image sequential adding method based on stroke length and spatial information that the present invention designs
Frame schematic diagram;
Fig. 3 is based on syntople figure between eight neighborhood search single pixel designed by the present invention;
Embodiment
Below in conjunction with the accompanying drawings and embodiment is described in further detail to the present invention:
With reference to shown in Fig. 1, Fig. 2 and Fig. 3, the hand-drawing image sequential adding method based on stroke length and spatial information, bag
Include following steps:
S1, for hand-drawing image, carry out noise remove, improve the definition of image.And then to lines in hand-drawing image
Carry out micronization processes
The method of the present invention is applied to all hand-drawing image databases, wherein, the pretreatment for hand-drawing image includes
Gauss denoising for background noise point and the discrete point of remote lines and the single pixel Refinement operation for lines pixel wide.
S2, pixel adjoining modeling, simulate mankind's drawing behavior pattern, and the connection established between model constraint pixel is closed
System
With reference to Fig. 2, behavior pattern when drawing hand-drawing image by simulating the mankind, the present invention is devised based on spatial information
The strategy of inducing method and stroke length.
S21, Image Rendering by observing and studying people custom, the characteristics of drawing behavior of most people, is summarized
For:From the locus order rule of upper left to bottom right.
S22, with reference to Fig. 3, i.e., what the present invention changed enters based on eight neighborhood edge following algorithm.It is adjacent that the present invention changes traditional eight
The search order counterclockwise in domain, according to we have found that mankind's drawing behavioural habits, advised again for eight neighborhood direction
Determine search order and label, be the eight neighborhood syntople model between pixel shown in Fig. 3.
S3, using pixel syntople model lines tracking is carried out to the hand-drawing image that provides, by the stroke lines of tracking
Bar vector quantization preserves
S31, the eight neighborhood space search model designed by the present invention, tracking obtain sensing based on eight neighborhood locus
Preliminary hand-drawing image stroke order.
S32, the lines for tracking out, by tracking order, text is saved in by the coordinate of the point on each lines
In file.
S4, the length based on every stroke and locus, are weighted sequence, are that each stroke assigns timing information
With reference to Fig. 1 and Fig. 2, the present invention considers for stroke line length and locus, and is weighted
Processing, the timing information of all strokes in a width hand-drawing image is finally given, meanwhile, we can also obtain each stroke
The length information of lines.
S5, the timing information according to hand-drawing image, are again drawn hand-drawing image.
In order to verify effectiveness of the invention, the sequential using matlab by hand-drawing image according to every stroke, paint again
System, and preserve into .EPS vector bitmap-formats.A width alarm clock hand-drawing image is illustrated in Fig. 2 every the drafting knot per several strokes
Fruit.
Certainly, the present invention is not limited to the above-mentioned example enumerated, it should be noted that any to be familiar with those skilled in the art
Member is under the guidance of this specification, all equivalent substitutes, the obvious variant made, all falls within the substantive model of this specification
In enclosing, it ought to be protected by the present invention.
Claims (7)
1. the hand-drawing image sequential adding method based on stroke length and spatial information, it is characterised in that comprise the following steps:
S1, for hand-drawing image, carry out noise remove, improve the definition of image.And then lines in hand-drawing image are carried out
Micronization processes;
S2, pixel adjoining modeling, simulate mankind's drawing behavior pattern, the annexation established between model constraint pixel;
S3, using pixel syntople model lines tracking is carried out to the hand-drawing image that provides, the stroke lines of tracking are sweared
Quantify to preserve;
S4, the length based on every stroke and locus, are weighted sequence, are that each stroke assigns timing information;
S5, the timing information according to hand-drawing image, are again drawn hand-drawing image.
2. the hand-drawing image sequential adding method according to claim 1 based on stroke length and spatial information, its feature
It is, in the step s1, further comprises for the pretreatment operation of hand-drawing image:
S11, using Gauss Denoising Algorithm, filter and remove noise point scattered in hand-drawing image, improve the definition of picture.
S12, lines Refinement operation is carried out to the stroke in hand-drawing image, that is, be more than 2 lines for pixel wide, by it
1 pixel of width is refined as, Loss occurs when preventing follow-up stroke from following the trail of.
3. the hand-drawing image sequential adding method according to claim 2 based on stroke length and spatial information, its feature
It is, the step s2 further comprises:
S21, Image Rendering by observing and studying people custom, the drawing behavior of most people include following features:(1)
Image is drawn with order from left to right;(2) the order general framework followed from top to bottom draws picture.
S22, summarize people's drawing behavioral characteristic (1) and (2), improve the model based on eight neighborhood edge following algorithm, pixel it
Between eight neighborhood syntople design it is as follows:
As illustrated shown in Fig. 3 in figure accompanying drawing, change border lines tracking order, the first direction for setting lines to follow the trail of is lower right
To (marked as 0), the last direction of search is upper left (marked as 7).For all pixels in hand-drawing image, Wo Menzong
It is the pixel that can take the lead in following the trail of lower right, the stroke lines order for ensureing to be obtained by model of the present invention is drawn with the mankind to be practised
It is used unanimous on the whole.
4. the hand-drawing image sequential adding method based on stroke length and spatial information according to the 3 of claim, it is special
Sign is, after designing the critical point model of eight neighborhood between pixel, the stroke tracking eight neighborhood search for hand-drawing image
It is the tracking based on single pixel.The step s3 further comprises:
S31, because step s1 carries out micronization processes for hand-drawing image, the tracking of stroke is changed into the single pixel point based on eight neighborhood
Tracking, greatly reduces amount of calculation, and ensure that the precision of eight neighborhood stroke tracking.
S32, the lines for tracking out, the coordinate of the point on each lines is preserved by tracking order.
5. the hand-drawing image sequential adding method according to claim 4 based on stroke length and spatial information, its feature
It is, in the step s4, obtains the positional information of all pixels point of each lines in hand-drawing image, at the same it is also indirect
The length of every stroke lines is arrived.It is ranked up at this point for the sequential of hand-drawing image, specific steps further comprise:
S41, we have discovered that:Freehandhand-drawing picture would generally be followed by thick as abstract and summary, the people for reality scene
To thin, by the drawing order of profile to detail textures, so, the profile of object typically can be first drawn with longer stroke, so
Shorter stroke is reused afterwards to draw the detail textures of object, and a kind of Cahn-Ingold-Prelog sequence rule.Therefore, stroke is grown in hand-drawing image
Sequential sequence of the length of degree for the stroke lines also plays very important effect.
S42, the stroke order of retrieval based on space eight neighborhood, the influence of comprehensive stroke length, the present invention is for hand-drawing image
The final definition method of the sequential of middle stroke is as follows:
<mrow>
<msub>
<mi>Order</mi>
<mi>i</mi>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mi>N</mi>
</mfrac>
<mo>&times;</mo>
<msub>
<mi>Oct</mi>
<mi>i</mi>
</msub>
<mo>+</mo>
<mi>&beta;</mi>
<mo>&times;</mo>
<mfrac>
<mn>1</mn>
<mrow>
<msub>
<mi>Length</mi>
<mi>i</mi>
</msub>
</mrow>
</mfrac>
</mrow>
Here OrderiRepresent be stroke i in hand-drawing image sequential, OctiWhat is represented is that the eight neighborhood based on locus is searched
The sequence valve for the stroke that rope algorithm obtains, LengthiWhat is represented is the length of i-th stroke, and N is that eight neighborhood algorithm is retrieved
Stroke sum.What β was represented is the parameter for adjusting stroke length weight, and the present invention is set to 0.4.So, a pen
Picture length is longer, and for its sequential call number with regard to smaller, ranking is more forward.
6. the hand-drawing image sequential adding method based on stroke length and spatial information according to claim 3,4 or 5, its
It is characterised by, the determination of the sequential of each stroke segmental in hand-drawing image, is determined by two aspects in the step s4
's:On the one hand it is that the eight neighborhood single pixel tracing model based on spatial information determines, is on the other hand by based on hand-drawing image
The order of stroke determined by stroke length information.The weighting of two aspect orders, finally in a width hand-drawing image, acquisition can be with
Simulate the stroke sequential that the mankind draw custom.
7. the hand-drawing image sequential adding method according to claim 6 based on stroke length and spatial information, its feature
It is, in the step s5, after the timing information of every stroke for obtaining hand-drawing image, is pressed hand-drawing image using matlab
According to the sequential of every stroke, repaint, and preserve into .EPS vector bitmap-formats.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711085606.XA CN107705346A (en) | 2017-11-07 | 2017-11-07 | A kind of hand-drawing image sequential adding method based on stroke length and spatial information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711085606.XA CN107705346A (en) | 2017-11-07 | 2017-11-07 | A kind of hand-drawing image sequential adding method based on stroke length and spatial information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107705346A true CN107705346A (en) | 2018-02-16 |
Family
ID=61178677
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711085606.XA Pending CN107705346A (en) | 2017-11-07 | 2017-11-07 | A kind of hand-drawing image sequential adding method based on stroke length and spatial information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107705346A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7664325B2 (en) * | 2005-12-21 | 2010-02-16 | Microsoft Corporation | Framework for detecting a structured handwritten object |
CN103400109A (en) * | 2013-07-10 | 2013-11-20 | 西安交通大学 | Free-hand sketch offline identification and reshaping method |
CN105447901A (en) * | 2014-09-26 | 2016-03-30 | 腾讯科技(深圳)有限公司 | Image processing method and image processing device |
-
2017
- 2017-11-07 CN CN201711085606.XA patent/CN107705346A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7664325B2 (en) * | 2005-12-21 | 2010-02-16 | Microsoft Corporation | Framework for detecting a structured handwritten object |
CN103400109A (en) * | 2013-07-10 | 2013-11-20 | 西安交通大学 | Free-hand sketch offline identification and reshaping method |
CN105447901A (en) * | 2014-09-26 | 2016-03-30 | 腾讯科技(深圳)有限公司 | Image processing method and image processing device |
Non-Patent Citations (2)
Title |
---|
HONGBO FU 等: "Animated Construction of Line Drawings", 《ACM TRANSACTIONS ON GRAPHICS》 * |
刘玉杰 等: "结合距离变换和隐层图词包的手绘图像检索方法", 《计算机辅助设计与图形学学报》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yang et al. | Layered object models for image segmentation | |
CN105631479B (en) | Depth convolutional network image labeling method and device based on non-equilibrium study | |
CN101777116B (en) | Method for analyzing facial expressions on basis of motion tracking | |
DE112017002799T5 (en) | METHOD AND SYSTEM FOR GENERATING MULTIMODAL DIGITAL IMAGES | |
CN106384094A (en) | Chinese word stock automatic generation method based on writing style modeling | |
CN104142995B (en) | The social event recognition methods of view-based access control model attribute | |
CN107679462A (en) | A kind of depth multiple features fusion sorting technique based on small echo | |
CN104951518B (en) | One kind recommends method based on the newer context of dynamic increment | |
CN106611172B (en) | A kind of Chinese character synthetic method based on style study | |
CN102779270B (en) | Target clothing image extraction method aiming at shopping image search | |
CN102937848A (en) | Method for editing handwritings and electronic equipment | |
CN107798563B (en) | Internet advertisement effect evaluation method and system based on multi-mode characteristics | |
CN104091350B (en) | A kind of object tracking methods of utilization motion blur information | |
CN113486708A (en) | Human body posture estimation method, model training method, electronic device and storage medium | |
CN104268526A (en) | Chinese character image matching and deformation method | |
CN107748798A (en) | A kind of hand-drawing image search method based on multilayer visual expression and depth network | |
CN105956603A (en) | Video sequence classifying method based on tensor time domain association model | |
CN109146925A (en) | Conspicuousness object detection method under a kind of dynamic scene | |
CN109635687A (en) | The Chinese-character text running hand calculated based on timing point set writes automatic Evaluation of Quality method and system | |
Sylcott et al. | Towards understanding the role of interaction effects in visual conjoint analysis | |
CN112784531A (en) | Chinese font and word stock generation method based on deep learning and part splicing | |
Liu et al. | Trampoline motion decomposition method based on deep learning image recognition | |
CN107705346A (en) | A kind of hand-drawing image sequential adding method based on stroke length and spatial information | |
Li et al. | Pca-based robust motion data recovery | |
Wang et al. | A sign language recognition based on tensor |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180216 |
|
WD01 | Invention patent application deemed withdrawn after publication |