CN106250129B - Vector quantization symbol dynamic drawing method based on meta graph recognition model - Google Patents

Vector quantization symbol dynamic drawing method based on meta graph recognition model Download PDF

Info

Publication number
CN106250129B
CN106250129B CN201610596850.1A CN201610596850A CN106250129B CN 106250129 B CN106250129 B CN 106250129B CN 201610596850 A CN201610596850 A CN 201610596850A CN 106250129 B CN106250129 B CN 106250129B
Authority
CN
China
Prior art keywords
control point
symbol
vector
node
point set
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.)
Active
Application number
CN201610596850.1A
Other languages
Chinese (zh)
Other versions
CN106250129A (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.)
Nanjing University of Aeronautics and Astronautics
Original Assignee
Nanjing University of Aeronautics and Astronautics
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 Nanjing University of Aeronautics and Astronautics filed Critical Nanjing University of Aeronautics and Astronautics
Priority to CN201610596850.1A priority Critical patent/CN106250129B/en
Publication of CN106250129A publication Critical patent/CN106250129A/en
Application granted granted Critical
Publication of CN106250129B publication Critical patent/CN106250129B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

The invention discloses the vector quantization symbol dynamic drawing methods based on meta graph recognition model, belong to the technical field of data processing.The present invention, which draws vector symbol with XML, realizes the separation described file and draw platform, the vector identification corresponding to element figure model is obtained by parsing symbol XML file, the dynamic adjustment of vector identification is realized in conjunction with math label, and then the dynamic for realizing symbol is marked and drawed, improve drafting accuracy, the time that a large amount of study professions draw vector icon software is saved, provides great convenience for vector symbol extension, the cross-platform transplanting in later period.

Description

