CN108520523A - A kind of line drawing figure framework extraction method retaining non-close curve - Google Patents
A kind of line drawing figure framework extraction method retaining non-close curve Download PDFInfo
- Publication number
- CN108520523A CN108520523A CN201810242570.XA CN201810242570A CN108520523A CN 108520523 A CN108520523 A CN 108520523A CN 201810242570 A CN201810242570 A CN 201810242570A CN 108520523 A CN108520523 A CN 108520523A
- Authority
- CN
- China
- Prior art keywords
- line drawing
- pixel
- circle
- thread
- radius
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
A kind of line drawing figure framework extraction method retaining non-close curve, can automatically extract the line drawing figure of rasterizing the framework information for reflecting its structure feature, mainly include the following steps that:First, judged using gray threshold, divide input raster line drawing figure;Secondly, all line drawing pixels obtained to segmentation, calculate their maximum inscribed circle;Then, the expansion for each line drawing pixel being calculated with maximum inscribed circle radius is justified, and the set for expanding non-thread portrait element in circle is obtained;Finally, the connected region quantity for expanding non-thread portrait element in circle by the breadth first traversal Algorithm Analysis of figure, thus obtains the framework information and crosspoint pixel of line drawing figure.
Description
Technical field
The present invention relates to a kind of line drawing figure framework extraction methods of the reservation non-close curve using computer technology, can
The framework information for reflecting its structure feature is automatically extracted to the line drawing figure of rasterizing.
Background technology
Line drawing figure is a kind of widely used, deeply by vast Specialty Design teacher and the favorite drawing shape of amateurish painter
Formula.The drafting mode of line drawing figure is extremely simple:Painter sketches the contours of the profile of object and important by style of writing, by lines
Detailed information, to intuitively show the thought of painter.In industrial design and artistic creation flow, line drawing figure is as important
One of preparation work, instruct entire industrial design and artistic creation flow.Although can be adopted now by equipment such as Digitizing plates
Collect all stroke datas in equipment collection line drawing figure painting process, but still has a large amount of line in real production and living
Picture is drawn and is recorded as drawing tool by paper pen.
However, the drafting level due to painter is irregular, rendered object is multifarious and draws the difference of mode
Lead to how to analyze and reuse these line drawing figures as a problem.With the development of computer image technology, it has been found that right
Line drawing region, which carries out skeletal extraction, in line drawing figure can effectively reflect the main component and thought of line drawing figure, and can be by
The skeleton extracted carries out the secondary creation of line drawing figure.Therefore, have become according to the skeletal extraction of line drawing figure and analysis method
A kind of main way of line drawing map analysis.
Existing line drawing figure framework extraction method extracts painter by region segmentation first and wants to sketch the contours by lines
Multiple structural regions out, are then diffused different structural regions, extract the bone in more fine line drawing region
Frame.Such method has preferable skeletal extraction effect for the closed curve of line drawing figure, but can lose non-closed curve
Framework information.These non-closed curve add-backs are come even by post-processing, the topological structure for also resulting in line drawing figure compares
It changes with former line drawing figure.Therefore, there is an urgent need for a kind of line drawing figure framework extraction methods that can preferably retain non-close curve.
Invention content
In order to solve the deficiency of existing line drawing figure framework extraction method, the present invention provides a kind of using computer technology
Retain the line drawing figure framework extraction method of non-close curve, can automatically extract and appoint under the premise of keeping topological property constant
It anticipates the skeleton of a width line drawing figure.
A kind of line drawing figure framework extraction method retaining non-close curve, this method are as follows:
Step 1, it is two parts by intensity slicing to the rasterizing line drawing figure I of input:Mark gray value less than threshold value t's
Pixel is line drawing pixel, constitutes line drawing region;It is non-thread portrait element to mark pixel of the gray value more than or equal to t, constitutes non-line drawing
Region.
Step 2, for all line drawing pixel psi, extract with piFor the center of circle and maximum inscribed circle in the line drawing region,
Remember that the maximum inscribed circle radius is ri, and obtain r 'i=ri+2。
Step 3, with pixel piFor the center of circle, with r 'iFor radius, round C isi, extract circle CiIn it is non-thread portrait element set Gi。
Step 4, pass through the breadth first traversal Algorithm Analysis G of figureiIn connected region number, if GiMiddle connected region
Number is 1, then by the pixel piLabeled as non-skeleton pixel, if GiMiddle connected region number is more than or equal to 2, then by the pixel
piLabeled as Skeleton pixel.Also, if GiMiddle connected region number is greater than or equal to 3, then pixel piBelong in line drawing figure
Crosspoint pixel.
Further, the computational methods of maximum inscribed circle are as follows in step 2:Set initial radius of circle ri=1, under then executing
The cycle in face:With piFor the center of circle, riCircle is done for radius, if not occurring non-thread portrait element, increased radius r in the circlei=ri
+ 1, into recycling next time;If occurring non-thread portrait element in the circle, reduce ri=ri- 1, and stop recycling.In this way
For any one line drawing pixel p in line drawing figurei, all have found the maximum inscribed circle half in corresponding line drawing pixel set
Diameter ri。
Further, the figure in step 4 for breadth first traversal is built in this way:With GiAll non-thread portrait elements are section
Point is connected to adjacent pixel node side, the adjacent eight neighborhood judged using image space, i.e., arbitrary non-image side
The adjacent pixel of edge pixel is eight pixels nearest with it.Finally, the entire G of statistics complete traversaliRequired breadth First time
The number gone through, determines GiPresent in connected region quantity.
The present invention technical concept be:Arbitrary line drawing pixel distance line drawing zone boundary is determined using maximum inscribed circle method
Distance, then the circle is suitably expanded, to the quantity of the connected region of non-thread portrait element in the circle after being expanded, is thus sentenced
Whether the line drawing pixel of breaking is Skeleton pixel, and further determines whether for crosspoint pixel, to obtain the complete bone of the line drawing figure
Frame structural information.
The advantage of the invention is that:By calculating the distance of arbitrary line drawing pixel distance line drawing zone boundary, in conjunction with expansion
This skeleton width restrictive condition of the connected region number of non-thread portrait element in circle afterwards, it is ensured that fully reflection line can be extracted
Draw the skeleton of architectural characteristic.This method has efficiently and retains non-compared with the existing framework extraction method based on corrosion
The characteristics of closed curve structure, and directly the crossover region structure of line drawing figure directly can be analyzed.
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
Fig. 3 is the present invention by the segmentation image after binary conversion treatment
Fig. 4 is the schematic diagram of present invention estimation maximum inscribed circle
Fig. 5 is that the present invention utilizes the schematic diagram for expanding circle extraction skeleton
Fig. 6 is the result schematic diagram of the present invention
Specific implementation mode
With reference to attached drawing, further illustrate the present invention:
The line drawing figure framework extraction method for retaining non-close curve, includes the following steps:
Step 1, it is two parts by intensity slicing to the rasterizing line drawing figure I of input:Mark gray value less than threshold value t's
Pixel is line drawing pixel, constitutes line drawing region;It is non-thread portrait element to mark pixel of the gray value more than or equal to t, constitutes non-line drawing
Region.
Step 2, for all line drawing pixel psi, extract with piFor the center of circle and maximum inscribed circle in the line drawing region,
Remember that the maximum inscribed circle radius is ri, and obtain r 'i=ri+2。
Step 3, with pixel piFor the center of circle, with r 'iFor radius, round C isi, extract circle CiIn it is non-thread portrait element set Gi。
Step 4, pass through the breadth first traversal Algorithm Analysis G of figureiIn connected region number, if GiMiddle connected region
Number is 1, then by the pixel piLabeled as non-skeleton pixel, if GiMiddle connected region number is more than or equal to 2, then by the pixel
piLabeled as Skeleton pixel.Also, if GiMiddle connected region number is greater than or equal to 3, then pixel piBelong in line drawing figure
Crosspoint pixel.
The computational methods of maximum inscribed circle are as follows in step 2:Set initial radius of circle ri=1, then execute following follow
Ring:With piFor the center of circle, riCircle is done for radius, if not occurring non-thread portrait element, increased radius r in the circlei=ri+ 1, into
Enter and recycles next time;If occurring non-thread portrait element in the circle, reduce ri=ri- 1, and stop recycling.In this way for line
Any one line drawing pixel p in picturei, all have found the maximum inscribed circle radius r in corresponding line drawing pixel seti。
Figure in step 4 for breadth first traversal is built in this way:With GiAll non-thread portrait elements are node, to phase
Adjacent pixel node is connected with side, the adjacent eight neighborhood judged using image space, i.e., arbitrary non-image edge pixel
Adjacent pixel be eight pixels nearest with it.Finally, the entire G of statistics complete traversaliTime of required breadth first traversal
Number, determines GiPresent in connected region quantity.
Currently, skeletal extraction is the basis that rasterizing line drawing figure carries out vector quantization, edits a series of processing such as reuse, it is existing
The framework extraction method based on morphological operation be difficult to retain the curve of non-close.The present invention proposes a kind of reservation non-close
The line drawing figure framework extraction method of curve can automatically extract any one width line drawing under the premise of keeping topological property constant
The framework information of figure, while the key nodes such as crosspoint can also be obtained.
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. retaining the line drawing figure framework extraction method of non-close curve, include the following steps:
Step 1, it is two parts by intensity slicing to the rasterizing line drawing figure I of input:Gray value is marked to be less than the pixel of threshold value t
For line drawing pixel, line drawing region is constituted;It is non-thread portrait element to mark pixel of the gray value more than or equal to t, constitutes non-line drawing region;
Step 2, for all line drawing pixel psi, extract with piFor the center of circle and maximum inscribed circle in the line drawing region, note should
Maximum inscribed circle radius is ri, and obtain r 'i=ri+2;
Step 3, with pixel piFor the center of circle, with r 'iFor radius, round C isi, extract circle CiIn it is non-thread portrait element set Gi;
Step 4, pass through the breadth first traversal Algorithm Analysis G of figureiIn connected region number, if GiMiddle connected region number
It is 1, then by the pixel piLabeled as non-skeleton pixel, if GiMiddle connected region number is more than or equal to 2, then by the pixel piMark
It is denoted as Skeleton pixel;Also, if GiMiddle connected region number is greater than or equal to 3, then pixel piBelong to the intersection in line drawing figure
Point pixel.
2. retaining the line drawing figure framework extraction method of non-close curve as described in claim 1, it is characterised in that:The step
In 2, the computational methods of maximum inscribed circle set initial radius of circle r firsti=1, then execute following cycle:With piFor the center of circle,
riCircle is done for radius, if not occurring non-thread portrait element, increased radius r in the circlei=ri+ 1, into recycling next time;Such as
Occur non-thread portrait element in the fruit circle, then reduces ri=ri- 1, and stop recycling;In this way for any one in line drawing figure
Line drawing pixel pi, all have found the maximum inscribed circle radius r in corresponding line drawing pixel seti。
3. retaining the line drawing figure framework extraction method of non-close curve as described in claim 1, it is characterised in that:The step
In 4, the structure of the figure for breadth first traversal is first with GiAll non-thread portrait elements are node, are used adjacent pixel node
Side is connected, the adjacent eight neighborhood judged using image space, i.e., the adjacent pixel of arbitrary non-image edge pixel be with
Its eight nearest pixel;Finally, the entire G of statistics complete traversaliThe number of required breadth first traversal, determines GiMiddle presence
Connected region quantity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810242570.XA CN108520523B (en) | 2018-03-23 | 2018-03-23 | Line drawing framework extraction method capable of reserving non-closed curve |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810242570.XA CN108520523B (en) | 2018-03-23 | 2018-03-23 | Line drawing framework extraction method capable of reserving non-closed curve |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108520523A true CN108520523A (en) | 2018-09-11 |
CN108520523B CN108520523B (en) | 2021-11-23 |
Family
ID=63434069
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810242570.XA Active CN108520523B (en) | 2018-03-23 | 2018-03-23 | Line drawing framework extraction method capable of reserving non-closed curve |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108520523B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111476795A (en) * | 2020-02-27 | 2020-07-31 | 浙江工业大学 | Binary icon notation method based on breadth-first search |
CN117253052A (en) * | 2023-11-20 | 2023-12-19 | 广州中望龙腾软件股份有限公司 | Maximum closure area identification method and device, storage medium and computer equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106097350A (en) * | 2016-06-15 | 2016-11-09 | 大连理工大学 | The image curve extracting method that a kind of chain code combines with graph-theory techniques |
-
2018
- 2018-03-23 CN CN201810242570.XA patent/CN108520523B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106097350A (en) * | 2016-06-15 | 2016-11-09 | 大连理工大学 | The image curve extracting method that a kind of chain code combines with graph-theory techniques |
Non-Patent Citations (2)
Title |
---|
何宇: "数学形态学骨架及其提取与重建算法的研究", 《中国优秀硕士学位论文全文数据库(电子期刊)》 * |
陆宗骐等: "工程图纸矢量化中的线条轮廓跟踪法", 《中国图象图形学报》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111476795A (en) * | 2020-02-27 | 2020-07-31 | 浙江工业大学 | Binary icon notation method based on breadth-first search |
CN117253052A (en) * | 2023-11-20 | 2023-12-19 | 广州中望龙腾软件股份有限公司 | Maximum closure area identification method and device, storage medium and computer equipment |
CN117253052B (en) * | 2023-11-20 | 2024-01-23 | 广州中望龙腾软件股份有限公司 | Maximum closure area identification method and device, storage medium and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN108520523B (en) | 2021-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105528614B (en) | A kind of recognition methods of the cartoon image space of a whole page and automatic recognition system | |
CN102663382B (en) | Video image character recognition method based on submesh characteristic adaptive weighting | |
CN105184292B (en) | The structural analysis of handwritten form mathematical formulae and recognition methods in natural scene image | |
CN102629322B (en) | Character feature extraction method based on stroke shape of boundary point and application thereof | |
CN104299263B (en) | A kind of method that cloud scene is modeled based on single image | |
CN102930561B (en) | Delaunay-triangulation-based grid map vectorizing method | |
CN105117727B (en) | A kind of Location Method of Vehicle License Plate | |
CN103198479B (en) | Based on the SAR image segmentation method of semantic information classification | |
CN113689445B (en) | High-resolution remote sensing building extraction method combining semantic segmentation and edge detection | |
CN105261068A (en) | Micro-CT technology-based reservoir core three-dimensional entity model reconstruction method | |
CN103646247A (en) | Music score recognition method | |
CN101840582B (en) | Boundary digitizing method of cadastral plot | |
CN107038707B (en) | Image segmentation method and device | |
CN108520523A (en) | A kind of line drawing figure framework extraction method retaining non-close curve | |
Widiarti | Comparing Hilditch, Rosenfeld, Zhang-Suen, and Nagendraprasad-Wang-Gupta Thinning | |
CN104992176B (en) | A kind of Chinese character extracting method towards an inscription on a tablet | |
CN103455816A (en) | Stroke width extraction method and device and character recognition method and system | |
CN105069766B (en) | A kind of an inscription on a tablet restorative procedure based on the description of Chinese character image contour feature | |
CN109543525A (en) | A kind of table extracting method of form of general use image | |
CN104809721A (en) | Segmentation method and device of cartoon | |
CN104504702A (en) | Cement notch pavement crack recognition method based on square lattice searching method | |
CN113011431A (en) | Chinese character stroke segmentation and extraction method and system based on MaskRCNN | |
CN105374024B (en) | The method of high-resolution satellite image on-water bridge extraction | |
CN116452604B (en) | Complex substation scene segmentation method, device and storage medium | |
CN111444903A (en) | Method, device and equipment for positioning characters in cartoon bubbles and readable storage medium |
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 |