CN109767479A - A kind of glyph filling method and system based on dynamic boundary group sequence - Google Patents

A kind of glyph filling method and system based on dynamic boundary group sequence Download PDF

Info

Publication number
CN109767479A
CN109767479A CN201811524954.7A CN201811524954A CN109767479A CN 109767479 A CN109767479 A CN 109767479A CN 201811524954 A CN201811524954 A CN 201811524954A CN 109767479 A CN109767479 A CN 109767479A
Authority
CN
China
Prior art keywords
point
filling
boundary
pel
filled
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
CN201811524954.7A
Other languages
Chinese (zh)
Other versions
CN109767479B (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 SAC Automation Co Ltd
Original Assignee
Nanjing SAC Automation Co Ltd
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 SAC Automation Co Ltd filed Critical Nanjing SAC Automation Co Ltd
Priority to CN201811524954.7A priority Critical patent/CN109767479B/en
Publication of CN109767479A publication Critical patent/CN109767479A/en
Application granted granted Critical
Publication of CN109767479B publication Critical patent/CN109767479B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)

Abstract

The present invention discloses a kind of glyph filling method and system based on dynamic boundary group sequence, and method includes: the starting point coordinate for obtaining pel to be filled;It using scan line since row/column where starting point, by row/column treats filling pel region and is scanned, until there is no the boundary points of pel to be filled then to stop scanning for the row/column scanned;The intersecting point coordinate for obtaining scan line and primitive boundary to be filled, marks its frontier properties, and be successively pressed into preset boundary group sequence storehouse;To each intersection point in the group sequence storehouse of boundary, it is combined by into storehouse sequencing and frontier properties, generates the filling line segment of single filling point and/or at least one using two adjoining nodes as two-end-point;The coordinates regional covered to each filling point or filling line segment carries out the filling of pre-set color.The accuracy of primitive boundary can be improved in the present invention, avoids a large amount of recurring problems in traditional fill method, saves stack space, improves glyph filling efficiency.

Description