Vector quantization symbol dynamic drawing method based on meta graph recognition model
Technical field
The invention discloses the vector quantization symbol dynamic drawing methods based on meta graph recognition model, belong to the skill of digital processing Art field.
Background technique
For the realization of motion vector symbol, there are two types of methods at present: 1. secondary using its on existing basis of software Development language and the graphic editing function of itself are realized, such as the MapBasic language of Mapinfo company and Arclnf08.01 Inter-symbol designing system StyleManage in ArcMap module;2. designing, drawing for the function of specific software offer Symbol, such as the MapX component of Maplnfo company.Although above method respectively has feature, use is more complex, needs developer Take a significant amount of time and be familiar with software application method, and the vector symbol drawn of this kind of drawing software to its platform dependence very By force, need to carry out the vector symbol drawn small modification, such as: variation, variation of width of angle etc., all quite In drawing a new symbol again again.Simultaneously as the difference of each software, the dynamic symbol constructed lacks versatility, nothing The cross-platform transplanting of method.Vector plotting file cannot be efficiently separated with vector plotting loading code, and coupling is high between the two.It is unfavorable In the finishing operations such as modifying again, the workload of developer is increased.
Summary of the invention
Goal of the invention of the invention is the deficiency for above-mentioned background technique, provides the vector based on meta graph recognition model Change symbol dynamic drawing method, XML file and math label are combined to obtain corresponding to the dynamic of element figure model State vector mark, the dynamic for realizing symbol are marked and drawed, and solve XML document and structure Coupling degree is high, the later period is difficult to accord with vector Number extension, the difficult technical problem of cross-platform transplanting.
The present invention adopts the following technical scheme that for achieving the above object
Vector quantization symbol dynamic drawing method based on meta graph recognition model, includes the following steps:
A, element figure model library is established;
B, descriptor XML file, the symbol XML file include: the root node of descriptor application scenarios and divide The child node of main control point set, subordinate control point set is not described, the child node of the description main control point set is subordinated to root node, The child node of description subordinate control point set is subordinated to the child node of description main control point set, wherein
Root node includes pel collection information, and pel collection includes each element figure for combination producing symbol,
The child node for describing main control point set includes Master Node location information and description for calculating main control point The math label of information operation is set, main control point set is the set for determining the point of each primitive shapes,
The child node for describing subordinate control point set includes subordinate control point position information and description for calculating subordinate control The math label of dot position information operation processed, subordinate control point set are the set for the point that each main Control point of cooperation determines primitive shapes;
C, parsing symbol XML file obtains the vector identification for corresponding to element figure model library, extracts each vector identification Master Node location information, subordinate control point position information;
D, according to element figure model library, according to the main control point of the step C vector identification parsed and extraction Confidence breath, subordinate control point position information mark and draw pel, combine each primitive generating symbol.
Further, in the vector quantization symbol dynamic drawing method based on meta graph recognition model, the symbol of step B description In number XML file, root node also includes superset, and superset includes the combination pixel for combination producing symbol.
Further, in the vector quantization symbol dynamic drawing method based on meta graph recognition model, root node, description master The child node of the child node, description subordinate control point set that control point set all includes the rope for describing itself and other node correlations Fuse breath.
As the further prioritization scheme of the vector quantization symbol dynamic drawing method based on meta graph recognition model, step Subordinate control point position information described in rapid C is extracted according to the positional relationship of subordinate control point and Master Node.
Further, the vector quantization symbol dynamic drawing method based on meta graph recognition model, the base established in step A This graphical element model library includes: line chart member, circle diagram member, circular arc pel, rectangular element, curve pel, polygon pel.
The present invention by adopting the above technical scheme, has the advantages that
(1) the present invention provides a kind of methods for marking and drawing dynamic symbol, and vector symbol is drawn with XML realizes description text Part and the separation for drawing platform obtain the vector identification corresponding to element figure model by parsing symbol XML file, in conjunction with Math label realizes the dynamic adjustment of vector identification, and then the dynamic for realizing symbol is marked and drawed, and drafting accuracy is improved, and is saved A large amount of study professions draw the time of vector icon softwares, provide pole for the vector symbol extension in later period, expansion platform transplantation Big convenience.
(2) the present invention also provides three-dimensional extended spaces, realize that three-dimensional, spatialization are presented vector symbol and provide for future May, it can expand to fields such as geological prospecting, buildings.
Detailed description of the invention
Fig. 1 is the meta graph recognition model of motion vector symbol.
Fig. 2 is the schematic diagram that dynamic marks and draws vector quantization symbol.
Fig. 3 is the pincer attack arrow that need to be drawn.
Fig. 4 is the vector symbol for identifying symbol Master Node shown in Fig. 3, subordinate control point.
Fig. 5 is to parse the vector identification expressed after XML file.
Fig. 6 is to adjust the vector identification obtained behind control point.
Specific embodiment
The technical solution of invention is described in detail with reference to the accompanying drawing.Present invention seek to address that XML document and structure The high problem of the degree of coupling proposes a kind of motion vector symbol marking method, the symbol marked and drawn is expanded in the later period Exhibition and cross-platform transplanting.XML itself is to be described using element and attribute without providing the method for being used to show data, this makes It obtains vector plotting file to efficiently separate with vector plotting loading code, the mathematical operation of math tag definition and XML file are extracted Information combine the available vector identification corresponding to element figure model, which greatly simplifies the plottings of vector symbol Journey alleviates the workload of developer.
In order to solve problems present in motion vector symbol marking, present description provides a kind of new being directed to move The drawing method of state vector quantity symbol, and file is parsed with the parsing XML of the TinyXML of open source parsing library, use letter It is single, it is easy to operate.Then the model in this parsing library generates DOM model, to allow me by parsing XML file in memory Very easily traverse this XML tree.This method makes full use of the powerful self-description ability of expansible plotting Language XML, opens Putting property, platform-neutral and flexibility characteristics, a kind of method for establishing general motion vector symbol marking, this vector plotting rule Model is based on Utf-8 character set, and the XML standard and Math standard formulated with reference to W3C.
The meta graph recognition model of motion vector symbol reads master as shown in Figure 1, by parsing vector quantization denotational description file Control point, and then calculate subordinate control point, then obtain basic pel from pel template library and combined, ultimately produces pair Answer motion vector symbol.
The vector plotting file is stored in xml format, and file includes a root node, i.e. scene root node, root There are 4 child nodes below node, is main control point set, subordinate point set, pel collection and extension respectively.
(1) detailed structural framing is as follows:
<scene root node>
<master point set>...</master point set>
<dependent point set>...</dependent point set>
<primitive set>...</primitive set>
<expansion></expansion>
</scene root node>
(2) detailed description of file label
Master control point set
Bookmark name: CtrlPoints
Father node: Scene
Child node: CtrlPoint
Attribute: nothing
Master Node
Bookmark name: CtrlPoint
Father node: CtrlPoints
Child node: nothing
Attribute: x-axis relative coordinate, y-axis relative coordinate, z-axis relative coordinate
Value: control point set
Subordinate point set
Bookmark name: DependentPoints
Father node: Scene
Child node: DependentPoint
Attribute: nothing
Value: nothing
Subordinate point
Bookmark name: DependentPoint
Father node: DependentPoints
Child node: CtrlPointIndexs, DependentPointCoord
Attribute: nothing
Value: main Control point index information, subordinate point coordinate information
Main Control point indexed set
Bookmark name: CtrlPointIndexs
Father node: DependentPoint
Child node: CtrlPointIndex
Attribute: nothing
Value: main Control point index information set
Main Control point index
Bookmark name: CtrlPointIndex
Father node: CtrlPointIndexs
Child node: nothing
Attribute: index information, the index value comprising a related main Control point
Value: nothing
Subordinate point position
Bookmark name: DependentPointCoord
Father node: DependentPoint
Child node: math
Attribute: nothing
Value: generating the related mathematical logic of point position, stores by the sequence of x, y, z
Pel collection
Bookmark name: Primitives
Father node: Scene
Child node: Primitive
Attribute: nothing
Value: the pel set of plotting is formed
Pel
Bookmark name: Primitive
Father node: Primitives
Child node: PointIndex, Interpolation, PrimitiveType
Attribute: name, type, isfilled
Value: the single pel of plotting is formed
Point set
Bookmark name: PointIndex
Father node: Primitive
Child node: CtrlPointIndex, DependentPointIndex
Attribute:
Value: nothing
Interpolation parameter
Bookmark name: Interpolation
Father node: Primitive
Child node: nothing
Attribute: nothing
Value: interpolation parameter value
Pel pattern
Bookmark name: PrimitiveType
Father node: Primitive
Child node: nothing
Attribute: nothing
Value: pel pattern serial number
Extension
Bookmark name: Extension
Father node: Primitive
Child node: AddedCtrlPoint
Attribute: nothing
Value: newly-increased point set
Newly-increased point set
Bookmark name: Extension
Father node: Scene
Child node: AddedCtrlPoint
Attribute: nothing
Value: newly-increased point set
Newly-increased point
Bookmark name: AddedCtrlPoint
Father node: Extension
Child node: math
Attribute: newly-increased point initial coordinate
Value: the mathematical logic of newly-increased point coordinate
(3) math label is described in detail
Addition
Bookmark name: mplus
Child node: including multiple mathematical logic labels, and each label represents addend
Multiplication
Bookmark name: mmult
Child node: including multiple mathematical logic labels, and each label represents multiplier
Division
Bookmark name: mfrac
Child node: include two child nodes, respectively represent dividend and divisor
Power
Bookmark name: mpow
Child node: include a child node, represent the truth of a matter
Parameter: include a parameter, represent index
Constant
Bookmark name: mn
Value a: double-precision floating points
Variable
Bookmark name: mi
Value: a referenced index value above
In order to facilitate the drafting of motion vector symbol, the element figure of definition such as table 1, element figure group cost shown in table 1 Invent the element figure model library being related to.
1 element figure of table defines table
By the detailed description to above XML file label and math label, according to frame structure to mark carry out standard Format storage.Steps are as follows:
1, reference axis is established, determine Master Node and subordinate control point expression formula is determined by Master Node;
2, according to structural framing and tag expression vector symbol;
(3) subordinate point related attentional item
Subordinate point is acquired according to two control points.It can be depended on by CtrlPointIndexs in the hope of subordinate point Two control points.By target sequence under control point represented by CtrlPointIndexs, we are by the two control points successively table It is shown as (x1, y1) and (x2, y2).The control point that different subordinate points are relied on is possible to different, but number is all 2, so I Just with (x1, y1) and (x2, y2) expression two control points.The position of subordinate point is related with the control point that it is depended on, and calculates The key problem of subordinate point is the relation formula obtained between subordinate point and control point.
Information above is that the definition to the node of dynamic symbol etc. describes, and after completing file description, is solved to file Analysis and expression, as shown in Figure 2.
There is the definition to point, line, rectangle, circle, six kinds of camber line, curve element figures in element figure model library, and complete The description file of pairs of vector symbol.
Element figure in element figure model library constitutes pel template library, and what is stored in pel template library defines Some element figure types, including title and its attribute, attribute include: label, expression condition, explanation again.
Shape library by means of the powerful drawing function of QT complete to point, line defined in element figure, rectangle, circle, camber line, The drafting of curve.After completing the parsing to graphical element model file, element figure is called from pel template library and in figure Expression library is drawn and dynamic combined, finally gives expression to vector symbol according to coordinate.
Three, Detailed description of the inventions
The vector symbol that requirement as shown in Figure 3 is drawn, it is desirable that two apex angles of the figure are 30 °.
Establish reference axis as shown in Figure 4, by element figure defined above to split to symbol it is found that being sweared Two triangle apex angles at the top of quantity symbol are made of broken line, and rest part is made of 4 curves.According to base needed for each pel This points determines the basic points on every curve.Since the vector symbol has symmetry, so need to only determine on the right side of x-axis Coordinate points, the x coordinate for being adjusted corresponding symmetric points can express the coordinate points of the other side.
Firstly, the suitable coordinate of Master Node A0 to A8 is assigned as needed, and such as: Master Node A0:(0.0,0.0, 0.0), Master Node A1:(2.0,0.0,0.0).
Secondly, the coordinate at subordinate control point can be obtained such as by 30 ° of apex angle and axial symmetry after Master Node coordinate determines Under:
Subordinate control point B0 depends on Master Node A1, Master Node A2, Master Node A1, Master Node A2 coordinate parameters It is expressed as (x1, y1, z1)、(x2, y2, z2), therefore, the expression formula of subordinate control point B0 are as follows: (tan15 ° × (y1-y2)+x2,- tan15°×(x1-x2)+y2, 0).
Similarly, the expression formula of subordinate control point B1 is (- tan15 ° × (y1-y2)+x2, tan15 ° × (x1-x2)+y2, 0).
Again, the coordinate at each subordinate control point is expressed according to the math label and expression formula of definition.Only citing subordinate The expression at control point 0.
Subordinate control point 0
Finally, being spliced with the various pieces of the expression vector symbol such as point set, element figure.It only lifts herein right in Fig. 4 The example that upper apex angle is drawn.
<Primitive name=" pel 0 " type=" Line " isfilled=" 0 ">// pel index value is 0, class Type is line segment, non-filling
By the index point sequential connection each point of broken line.
Fig. 5 is corresponding vector identification after analyzing platform parses xml document, and Fig. 6 is by the tune to control point The vector identification adjusted of whole acquisition.User can adjust each control point according to their own needs to obtain the dynamic needed for oneself Vector identification.
In conclusion the invention has the following advantages:
(1) the present invention provides a kind of methods for marking and drawing dynamic symbol, and vector symbol is drawn with XML realizes description text Part and the separation for drawing platform obtain the vector identification corresponding to element figure model by parsing symbol XML file, in conjunction with Math label realizes the dynamic adjustment of vector identification, and then the dynamic for realizing symbol is marked and drawed, and drafting accuracy is improved, and is saved A large amount of study professions draw the time of vector icon softwares, provide pole for the vector symbol extension in later period, expansion platform transplantation Big convenience.
(2) the present invention also provides three-dimensional extended spaces, realize that three-dimensional, spatialization are presented vector symbol and provide for future May, it can expand to fields such as geological prospecting, buildings.
As seen through the above description of the embodiments, those skilled in the art can be understood that the present invention can It realizes by means of software and necessary general hardware platform.Based on this understanding, technical solution of the present invention essence On in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software product It can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes certain parts of the embodiment of the present invention or embodiment The method.

