CN108537858A - A kind of stroke lines dynamic merging method based on drawing sequential - Google Patents

A kind of stroke lines dynamic merging method based on drawing sequential Download PDF

Info

Publication number
CN108537858A
CN108537858A CN201810243095.8A CN201810243095A CN108537858A CN 108537858 A CN108537858 A CN 108537858A CN 201810243095 A CN201810243095 A CN 201810243095A CN 108537858 A CN108537858 A CN 108537858A
Authority
CN
China
Prior art keywords
lines
merging
new
stroke
space 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.)
Granted
Application number
CN201810243095.8A
Other languages
Chinese (zh)
Other versions
CN108537858B (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201810243095.8A priority Critical patent/CN108537858B/en
Publication of CN108537858A publication Critical patent/CN108537858A/en
Application granted granted Critical
Publication of CN108537858B publication Critical patent/CN108537858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

A kind of stroke lines dynamic merging method based on drawing sequential, the sequencing of stroke can be utilized quickly and accurately by many stroke combinations at the stroke lines of negligible amounts, and retain the main painting of artwork, what this method proposed is the method that a dynamic merges, the lines newly painted for any one, mainly include the following steps that:First, the space length of new lines and previous input lines is calculated;Secondly, if the space length is more than given threshold value and otherwise calculates new lines and the previous space length for merging lines using new lines as new merging lines;Then, otherwise new lines are merged into previous merging lines using new lines as new merging lines if new lines are more than given threshold value with the previous space length for merging lines.

Description

A kind of stroke lines dynamic merging method based on drawing sequential
Technical field
The present invention relates to a kind of stroke lines dynamic merging methods based on drawing sequential using computer technology, can Retain the creation intention of painter, and simplification work that is automatic, being accurately finished complicated line drawing figure.
Background technology
Line drawing figure is widely used in industrial design and art field as a kind of easy guided bone expression-form In, liked by vast artistic creation person and designer.The line drawing figure that the paper pen that compares is drawn, painter by Digitizing plate, Each information is recorded and is transferred in computer, can more completely retain the intention expressed by mapper, conveniently paint Modification and reuse of the picture person to line drawing figure.
Painter often repeatedly sketches the contours the part of more difficult drafting, leads to line drawing figure in the drawing process for carrying out line drawing figure In there are a large amount of superimposed lines.The lines of such line drawing figure are extremely complex, and painter is difficult to be carried out to such line drawing figure Precise modification and reuse.In order to simplify complicated line drawing figure, lines are simplified as far as possible under the premise of retaining painter and being intended to, it is existing Neighbouring, parallel between region and lines and the space lengths of the attributes such as direction is drawn during some methods are drawn by analytical line Lines in line drawing figure are clustered and are merged, obtain the succinct line drawing figure of a width by constraint.However, existing method is only Consider space attribute between region and lines, have ignored the timing information of lines drafting, cluster is difficult to completely with amalgamation result The drawing for retaining painter is intended to, and can not also handle complicated line drawing figure.
For painter during drawing line drawing figure, there are certain sequencings.Electronic pen sum digit plate is many new Sheng Dai designer and the common draw tool of painter, all lines that they can be recorded successively.The present invention is by these lines The drafting sequential of item is combined with their spatial position, proposes a kind of stroke lines dynamic merging side based on drawing sequential Method.Compared to more existing method, the drafting that this method can preferably retain painter when simplifying complicated stroke lines is intended to.
Invention content
In order to solve the deficiency of existing stroke lines merging method, the present invention provides a kind of bases using computer technology In the stroke lines dynamic merging method of drawing sequential, the simplification work of complicated line drawing figure can be efficiently and accurately completed.
The present invention analyzes the space length information and timing information that painter draws lines, is carried out to stroke lines dynamic It clusters and merges, to realize under the premise of ensureing that painter is intended to, the purpose of simplified complexity line drawing figure.
There is following symbol definition herein:S={ S are defined as the n lines inputted1,S2,...,Sn};Definition M lines L={ L after merging1,L2,...,Lm}。Ds(Si,Sj) indicate lines SiWith SjBetween space length;Hausdorff (Si,Sj) calculate lines SiUpper all the points are to SjThe maximum value of the shortest distance, T are word space threshold.
Step 1, the arbitrary lines S for newly inputtingn+1, calculate it and previous input lines SnSpace length Ds(Sn, Sn+1)=Hausdorff (Sn,Sn+1)。
Step 2, if Ds(Sn,Sn+1) < T, pass through Ds(Lj,Sn+1) calculate LjWith Sn+1Space length, otherwise by Sn+1Make For new merging lines Lm+1
Step 3, if Ds(Lj,Sn+1) < T, merge Sn+1With LjAnd update Lj;Otherwise by Sn+1As new merging lines Lm+1
Further, in step 3, lines Sn+1With LjMerging mainly have following steps:First, to LjAnd Sn+1It finds mutually Two points of two endpoints of the distance lines recently on another lines determine that this both threads item closely overlaps with this Part, by LjAnd Sn+1Intersection be denoted as item section K respectively1And K2;Then, to K1And K2Carry out linear interpolation, i.e. K=λ K1 +(1-λ)K2, wherein K is the new line segment that interpolation obtains, and λ is interpolation weights, the not global weights of λ, in intersection lines Each position can be different partial weight.Sn+1With LjBoth ends be possible to the lines of also misaligned part, due to weight It closes part to be calculated by endpoint, so the lines of misaligned part will not appear in the side of K line segments simultaneously.Assuming that In the side of K line segments, LjOr Sn+1There are the lines of misaligned part, then the λ of this side is set to 1 or 0, to ensure new line Section K can be continuous with the lines of misaligned part.When λ=1, K=K1;When λ=0, K=K2.If the side of K line segments does not connect Meet LjOr Sn+1Misaligned part lines, the λ of the side is set as 0.5, and by the λ of the middle position of K line segments It is set as 0.5.In order to ensure that new line segment K is continuous in its any position, the λ of non-endpoint and point midway is used from endpoint Linear transitions method to midpoint calculates.
The present invention technical concept be:With the sequential of stroke in line drawing figure successively for Main Basiss, to lines into Mobile state Combination, to realize that the dynamic to complicated line drawing figure merges.In merging process, weight is detected using the space length between lines Conjunction relationship, and then realization is efficient, continuously merges.
The advantage of the invention is that:The lines drawn online are successively taken into account the sequential of lines in merging, and merge Upper a line is only considered in journey and merges lines, is supported dynamic to update, is improved the efficiency of merging;The merging of lines considers empty Between distance relation, and pass through and merge the design of weight and ensure final merging lines everywhere continuous.
Description of the drawings
Fig. 1 is the flow chart of the present invention.
Fig. 2 is the input schematic diagram of the present invention, the sequential of each stroke of digital representation.
Fig. 3 is the cluster result figure of the present invention, and the stroke of different gray scales indicates different classifications.
Fig. 4 lines merge exemplary plot.
Fig. 5 line drawing figures simplify result figure.
Specific implementation mode
With reference to attached drawing, S={ S are defined as the n lines inputted1,S2,...,Sn};M items after definition merging Lines L={ L1,L2,...,Lm}。Ds(Si,Sj) indicate lines SiWith SjBetween space length;Hausdorff(Si,Sj) calculate line SiUpper all the points are to SjThe maximum value of the shortest distance, T are word space threshold, are further illustrated the present invention:
Step 1, the arbitrary lines S for newly inputtingn+1, calculate it and previous input lines SnSpace length Ds(Sn, Sn+1)=Hausdorff (Sn,Sn+1)。
Step 2, if Ds(Sn,Sn+1) < T, pass through Ds(Lj,Sn+1) calculate LjWith Sn+1Space length, otherwise by Sn+1Make For new merging lines Lm+1
Step 3, if Ds(Lj,Sn+1) < T, merge Sn+1With LjAnd update Lj;Otherwise by Sn+1As new merging lines Lm+1
Further, in step 3, lines Sn+1With LjMerging mainly have following steps:First, to LjAnd Sn+1It finds mutually Two points of two endpoints of the distance lines recently on another lines determine that this both threads item closely overlaps with this Part, by LjAnd Sn+1Intersection be denoted as item section K respectively1And K2;Then, to K1And K2Carry out linear interpolation, i.e. K=λ K1 +(1-λ)K2, wherein K is the new line segment that interpolation obtains, and λ is interpolation weights, the not global weights of λ, in intersection lines Each position can be different partial weight.Sn+1With LjBoth ends be possible to the lines of also misaligned part, due to weight It closes part to be calculated by endpoint, so the lines of misaligned part will not appear in the side of K line segments simultaneously.Assuming that In the side of K line segments, LjOr Sn+1There are the lines of misaligned part, then the λ of this side is set to 1 or 0, to ensure new line Section K can be continuous with the lines of misaligned part.When λ=1, K=K1;When λ=0, K=K2.If the side of K line segments does not connect Meet LjOr Sn+1Misaligned part lines, the λ of the side is set as 0.5, and by the λ of the middle position of K line segments It is set as 0.5.In order to ensure that new line segment K is continuous in its any position, the λ of non-endpoint and point midway is used from endpoint Linear transitions method to midpoint calculates.
The merging of stroke lines is to improve the effective means of artist's skeletonizing efficiency, existing stroke lines simplification side Method only considered the space length between lines, but that there is algorithm stabilities is low, computational efficiency is low, amalgamation result is inaccurate etc. Problem.The present invention proposes a kind of stroke lines dynamic merging method based on drawing sequential, can it is automatic, accurately will be by very The line drawing sketch that Multi strokes lines are constituted merges into negligible amounts but remains the line drawing figure of artwork content.
Content described in this specification embodiment is only enumerating to the way of realization of inventive concept, protection of the invention Range is not construed as being only limitted to the concrete form that embodiment is stated, protection scope of the present invention is also and in art technology Personnel according to present inventive concept it is conceivable that equivalent technologies mean.

Claims (3)

1. based on the stroke lines dynamic merging method of drawing sequential, S={ S are defined as the n lines inputted1, S2,...,Sn};M lines L={ L after definition merging1,L2,...,Lm};Ds(Si,Sj) indicate lines SiWith SjBetween sky Between distance;Hausdorff(Si,Sj) calculate lines SiUpper all the points are to SjThe maximum value of the shortest distance, T are word space threshold, Specifically include following steps:
Step 1, the arbitrary lines S for newly inputtingn+1, calculate it and previous input lines SnSpace length Ds(Sn,Sn+1)= Hausdorff(Sn,Sn+1);
Step 2, if Ds(Sn,Sn+1) < T, pass through Ds(Lj,Sn+1) calculate LjWith Sn+1Space length, otherwise by Sn+1As new Merging lines Lm+1
Step 3, if Ds(Lj,Sn+1) < T, merge Sn+1With LjAnd update Lj;Otherwise by Sn+1As new merging lines Lm+1
2. the stroke lines dynamic merging method as described in claim 1 based on drawing sequential, it is characterised in that the merging is The process that one dynamic merges, any one newly added lines all merge line with its previous input lines and previous Item goes to calculate space length, to judge whether the new lines will become new merging lines, or merges lines with existing Merge again.
3. the stroke lines dynamic merging method as described in claim 1 based on drawing sequential, it is characterised in that:The step In 3, lines Sn+1With LjMerging mainly have following steps:First, to LjAnd Sn+1Find mutually be located on another lines away from Two nearest points of two from lines endpoints determine the part of this both threads item short distance coincidence with this, by LjAnd Sn+1Weight It closes part and is denoted as item section K respectively1And K2;Then, to K1And K2Carry out linear interpolation, i.e. K=λ K1+(1-λ)K2, wherein K is interpolation Obtained new line segment, λ are interpolation weights, and the not global weights of λ can be different in each position of intersection lines Partial weight;Sn+1With LjBoth ends be possible to the lines of also misaligned part, since intersection is calculated by endpoint It obtains, so the lines of misaligned part will not appear in the side of K line segments simultaneously;Assuming that in the side of K line segments, LjOr Sn+1There are the lines of misaligned part, then the λ of this side is set to 1 or 0, to ensure that new line segment K can be with misaligned part Lines it is continuous;When λ=1, K=K1;When λ=0, K=K2;If the side of K line segments does not connect LjOr Sn+1Misaligned portion The lines divided, are set as 0.5, and the λ of the middle position of K line segments is also configured as 0.5 by the λ of the side;In order to ensure New line segment K is continuous in its any position, and the λ of non-endpoint and point midway is using the linear transitions side from endpoint to midpoint Method calculates.
CN201810243095.8A 2018-03-23 2018-03-23 Drawing time sequence-based stroke line dynamic merging method Active CN108537858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810243095.8A CN108537858B (en) 2018-03-23 2018-03-23 Drawing time sequence-based stroke line dynamic merging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810243095.8A CN108537858B (en) 2018-03-23 2018-03-23 Drawing time sequence-based stroke line dynamic merging method

Publications (2)

Publication Number Publication Date
CN108537858A true CN108537858A (en) 2018-09-14
CN108537858B CN108537858B (en) 2022-06-21

Family

ID=63484344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810243095.8A Active CN108537858B (en) 2018-03-23 2018-03-23 Drawing time sequence-based stroke line dynamic merging method

Country Status (1)

Country Link
CN (1) CN108537858B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110931129A (en) * 2019-12-10 2020-03-27 上海市精神卫生中心(上海市心理咨询培训中心) Painting and drawing computer analysis method for evaluating schizophrenia mental state

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999282A (en) * 2011-09-08 2013-03-27 北京林业大学 Data object logic control system and method based on real-time stroke input
CN103106309A (en) * 2013-02-06 2013-05-15 浙江大学 Sketch behavior identification method and sketch behavior identification system during computer aided design process
CN103400109A (en) * 2013-07-10 2013-11-20 西安交通大学 Free-hand sketch offline identification and reshaping method
CN103902689A (en) * 2014-03-26 2014-07-02 小米科技有限责任公司 Clustering method, incremental clustering method and related device
CN103927056A (en) * 2014-04-28 2014-07-16 西北工业大学 Stroke segmentation method based on mixing feature for intelligent free-hand input
US20140328540A1 (en) * 2013-05-03 2014-11-06 Microsoft Corporation Sketch Segmentation
CN104143209A (en) * 2014-06-20 2014-11-12 浙江工业大学 Method for engraving three-dimensional model based on line pattern
CN104424658A (en) * 2014-10-22 2015-03-18 浙江工商大学 Structure-preserving interpolation method of two-dimensional shapes
CN107735758A (en) * 2015-06-29 2018-02-23 微软技术许可有限责任公司 Synchronous digital ink strokes are presented

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999282A (en) * 2011-09-08 2013-03-27 北京林业大学 Data object logic control system and method based on real-time stroke input
CN103106309A (en) * 2013-02-06 2013-05-15 浙江大学 Sketch behavior identification method and sketch behavior identification system during computer aided design process
US20140328540A1 (en) * 2013-05-03 2014-11-06 Microsoft Corporation Sketch Segmentation
CN103400109A (en) * 2013-07-10 2013-11-20 西安交通大学 Free-hand sketch offline identification and reshaping method
CN103902689A (en) * 2014-03-26 2014-07-02 小米科技有限责任公司 Clustering method, incremental clustering method and related device
CN103927056A (en) * 2014-04-28 2014-07-16 西北工业大学 Stroke segmentation method based on mixing feature for intelligent free-hand input
CN104143209A (en) * 2014-06-20 2014-11-12 浙江工业大学 Method for engraving three-dimensional model based on line pattern
CN104424658A (en) * 2014-10-22 2015-03-18 浙江工商大学 Structure-preserving interpolation method of two-dimensional shapes
CN107735758A (en) * 2015-06-29 2018-02-23 微软技术许可有限责任公司 Synchronous digital ink strokes are presented

Non-Patent Citations (12)

* Cited by examiner, † Cited by third party
Title
DAY CHYI KU .ETC: ""nterpretation of Overtracing Freehand Sketching for Geometric Shapes"", 《PROCEEDINGS OF WSCG’2006, THE 14TH INTERNATIONAL CONFERENCE IN CENTRAL EUROPE ON COMPUTER GRAPHICS, VISUALIZATION AND COMPUTER VISION》 *
DAY CHYI KU .ETC: ""nterpretation of Overtracing Freehand Sketching for Geometric Shapes"", 《PROCEEDINGS OF WSCG’2006, THE 14TH INTERNATIONAL CONFERENCE IN CENTRAL EUROPE ON COMPUTER GRAPHICS, VISUALIZATION AND COMPUTER VISION》, 3 February 2006 (2006-02-03), pages 263 - 270 *
YUN CHIEN .ETC: ""Line Drawing Simplification by Stroke Translation and Combination"", 《FIFTH INTERNATIONAL CONFERENCE ON GRAPHIC AND IMAGE PROCESSING》 *
YUN CHIEN .ETC: ""Line Drawing Simplification by Stroke Translation and Combination"", 《FIFTH INTERNATIONAL CONFERENCE ON GRAPHIC AND IMAGE PROCESSING》, vol. 9069, 10 January 2014 (2014-01-10), pages 1 - 6 *
林意等: ""一种参数曲线间Hausdorff距离的计算方法 "", 《图学学报》 *
林意等: ""一种参数曲线间Hausdorff距离的计算方法 "", 《图学学报》, vol. 35, no. 5, 31 October 2014 (2014-10-31), pages 704 - 708 *
王淑侠等: ""基于时空关系的在线多笔划手绘直线段识别"", 《计算机工程与应用》 *
王淑侠等: ""基于时空关系的在线多笔划手绘直线段识别"", 《计算机工程与应用》, vol. 48, no. 14, 29 September 2011 (2011-09-29), pages 198 - 202 *
缪永伟等: ""基于线画图案的三维模型雕刻"", 《计算机辅助设计与图形学学报》 *
缪永伟等: ""基于线画图案的三维模型雕刻"", 《计算机辅助设计与图形学学报》, vol. 28, no. 1, 31 January 2016 (2016-01-31), pages 50 - 57 *
许嘉翰等: ""手绘图风格的三维模型线条渲染"", 《计算机系统应用》 *
许嘉翰等: ""手绘图风格的三维模型线条渲染"", 《计算机系统应用》, vol. 24, no. 31, 31 March 2015 (2015-03-31), pages 214 - 219 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110931129A (en) * 2019-12-10 2020-03-27 上海市精神卫生中心(上海市心理咨询培训中心) Painting and drawing computer analysis method for evaluating schizophrenia mental state

Also Published As

Publication number Publication date
CN108537858B (en) 2022-06-21

Similar Documents

Publication Publication Date Title
CN105069226B (en) A kind of three-dimensional modeling modeling method based on template
CN102622477B (en) Three-dimensional process model evolution generation method applied to digitalized process design
Bessmeltsev et al. Design-driven quadrangulation of closed 3D curves.
WO2012071688A1 (en) Method for analyzing 3d model shape based on perceptual information
CN106780458A (en) A kind of point cloud framework extracting method and device
JP3796658B2 (en) Analysis model creation device
CN105631936A (en) Point cloud repair method and system
CN104268600B (en) A kind of mineral flotation foam image texture analysis and operating mode's switch method based on Minkowski distances
CN112102460A (en) 3D printing slicing method, device, equipment and storage medium
CN108256218B (en) Underground communication roadway fine modeling method based on actually measured waist line data
CN101840582B (en) Boundary digitizing method of cadastral plot
CN105479747A (en) 3d printing method
CN106600663B (en) A kind of simple curve smoothing method based on quadratic b-spline curve
CN109685109A (en) A kind of base station label track classification method based on twin neural network
CN104778458A (en) Textile pattern retrieval method based on textural features
CN109325316A (en) STL model efficient parallel based on concurrent welding sequence cuts layer method
CN108537858A (en) A kind of stroke lines dynamic merging method based on drawing sequential
CN112926207A (en) Method and system for automatically constructing editable model of equal-geometry topological optimization result
CN108228998A (en) Computer based on WEB acts improperly design system
CN106951166A (en) Person's handwriting method for drafting and device
Nieser et al. Patch layout from feature graphs
CN103902100A (en) Speed characteristics based stroke partitioning method for intelligent freehand sketching
CN108112018A (en) A kind of definite method and device of mobile communications network zone boundary to be optimized
CN104268915A (en) Real-time contour beautifying method of handwritten Chinese characters
CN103942397A (en) Power function-based digital modeling method for shape modification gear

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