A kind of glyph filling method and system based on dynamic boundary group sequence
Technical field
The present invention relates to the pel rendering technique fields in power system visualization engineering, especially a kind of to be based on dynamic side The glyph filling method and system of boundary's group sequence.
Background technique
Glyph filling refers to the process of that the interior pixels by an irregular pel are filled with specified fill color, in electric power Have a wide range of applications in system pel field of drawing and figure show in an important classification.
With the rapid development of power industry, the rendering request of system pel is also higher and higher.And the color filling of pel As an important branch in drafting, the solution of complete set is needed, positions the interior zone position of pel, it is efficiently quasi- True carry out glyph filling.
Traditional completion method is roughly divided into two kinds, and one is injection methods, also known as flood completion method, it does not emphasize region Boundary position, but a pixel is set as filling aim colour, then judge the surrounding neighbors of the point with the presence or absence of identical The point of color just starts setting up if it exists from some specified position as designated color and then recurrence up to the same of all connections The point of kind color all becomes designated color, to realize filling effect;Another kind is se ed filling algorithm, its basic thought is true The border pixel values of fixed every a line specify a pixel as filling mark, with given pixel from some target area Value successively handles each pixel, the stopping when encountering boundary pixel point with direction filling from inside to outside.Inject lacking for completion method It puts and is accurately position boundary, efficiency is not also high;The recursive hierarchical of seed fill algorithm with filling region increase And increase, be easy to cause spilling, and when due to recursive call function many pixels need it is accessed repeatedly, space expense Greatly, efficiency of algorithm is not equally high.
Summary of the invention
The object of the present invention is to provide a kind of glyph filling methods based on dynamic boundary group sequence, improve primitive boundary Accuracy avoids a large amount of recurring problems in traditional fill method, saves stack space, improves glyph filling efficiency.
The technical scheme adopted by the invention is as follows: a kind of glyph filling method based on dynamic boundary group sequence, comprising:
Obtain the starting point coordinate of pel to be filled;
Using scan line since row/column where starting point, by row/column treats filling pel region and be scanned, directly To the row/column scanned, there is no the boundary points of pel to be filled then to stop scanning;
The intersecting point coordinate for obtaining scan line and primitive boundary to be filled, marks its frontier properties, and be successively pressed into preset In the group sequence storehouse of boundary;
It to each intersection point in the group sequence storehouse of boundary, is combined, generates single by into storehouse sequencing and frontier properties The filling line segment of a filling point and/or at least one using two adjoining nodes as two-end-point;
The coordinates regional and/or filling points that covered to each filling line segment carry out the filling of pre-set color.
The present invention is in use, when last line or a column scan finish, and then the filling of filling line segment finishes accordingly, then The filling of pel to be filled is also completed.The present invention obtains the boundary point in glyph filling region using scan line, and pel side can be improved The accuracy on boundary, while the present invention, by setting boundary group sequence storehouse, dynamic storage scans obtained pel region every time Boundary point, and then by the filling conversion of pel for the filling to filling line segment, and the filling for filling line segment to every only identifies Its two-end-point avoids the complicated processes of coordinate points judgement one by one, is greatly improved the efficiency of glyph filling.
Preferably, the starting point coordinate of the pel to be filled is the apex coordinate of pel to be filled, and obtaining step includes:
S101 obtains any point coordinate inside pel to be filled;
S102, since the point coordinate that S101 is obtained, traversal obtains the step point of first pixel value from bottom to top, by the step Point is used as first boundary point;
S103 traverses up the step point of pixel value since first boundary point line by line, or with first boundary point pixel It is worth identical point, until when no longer monitoring to put accordingly, previous row is traversed for certain a line Far Left or rightmost Starting point of the point as filling scanning, and obtain the coordinate of the point.
Step S101 can arbitrarily be clicked by manually by mouse specified.
As other embodiments, the starting point coordinate of the pel to be filled be pel to be filled minimum point coordinate, Left end apex coordinate or right end apex coordinate.Acquisition modes all can refer to the obtaining step on vertex, adjust traversal order.Afterwards Continuous when being scanned using scan line, according to the difference of filling starting point, horizontal line is can be used (for filling starting point in scan line For vertex or minimum point) or vertical line (being Zuo Dingdian or right vertex for filling starting point), scanning sequency can also be adapted to The adjustment of property.
When filling the vertex or minimum point that starting point is pel to be filled, the scan line is that ordinate is sweeping for y Line is retouched, each row of pel region to be filled is gradually scanned using the scan line.Under this embodiment, the present invention is treated The integral-filled sequence of pel is filled as from top to bottom or from top to bottom.
When filling the left end vertex or right end vertex that starting point is pel to be filled, the scan line is that abscissa is x Scan line, each column of pel region to be filled are gradually scanned using the scan line.Under this embodiment, the present invention The integral-filled sequence of filling pel is treated as from left to right or from right to left.
Preferably, the invention also includes: obtain the starting point pixel value of pel to be filled;It is scanned using scan line When, it is whether identical as the filling pixel value of starting point according to the pixel value of scanned point, judge respective point whether be scan line with The intersection point of primitive boundary to be filled;The frontier properties of the intersection point are that filling starting or filling terminate.It is swept if pixel is identical Described point is boundary point.The boundary point of pel to be filled " row or column of scanning be not present " namely corresponding scan line not with Graph element intersecting to be filled.The frontier properties of intersection point provide foundation for the generation of subsequent filling line segment, and the label of the attribute can basis The point generates the number that moment current scan line intersects with primitive boundary to be filled to determine, then frontier properties are filling to odd-times Starting, then frontier properties are that filling terminates to even-times, and when being subsequently generated filling line segment, line segment is terminated from filling starting point to filling Point fills into intermediate coordinate points.
As another embodiment, it when being scanned using scan line, is swept according to current scanned point with previous Whether the pixel of described point occurs step, judges whether current scanned point is boundary point.If previous scanned point is boundary point, Step has occurred in current scan point pixel, then current scanned point is non-boundary point;If previous scanned point is non-boundary point, Step has occurred in current scan point pixel, then current scanned point is boundary point, and step does not occur, and then current scan point is still non- Boundary point.
Further, when boundary point identification is using pixel value step rule: when being scanned using scan line, sweeping every time Before retouching, preset filling flag bit is initialized, in scanning process, Spline smoothing occurs for scanned point pixel then corresponding every time Switch filling mark place value between zero and one once;
For each intersection point of scan line and pel to be filled, corresponding intersection point is generated into moment corresponding filling together with it and is indicated Boundary group sequence storehouse is written in place value.This makes the present invention when generating filling line segment, can be identified by filling flag bit wait fill out The boundary for filling pel, guaranteeing that each item fills the coordinate points that line segment is covered is all the point inside pel to be filled, and then after guarantee The continuous filling to filling line segment is correct.
As an implementation, every time scanning before, will filling flag bit be initialized as 0, current scan line with wait fill out When the boundary intersection number for filling pel is odd-times, setting filling flag bit is 1, when intersecting number is even-times, sets filling mark Will position is 0;
For being pressed into each intersection point of boundary group sequence storehouse, according to its corresponding filling mark place value: based on indentation sequencing It is combined between any two from 1 to 0, obtains the filling starting point and end-of-fill point of each filling line segment;Or for the latter Intersection point is still the filling starting point for filling starting point, separately as a filling point.When subsequent filling, then it is from filling flag bit 1 intersection point starts to fill, the intersection point then end-of-fill for being 0 to filling flag bit, for single filling point according to other boundary points It is filled.
Certainly, the 0/1 state setting for filling flag bit can be exchanged.
Invention additionally discloses a kind of glyph filling systems based on dynamic boundary group sequence, comprising:
It fills starting point and obtains module, for obtaining the starting point coordinate of pel to be filled;
Boundary point scan module, for treating filling pel region line by line or column by column since starting point using scan line It is scanned, until there is no the boundary points of pel to be filled then to stop scanning for the row or column scanned;
Boundary point coordinate obtaining module is pressed for obtaining the intersecting point coordinate of scan line Yu pel to be filled in real time, and successively Enter in preset boundary group sequence storehouse;
Line segment generation module is filled, for carrying out group two-by-two by stacking order is entered to each intersection point in the group sequence storehouse of boundary It closes, obtains filling line segment of at least one using intersection point combination as two-end-point;
And color filling module, coordinates regional and/or filling point for being covered to each filling line segment carry out pre-set color Filling.
Beneficial effect
The present invention combines dynamic group sequence storehouse by obtaining filling pel boundary point using scan-line algorithm, according to boundary Point generates filling line segment in real time, and the filling for filling pel is converted to the filling to multiple filling line segments respectively, the process of filling Avoid recurrence, improve conventional method pass in return a large amount of pixel when calling function need it is accessed repeatedly caused by sky Between the big problem of expense, substantially increase charging efficiency, can be significantly excellent for the circuit diagram for possessing large amount of complex pel Change the time of loading and its display of its picture.Meanwhile the present invention passes through scan-line algorithm combination marker to filling pel side Boundary is judged, the assurance to boundary is also improved while improving charging efficiency, can improve the problem of filling is crossed the border.
Detailed description of the invention
Fig. 1 show the method for the present invention flow diagram.
Specific embodiment
It is further described below in conjunction with the drawings and specific embodiments.
During glyph filling of the present invention, in order to improve the efficiency of glyph filling, primitive boundary to be filled is first passed through It obtains, calculates the minimum filling section of filling line segment, rather than point carries out pixel filling one by one.Simultaneously, it is contemplated that draw figure The shape particularity of member, the present invention is provided with memory space, that is, dynamic boundary group sequence storehouse of a storehouse, dynamically to store The intersection point of scan line and filling primitive boundary, using the line segment between every two adjacent intersection point as filling line segment, multiple fillings The covered coordinate points of line segment form filling target point group sequence, therefore do not need to use recursive side as other filling algorithms All pixels point also untreated around current region is all pressed into storehouse by formula.
The present invention scans pel region position, every scanning from top to bottom or from left to right in the way of scan line Line all can generate a series of intersection point with the boundary of pel, these intersection points be ranked up according to coordinate, then by the point after sequence Filling line segment, two endpoints of the every two point as filling line segment are reassembled into, and are sequentially filled pixel according to coordinate sequence Segment, until encountering boundary.
Embodiment 1
The present invention is based on the glyph filling methods of dynamic boundary group sequence, comprising:
Obtain the starting point coordinate of pel to be filled;
It treats filling pel region line by line or column by column since starting point using scan line to be scanned, until being scanned Row or column then stop scanning there is no the boundary point of pel to be filled;
The intersecting point coordinate of scan line and primitive boundary to be filled is obtained in real time, and is successively pressed into preset boundary group sequence heap In stack;
To each intersection point in the group sequence storehouse of boundary, it is combined by into stacking order, obtains at least one with intersection point group cooperation For the filling line segment of two-end-point;
The coordinates regional and/or filling points that covered to each filling line segment carry out the filling of pre-set color.
The starting point coordinate of the pel to be filled is the apex coordinate of pel to be filled, and obtaining step includes:
S101 obtains any point coordinate inside pel to be filled;
S102, since the point coordinate that S101 is obtained, traversal obtains the step point of first pixel value from bottom to top, by the step Point is used as first boundary point;
S103 traverses up the step point of pixel value since first boundary point line by line, or with first boundary point pixel It is worth identical point, until when no longer monitoring to put accordingly, previous row is traversed for certain a line Far Left or rightmost Starting point of the point as filling scanning, and obtain the coordinate of the point.
Step S101 can arbitrarily be clicked by manually by mouse specified.
As other embodiments, the starting point coordinate of the pel to be filled be pel to be filled minimum point coordinate, Left end apex coordinate or right end apex coordinate.Acquisition modes all can refer to the obtaining step on vertex, adjust traversal order.Afterwards Continuous when being scanned using scan line, according to the difference of filling starting point, horizontal line is can be used (for filling starting point in scan line For vertex or minimum point) or vertical line (being Zuo Dingdian or right vertex for filling starting point), scanning sequency can also be adapted to The adjustment of property.
When filling the vertex or minimum point that starting point is pel to be filled, the scan line is that ordinate is sweeping for y Line is retouched, each row of pel region to be filled is gradually scanned using the scan line.Under this embodiment, the present invention is treated The integral-filled sequence of pel is filled as from top to bottom or from top to bottom.
When filling the left end vertex or right end vertex that starting point is pel to be filled, the scan line is that abscissa is x Scan line, each column of pel region to be filled are gradually scanned using the scan line.Under this embodiment, the present invention The integral-filled sequence of filling pel is treated as from left to right or from right to left.
Further include: obtain the starting point pixel value of pel to be filled;When being scanned using scan line, according to scanned point Pixel value whether with filling the pixel value of starting point it is identical, judge whether respective point is scan line and primitive boundary to be filled Intersection point;The frontier properties of the intersection point are that filling starting or filling terminate.Then being scanned point if they are the same is boundary point.It is described " to sweep The boundary point of pel to be filled is not present in the row or column retouched " namely corresponding scan line not with graph element intersecting to be filled.
As another embodiment, it when being scanned using scan line, is swept according to current scanned point with previous Whether the pixel of described point occurs step, judges whether current scanned point is boundary point.If previous scanned point is boundary point, Step has occurred in current scan point pixel, then current scanned point is non-boundary point;If previous scanned point is non-boundary point, Step has occurred in current scan point pixel, then current scanned point is boundary point, and step does not occur, and then current scan point is still non- Boundary point.
Further, when boundary point identification is using pixel value step rule: when being scanned using scan line, sweeping every time Before retouching, preset filling flag bit is initialized, in scanning process, Spline smoothing occurs for scanned point pixel then corresponding every time Switch filling mark place value between zero and one once;
For each intersection point of scan line and pel to be filled, corresponding intersection point is generated into moment corresponding filling together with it and is indicated Boundary group sequence storehouse is written in place value.This makes the present invention when generating filling line segment, can be identified by filling flag bit wait fill out The boundary for filling pel, guaranteeing that each item fills the coordinate points that line segment is covered is all the point inside pel to be filled, and then after guarantee The continuous filling to filling line segment is correct.
As an implementation, every time scanning before, will filling flag bit be initialized as 0, current scan line with wait fill out When the boundary intersection number for filling pel is odd-times, setting filling flag bit is 1, when intersecting number is even-times, sets filling mark Will position is 0;
For being pressed into each intersection point of boundary group sequence storehouse, according to its corresponding filling mark place value: based on indentation sequencing It is combined between any two from 1 to 0, obtains the filling starting point and end-of-fill point of each filling line segment;Or for the latter Intersection point is still the filling starting point for filling starting point, separately as a filling point.When subsequent filling, then it is from filling flag bit 1 intersection point starts to fill, the intersection point then end-of-fill for being 0 to filling flag bit.
Certainly, the 0/1 state setting for filling flag bit can be exchanged.
Embodiment 2
Refering to what is shown in Fig. 1, method of the present embodiment based on dynamic boundary group Sequence Filling pel, comprising steps of
S1 obtains filling starting point coordinate, comprising:
S101 is clicked inside any point of pel to be filled using mouse, obtains the coordinate;
S102 traverses to obtain first coboundary of the pel to be filled of respective column from bottom to top since the point coordinate of selection Point;
S103, since first coboundary point, according to from left to right, traversal mode from bottom to top, traversal to certain a line not Boundary point is monitored again, then is filled out the left boundary of the previous row of row point as the starting point of filling scanning namely scan line Initial point is filled up, the coordinate is obtained;
Since S2 carry out pel scanning using scan line filling starting point from left to right line by line;Filling is marked before scanning every time Will position is initialized as 0, and first intersection point that scan line and graph element intersecting generate is filling initial point p1, accordingly indicates filling Position flag is set to 1;
Scanning continues, and scans all until scan line encounters the boundary of corresponding line every time, during this period scan line and primitive boundary Filling flag bit flag is set to 1 when the number of intersection is odd-times, indicates entry into filling region, and intersection number is schemed when being even-times Member filling flag bit flag is set to 0, indicates filling halt;Since the location of p1 point, when flag becomes 0, record Boundary point p2, and so on until single sweep operation terminate, carry out the scanning of next line;
S3, the intersection point for obtaining scan line and primitive boundary charge to dynamic boundary group sequence, can enter dynamic according to intersection point at this time The sequence of boundary group sequence, and flag bit is filled accordingly, the combination of endpoint is carried out, such as P1 and P2, i.e., by p1 to p2 Between in lateral all coordinate points write-in dynamic coordinate group H, generate P1 point to the filling line segment of P2, this step avoids one by one Coordinate points judge cumbersome, only need to obtain the left and right boundary point in a certain section, then automatically generate filling straightway, subtract significantly The processing time is lacked;
Continue next section scanning judgement, by flag from 0 become 1 corresponding coordinate point be set to it is next filling section starting Flag mark 1 until when scan line, which meets next one boundary flag, becomes 0, and is become the coordinate between 0 by point It is successively added in set of coordinates H, similarly generates all filling line segments.The step is being improved to a certain degree to primitive boundary restriction Accuracy also can be effectively carried out judgement especially for irregular pel, avoid filling cross the border;
S4, the coordinates regional and/or filling points that covered to each filling line segment carry out the filling of pre-set color.
The present embodiment can successively refer to the coordinate in dynamic boundary group sequence H after each single row scan Determine the drafting of color, the y-coordinate of scan line is then added into 1 pixel unit, moves to next line scanning, scan operation is until certain a line Stopping when no longer there is pel area coordinate.
After set of coordinates traversal filling in dynamic boundary group sequence, glyph filling is completed therewith.
Verified, compared to existing technical solution, inventive method as described herein avoids a large amount of recurrence, saves A large amount of stack spaces, filling time shorten 30 percent;Filling for pel region solves existing method to not advising Then the filling that is be easy to cause of limitation of primitive boundary judgement crosses the border, especially dirty point, unfilled corner etc. occurs in pel corner and ask Topic, substantially increases the accuracy of glyph filling, also ensures the high efficiency of glyph filling.
Embodiment 3
The present embodiment is a kind of glyph filling system based on dynamic boundary group sequence, comprising:
It fills starting point and obtains module, for obtaining the starting point coordinate of pel to be filled;
Boundary point scan module, for since row/column where starting point, by row/column treating filling pel using scan line Region is scanned, until there is no the boundary points of pel to be filled then to stop scanning for the row/column scanned;
Boundary point coordinate obtaining module marks its side for obtaining the intersecting point coordinate of scan line Yu primitive boundary to be filled Boundary's attribute, and be successively pressed into preset boundary group sequence storehouse;
Fill line segment generation module, for each intersection point in the group sequence storehouse of boundary, by the sequencing for entering storehouse and Frontier properties are combined, and generate the filling line segment of single filling point and/or at least one using two adjoining nodes as two-end-point;
And color filling module, coordinates regional and/or filling point for being covered to each filling line segment carry out pre-set color Filling.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
The embodiment of the present invention is described in conjunction with attached drawing above, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of glyph filling method based on dynamic boundary group sequence, characterized in that include:
Obtain the starting point coordinate of pel to be filled;
Using scan line since row/column where starting point, by row/column treats filling pel region and be scanned, directly To the row/column scanned, there is no the boundary points of pel to be filled then to stop scanning;
The intersecting point coordinate for obtaining scan line and primitive boundary to be filled, marks its frontier properties, and be successively pressed into preset In the group sequence storehouse of boundary;
To each intersection point in the group sequence storehouse of boundary, it is combined, generates by the sequencing and frontier properties that enter storehouse The single filling line segment of filling point and/or at least one using two adjoining nodes as two-end-point;
The coordinates regional and/or filling points that covered to each filling line segment carry out the filling of pre-set color.
2. according to the method described in claim 1, it is characterized in that, the starting point coordinate of the pel to be filled is pel to be filled Apex coordinate, obtaining step includes:
S101 obtains any point coordinate inside pel to be filled;
S102, since the point coordinate that S101 is obtained, traversal obtains the step point of first pixel value from bottom to top, by the step Point is used as first boundary point;
S103 traverses up the step point of pixel value since first boundary point line by line, or with first boundary point pixel It is worth identical point, until when no longer monitoring to put accordingly, previous row is traversed for certain a line Far Left or rightmost Starting point of the point as filling scanning, and obtain the coordinate of the point.
3. according to the method described in claim 2, it is characterized in that, the starting point coordinate of the pel to be filled is pel to be filled Minimum point coordinate, left end apex coordinate or right end apex coordinate.
4. according to the method described in claim 1, it is characterized in that, the scan line is the scan line that ordinate is y, using described Scan line gradually scans each row of pel region to be filled.
5. according to the method described in claim 1, it is characterized in that, the scan line is the scan line that abscissa is x, using described Scan line gradually scans each column of pel region to be filled.
6. according to the method described in claim 1, it is characterized in that, further includes: obtain the starting point pixel value of pel to be filled;Benefit When being scanned with scan line, whether identical as the filling pixel value of starting point according to the pixel value of scanned point, judgement is corresponding Point whether be scan line Yu primitive boundary to be filled intersection point;The frontier properties of the intersection point are that filling starting or filling terminate.
7. according to the method described in claim 1, it is characterized in that, when being scanned using scan line, according to current scanned point Step whether occurs with the pixel of previous scanned point, judges whether current scanned point is boundary point.
8. according to the method described in claim 7, it is characterized in that, when being scanned using scan line, every time scanning before, will be pre- If the initialization of filling flag bit, in scanning process, a Spline smoothing, which occurs, for scanned point pixel every time then marks accordingly filling Will place value switches once between zero and one;
For each intersection point of scan line and pel to be filled, corresponding intersection point is generated into moment corresponding filling together with it and is indicated Boundary group sequence storehouse is written in place value.
9. according to the method described in claim 8, it is characterized in that, every time scanning before, will filling flag bit be initialized as 0, working as Preceding scan line intersect with the boundary of pel to be filled number be odd-times when, set filling flag bit be 1, intersection number be even number When secondary, setting filling flag bit is 0;
For being pressed into each intersection point of boundary group sequence storehouse, according to its corresponding filling mark place value: based on indentation sequencing It is combined between any two from 1 to 0, obtains the filling starting point and end-of-fill point of each filling line segment;Or for the latter Intersection point is still the filling starting point for filling starting point, separately as a filling point.
10. a kind of glyph filling system based on dynamic boundary group sequence, characterized in that include:
It fills starting point and obtains module, for obtaining the starting point coordinate of pel to be filled;
Boundary point scan module, for since row/column where starting point, by row/column treating filling pel using scan line Region is scanned, until there is no the boundary points of pel to be filled then to stop scanning for the row/column scanned;
Boundary point coordinate obtaining module marks its side for obtaining the intersecting point coordinate of scan line Yu primitive boundary to be filled Boundary's attribute, and be successively pressed into preset boundary group sequence storehouse;
Fill line segment generation module, for each intersection point in the group sequence storehouse of boundary, by the sequencing for entering storehouse and Frontier properties are combined, and generate the filling line segment of single filling point and/or at least one using two adjoining nodes as two-end-point;
And color filling module, coordinates regional and/or filling point for being covered to each filling line segment carry out pre-set color Filling.
CN201811524954.7A 2018-12-13 2018-12-13 Dynamic boundary group sequence-based primitive filling method and system Active CN109767479B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811524954.7A CN109767479B (en) 2018-12-13 2018-12-13 Dynamic boundary group sequence-based primitive filling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811524954.7A CN109767479B (en) 2018-12-13 2018-12-13 Dynamic boundary group sequence-based primitive filling method and system