Claims (5)

1. the vector quantization symbol dynamic drawing method based on meta graph recognition model, which comprises the steps of:
A, element figure model library is established;
B, descriptor XML file, the symbol XML file include: the root node of descriptor application scenarios and retouch respectively The child node of main control point set, subordinate control point set is stated, the child node of the description main control point set is subordinated to root node, describes The child node of subordinate control point set is subordinated to the child node of description main control point set, wherein
Root node includes pel collection information, and pel collection includes each element figure for combination producing symbol,
The child node of description main control point set includes Master Node location information and description for calculating Master Node position letter The math label of operation is ceased, main control point set is the set for determining the point of each primitive shapes,
The child node for describing subordinate control point set includes subordinate control point position information and description for calculating subordinate control point The math label of location information operation, subordinate control point set are the set for the point that each main Control point of cooperation determines primitive shapes;
C, parsing symbol XML file obtains the vector identification for corresponding to element figure model library, extracts the master control of each vector identification Dot position information processed, subordinate control point position information;
D, according to element figure model library, believed according to the Master Node position of the step C vector identification parsed and extraction Breath, subordinate control point position information mark and draw pel, combine each primitive generating symbol.
2. the vector quantization symbol dynamic drawing method based on meta graph recognition model according to claim 1, which is characterized in that step In the symbol XML file of rapid B description, root node also includes superset, and superset includes the constitutional diagram for combination producing symbol Member.
3. the vector quantization symbol dynamic drawing method based on meta graph recognition model according to claim 1, which is characterized in that root Node, the child node for describing main control point set, the child node of description subordinate control point set all include description itself and other nodes The index information of correlation.
4. according to claim 1 to the vector quantization symbol dynamic drawing method described in any one of 3 based on meta graph recognition model, It is characterized in that, subordinate control point position information described in step C is mentioned according to the positional relationship at subordinate control point and Master Node It takes.
5. the vector quantization symbol dynamic drawing method based on meta graph recognition model according to claim 1, which is characterized in that step The element figure model library established in rapid A includes: line chart member, circle diagram member, circular arc pel, rectangular element, curve pel, polygon Pel.
CN201610596850.1A 2016-07-26 2016-07-26 Vector quantization symbol dynamic drawing method based on meta graph recognition model Active CN106250129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610596850.1A CN106250129B (en) 2016-07-26 2016-07-26 Vector quantization symbol dynamic drawing method based on meta graph recognition model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610596850.1A CN106250129B (en) 2016-07-26 2016-07-26 Vector quantization symbol dynamic drawing method based on meta graph recognition model

Publications (2)

Publication Number Publication Date
CN106250129A CN106250129A (en) 2016-12-21
CN106250129B true CN106250129B (en) 2019-04-26

Family

ID=57604066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610596850.1A Active CN106250129B (en) 2016-07-26 2016-07-26 Vector quantization symbol dynamic drawing method based on meta graph recognition model

Country Status (1)

Country Link
CN (1) CN106250129B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599272A (en) * 2016-12-23 2017-04-26 北京超图软件股份有限公司 Graphic object dynamic plotting method, apparatus and system at browser end
CN108319991B (en) * 2017-01-16 2021-02-09 航天信息股份有限公司 Node engineering wiring diagram determining method and device
CN107145655B (en) * 2017-04-25 2020-12-08 南京南瑞集团公司 Method for establishing power grid equipment vector primitive symbolic model containing topological information
CN109887058A (en) * 2018-11-07 2019-06-14 上海艾麒信息科技有限公司 Cross-platform drafting system
CN111880883A (en) * 2020-07-29 2020-11-03 北京中水科水电科技开发有限公司 Dynamic combined primitive realization method based on equipment object
CN112802158B (en) * 2021-01-18 2022-05-24 中国人民解放军国防科技大学 Large-scale dynamic symbol plotting method based on multi-scale visualization
CN113553635A (en) * 2021-06-28 2021-10-26 通号城市轨道交通技术有限公司 Method and device for configuring graph base primitive, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002073454A2 (en) * 2001-03-14 2002-09-19 Microsoft Corporation Schemas for a notification platform and related information services
CN103473068A (en) * 2013-09-24 2013-12-25 北京天源科创风电技术有限责任公司 Customizing system and customizing method for graph real-time monitoring interface based on SVG (Scalable Vector Graphics)
CN104699483A (en) * 2015-03-16 2015-06-10 东方电子股份有限公司 Efficient achieving method for WEB assembly

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002073454A2 (en) * 2001-03-14 2002-09-19 Microsoft Corporation Schemas for a notification platform and related information services
CN103473068A (en) * 2013-09-24 2013-12-25 北京天源科创风电技术有限责任公司 Customizing system and customizing method for graph real-time monitoring interface based on SVG (Scalable Vector Graphics)
CN104699483A (en) * 2015-03-16 2015-06-10 东方电子股份有限公司 Efficient achieving method for WEB assembly