Publications (2)

Publication Number Publication Date
CN109767479A true CN109767479A (en) 2019-05-17
CN109767479B CN109767479B (en) 2023-03-24

Family

ID=66451808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811524954.7A Active CN109767479B (en) 2018-12-13 2018-12-13 Dynamic boundary group sequence-based primitive filling method and system

Country Status (1)

Country Link
CN (1) CN109767479B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110719129A (en) * 2019-10-14 2020-01-21 沈阳市电信规划设计院股份有限公司 Point location correction system based on communication basic resource intelligent management data
CN112347727A (en) * 2019-08-08 2021-02-09 深圳市立创软件开发有限公司 Filling type copper-clad method, system, equipment and storage medium supporting arc edges
CN112465930A (en) * 2020-11-10 2021-03-09 深圳市益欣网络科技有限公司 Scanning line seed filling method
CN113191311A (en) * 2021-05-19 2021-07-30 广联达科技股份有限公司 Filling boundary identification method, device and equipment of vector PDF drawing and storage medium
CN115294236A (en) * 2022-10-08 2022-11-04 广州中望龙腾软件股份有限公司 Bitmap filling method, terminal and storage medium
CN115294235A (en) * 2022-10-08 2022-11-04 广州中望龙腾软件股份有限公司 Bitmap-based graphic filling method, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101082980A (en) * 2006-06-01 2007-12-05 上海吉量软件科技有限公司 Intersection point matched pair stuffing algorithm
CN101201938A (en) * 2006-12-13 2008-06-18 上海吉量软件科技有限公司 Filling algorithm for rapidly matching pair of left and right boundary point
CN102693525A (en) * 2012-05-08 2012-09-26 北京航空航天大学 Method for solving problem of pixel multiple accesses to stack in seed filling algorithm
CN108961359A (en) * 2018-05-17 2018-12-07 长沙八思量信息技术有限公司 Laser marking system and its filling algorithm of closed figures, storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101082980A (en) * 2006-06-01 2007-12-05 上海吉量软件科技有限公司 Intersection point matched pair stuffing algorithm
CN101201938A (en) * 2006-12-13 2008-06-18 上海吉量软件科技有限公司 Filling algorithm for rapidly matching pair of left and right boundary point
CN102693525A (en) * 2012-05-08 2012-09-26 北京航空航天大学 Method for solving problem of pixel multiple accesses to stack in seed filling algorithm
CN108961359A (en) * 2018-05-17 2018-12-07 长沙八思量信息技术有限公司 Laser marking system and its filling algorithm of closed figures, storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347727A (en) * 2019-08-08 2021-02-09 深圳市立创软件开发有限公司 Filling type copper-clad method, system, equipment and storage medium supporting arc edges
CN110719129A (en) * 2019-10-14 2020-01-21 沈阳市电信规划设计院股份有限公司 Point location correction system based on communication basic resource intelligent management data
CN110719129B (en) * 2019-10-14 2020-06-23 沈阳市电信规划设计院股份有限公司 Point location correction system based on communication basic resource intelligent management data
CN112465930A (en) * 2020-11-10 2021-03-09 深圳市益欣网络科技有限公司 Scanning line seed filling method
CN113191311A (en) * 2021-05-19 2021-07-30 广联达科技股份有限公司 Filling boundary identification method, device and equipment of vector PDF drawing and storage medium
CN113191311B (en) * 2021-05-19 2024-04-16 广联达科技股份有限公司 Method, device, equipment and storage medium for identifying filling boundary of vector PDF drawing
CN115294236A (en) * 2022-10-08 2022-11-04 广州中望龙腾软件股份有限公司 Bitmap filling method, terminal and storage medium
CN115294235A (en) * 2022-10-08 2022-11-04 广州中望龙腾软件股份有限公司 Bitmap-based graphic filling method, terminal and storage medium
CN115294236B (en) * 2022-10-08 2023-03-10 广州中望龙腾软件股份有限公司 Bitmap filling method, terminal and storage medium

Also Published As

Publication number Publication date
CN109767479B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN109767479A (en) A kind of glyph filling method and system based on dynamic boundary group sequence
Wu Adaptive split-and-merge segmentation based on piecewise least-square approximation
CN113199480B (en) Track generation method and device, electronic equipment, storage medium and 3D camera
CN105701855B (en) Line style map symbol antialiased rendition method based on symbolic construction
CN108038897A (en) Shadow map generation method and device
CN105740256A (en) Generation method and generation device of three-dimensional map
CN110148137B (en) Image cutting method and system of rotary display screen based on splicing
US20200286285A1 (en) Automated mesh generation
CN113199479A (en) Trajectory generation method and apparatus, electronic device, storage medium, and 3D camera
CN103761708B (en) Image repair method based on outline
CN109448088B (en) Method and device for rendering three-dimensional graphic wire frame, computer equipment and storage medium
Yuan et al. Generalized Voronoi diagram computation on GPU
CN106199745B (en) A kind of recognition methods of the pore throat of connection
CN106303153B (en) A kind of image processing method and device
CN112348781A (en) Method, device and equipment for detecting height of reference plane and storage medium
CN115641436A (en) Region segmentation method and device and robot device
CN108986212B (en) Three-dimensional virtual terrain LOD model generation method based on crack elimination
CN105224325B (en) Rendering method and device
CN114839981A (en) Robot motion trajectory generation method based on indoor three-dimensional scene and storage medium
CN111260723B (en) Barycenter positioning method of bar and terminal equipment
CN102542527B (en) A kind of method and system of changing image shape
CN109816613A (en) Image completion method and device
CN110969567A (en) GPU line element rasterization translation coordinate system scanning method
CN116912395B (en) Graphics hybrid rendering method and device based on OpenGL and storage medium
CN115270530B (en) Method, system, device and medium for rapidly establishing progress visualization model

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