Also Published As

Publication number Publication date
CN106250129A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN106250129B (en) Vector quantization symbol dynamic drawing method based on meta graph recognition model
CN109299446B (en) Report generation method and device
CN101589384B (en) System and method for measuring svg document similarity
TWI441538B (en) System and method for preferred services in nomadic environments
CN109918478A (en) The method and apparatus of knowledge based map acquisition geographic products data
CN108446517B (en) Method and system for cross-software platform interaction of three-dimensional design data of power transmission and transformation
CN105094775B (en) Webpage generation method and device
CN101620636B (en) Method and apparatus for displaying tabular data
CN110119294A (en) The generation method of menu page, apparatus and system
CN108205960B (en) Method and device for rendering characters, electronic map making system and navigation system
CN110442330A (en) List element conversion method, device, electronic equipment and storage medium
CN105787156B (en) A kind of submodel generation method extracted based on IFC solid datas
CN107798017B (en) Method and system for generating execution plan information in distributed database
CN104778258A (en) Data extraction method oriented to protocol dataflow
CN103729457A (en) Digitalized book auxiliary reading system based on Internet, and method thereof
CN110019835A (en) Resource method of combination, device and electronic equipment
CN103399870A (en) Visual word bag feature weighting method and system based on classification drive
WO2018226349A1 (en) Vector graphics handling processes for user applications
CN104679453A (en) Information input, storage, typesetting and printing general system and information input, storage, typesetting and printing method
CN107438194A (en) A kind of intelligent television UI object rendering methods and intelligent television
CN108846893B (en) Trivector ground drawing generating method and device
CN104091367A (en) Three-dimensional scene storage method and device based on OGRE
CN110232131A (en) Intention material searching method and device based on intention label
CN108959664A (en) Distributed file system based on picture processor
CN111178083A (en) Semantic matching method and device for BIM and GIS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant