CN109145857A - A method of extracting curve data from curvilinear figure - Google Patents

A method of extracting curve data from curvilinear figure Download PDF

Info

Publication number
CN109145857A
CN109145857A CN201811022473.6A CN201811022473A CN109145857A CN 109145857 A CN109145857 A CN 109145857A CN 201811022473 A CN201811022473 A CN 201811022473A CN 109145857 A CN109145857 A CN 109145857A
Authority
CN
China
Prior art keywords
pixel
queue
value
coordinate
curvilinear
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
CN201811022473.6A
Other languages
Chinese (zh)
Other versions
CN109145857B (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.)
Shenzhen Shifeng Technology Co ltd
Original Assignee
Shenzhen Qingfengxi Technology 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 Shenzhen Qingfengxi Technology Co Ltd filed Critical Shenzhen Qingfengxi Technology Co Ltd
Priority to CN201811022473.6A priority Critical patent/CN109145857B/en
Publication of CN109145857A publication Critical patent/CN109145857A/en
Application granted granted Critical
Publication of CN109145857B publication Critical patent/CN109145857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

The method that the invention discloses a kind of to extract curve data from curvilinear figure.Method includes the following steps: (1) carries out rasterizing label to the 2 dimensional region where curvilinear figure with limited pixel;(2) along long or wide direction, the pixel set continuously tinted is marked by column or line by line;(3) according to the grey value profile feature at edge and adjacent pixel, the boundary position for pixel set of continuously tinting is calculated;(4) curved section described in above-mentioned set or node coordinate are accurately calculated;(5) according to the connectivity between adjacent pixel set of tinting, the coordinate and its chain relationship of above-mentioned curved section set or node set are sequentially output.

Description

A method of extracting curve data from curvilinear figure
Technical field
The present invention relates to computer graphical processings and identification field, and curve is extracted from curvilinear figure more particularly to one kind The method of data.
Background technique
Automatic identification and curve data is extracted from curvilinear figure, in computer graphical processing and identification field, especially In terms of scientific algorithm and data processing, there is very important application value.
Currently, the application software system of related fields converts curvilinear figure mainly by the way of manually picking up For digitized two-dimensional curve coordinate.That is: in a two-dimensional coordinate space predetermined, by manually being walked along curvilinear figure To marking point by point and pick up each node coordinate value.Accuracy and experience, the software systems feedback of operator of hand labeled point etc. It is closely related.Therefore, the technological deficiency (especially numerical error) of this labeling method is obvious.
The difficult point for carrying out automatic identification to curvilinear figure is the following aspects.(1) connectivity of curve itself may It is very complicated.For single line segment, usually it is easier to identify.But for the curve graph that there is complicated connection relationship and topological attribute For shape, how accurately to determine the connection relationship or overlapping attributes between adjacent segments, be graphics process and automatic identification technology Focus and difficult point.(2) it is mismatched between curve line width and figure rasterizing pixel, leads to the boundary to curved section wire length and line width It surely is that comparison is fuzzy, thus is difficult to construct the automatic identifying method with universality and robust.
The present invention proposes a kind of from curve according to the characteristic distributions and connectivity principle of rasterizing curvilinear figure gray value The method that curve data is extracted in figure, can significantly improve the efficiency and numerical precision of curvilinear figure data conversion.This method The automatic identification and number of three-dimensional curve or curved surface into three-view diagram (or multiple view of equal value) can be expanded without loss of generality According to reconstruction.
Summary of the invention
The present invention is intended to provide a kind of method that the curve data is extracted from curvilinear figure, to avoid artificial crawl curve The operation error or numerical resolution error of node.
The method disclosed by the invention that curve data is extracted from curvilinear figure, comprising the following steps:
(1) rasterizing label is carried out to the 2 dimensional region where curvilinear figure with limited pixel;
(2) along length (X) or wide direction (Y), the pixel set continuously tinted is marked by column or line by line;
(3) according to the grey value profile feature at edge and adjacent pixel, the boundary position for pixel set of continuously tinting is calculated;
(4) curved section described in above-mentioned set or node coordinate are accurately calculated;
(5) according to the connectivity between adjacent pixel set of tinting, it is sequentially output the seat of above-mentioned curved section set or node set Mark and its chain relationship.
Wherein, step (1) carries out rasterizing label to curvilinear figure, can be subdivided into the following steps:
(1a) according to the maximum magnitude of X-Y scheme, by specified pixel size (being about a magnitude with curve line width), By the curvilinear figure rasterizing, remember that maximum pixel points of the X-Y scheme in length (X), wide direction (Y) are N and M respectively;
(1b) marks gray value f1(f1=0 ~ 255 of curvilinear figure in each pixel), RGB color figure can be according to R, G, B component Method or weighted mean method are converted to grayscale image;
(1c) traverses above-mentioned pixel set, with maximum gradation value max { f1 } for mould, by all gray value normalizings for applying color pixel Change, i.e. f2=0 ~ 1.
Above-mentioned steps (2) mark by column or line by line the pixel set continuously tinted along length (X) or wide direction (Y), can be thin It is divided into the following steps:
(2a) remembers that ε is preset gray threshold.Start from first pixel (X1, Y1) of X-direction, determines its gray scale Whether value is greater than ε;If more than ε, then first pixel queue X1_R1 { } that tints is logged into;
(2b) extracts above-mentioned pixel along the consecutive points of Y-direction, such as (X1, Y2), ibid, if its gray value is greater than ε, by it Queue X1_R1 { } is charged to, is not otherwise charged to;
(2c) if (X1, Y2) gray value ε and X1_R1 { } non-empty, then X 1 arrange pixel set number of tinting add 1, be denoted as X1_ R2{};
(2d) repeats above-mentioned (2b) to (2c) step, traverses all pixels point that X 1 arranges, obtains the corresponding company of all line segments It is continuous to tint pixel queue set { X1_Ri };
(2e) extracts the adjacent pixel X2 on the right side of X1, repeats above-mentioned (2a) to (2d) step, obtains what curve graph was arranged in X 2 It is all continuously to tint pixel queue set { X2_Rj };
(2f) traverses queue { X2_Rj }, marks its link relation between queue { X1_Ri }, such as: to pixel queue of tinting X2_Rj is marked on the left of X2_Rj if pixel set of tinting { X1_Yk } adjacent on the left of it belongs to collection of queues { X1_Rm } With collection of queues { X1_Rm } connection;
(2g) repeats above-mentioned (2a) to (2f) step, traverses all pixels point of X-direction, obtains the corresponding all companies of curve graph It is continuous to tint pixel queue set { Xi_Rj }, and from left to right, mark adjacent two column to apply the link relation between color pixel.
Above-mentioned steps (3) calculate pixel set of continuously tinting according to the grey value profile feature at edge and adjacent pixel Boundary position can be subdivided into the following steps:
(3a) takes queue X1_R1 if collection of queues { X1_Rj } non-empty, successively remembers two lower boundary point and two coboundaries Point P (- 2), P (- 1), P (1), P (2), and remember that initial value is 0;
(3b) takes first pixel (X1, Yj) in queue X1_R1, if its normalized gray value f (j) > 1- ε, the queue The coordinate value of lower boundary point P (- 1) is (/ 2, (j-1/2));
(3c) if element (X1, Yj) gray value f (j)<1- ε, and gray value f (j+1)>1- of its adjacent pixel (X1, Yj+1) ε, then the coordinate value of lower boundary point P (- 2) is (/ 2, (j-f (j)/2)), the coordinate value of lower boundary point P (- 1) be (/ 2, (j+1/2));
(3d) if element (X1, Yj) gray value f (j) < 1- ε, and 0 < f of gray value (j+1) of its adjacent pixel (X1, Yj+1) < 1- ε then continues to search the adjacent pixel set { (X1, Yk) } in queue X1_R1, until first gray value meets condition f (k) > 1- ε remembers that the coordinate value of P (- 1) is (/ 2, (k-1/2)), the coordinate value of P (- 2) is (/ 2, (k-1-f at this time (k-1)/2));Otherwise, remember that the coordinate value of P (- 2) is (/ 2, (j-1/2)), P (- 1) is still initial value 0;
(3e) if element (X1, Yj) gray value f (j) < 1- ε, and its adjacent element (X1, Yj+1) is in queue X1_R1, then its The coordinate value of lower boundary point P (- 2) is (/ 2, (j-1/2));
(3f) similarly, takes the coboundary pixel (X1, Yj) and its adjacent element (X1, Yj-1) of queue X1_R1, calculates its coboundary The coordinate value of point P (1), P (2);
(3g) traverses collection of queues { X1_Rj }, repeats above-mentioned (3a) to (3f) step;
(3h) traverses collection of queues { Xi_Rj }, repeats above-mentioned (3a) to (3g) step.
Above-mentioned steps (4): accurately calculating curved section described in above-mentioned set or node coordinate, can be the following steps:
(4a) takes queue X1_R1 if collection of queues { X1_Rj } non-empty, and the upper and lower boundary point in gray-scale pixels area is followed successively by P (- 2), P (- 1), P (1), P (2) remember that the quasi- upper and lower boundary point of segment data extracted is Q1, Q2;
(4b) is if the coordinate that P (- 2), P (- 1), P (1), P (2) are all larger than 0, Q1 is P (- 2) and P (- 1) adding based on gray value Weight average value, the coordinate of Q2 are the weighted average of P (1) and P (2) based on gray value;
(4c) if one and only one in P (- 1) and P (1) for the coordinate value of 0, Q1 and Q2 be respectively P (- 2), P (2) with it is non-zero Coordinate points P (- 1) or the weighted average of P (1) based on gray value;
(4d) is if it is same point that P (- 1) and P (1), which are all 0, Q1 and Q2, and is equal to the weighting of P (- 2) and P (2) based on gray value Average value;
(4e) if | Q1-Q2 | <, enable g=(Q1+Q2)/2, Q1=Q2=g;
(4f) traverses { X1_Rj }, obtains the upper and lower boundary point coordinate that curve graph arranges all line segments in X 1;
(4g) traverses collection of queues { Xi_Rj }, obtains the line segment boundary point coordinate that curve graph marks in each column pixel.
Above-mentioned steps (5): according to the connectivity between adjacent pixel set of tinting, be sequentially output above-mentioned curved section set or The coordinate and its chain relationship of node set, can be subdivided into the following steps:
(5a) takes its 1st element (queue) X1_R1 if collection of queues of tinting { Xi_Rj } non-empty, remembers the 1st article of line segment L1, Endpoint is the upper and lower boundary point Q1 and Q2 of X1_R1;
(5b) is denoted as X0_R0 if the adjacent queue not empty of tinting in the left side of X1_R1, and remember X0_R0 upper and lower boundary point be Q0_1, Q0_2;Calculate Q1, Q2 and Q0_1, the distance between Q0_2 value, it may be assumed that d1=| Q1-Q0_1 |, d2=| Q1-Q0_2 |, d3=| Q2-Q0_ 1|,d4=|Q2-Q0_2|;
(5c) constructs the chain relationship on the left of line segment L1 according to most short communication path, such as d1=min { d1, d2, d3, d4 }, then will Q0_1 is embedded in the left side connection chained list of Q1;
(5d) similarly, if the adjacent queue not empty of tinting in the right side of X1_R1, repeats (5b) to (5c), establishes the right side chain type of L1 Relationship;
(5e) traverses { Xi_Rj }, establishes the chain relationship (chained list) between all curved sections { Lk } each node, and exported.
Detailed description of the invention
Fig. 1 is a kind of flow chart for the method that curve data is extracted from curvilinear figure of the present invention.
Specific embodiment
With reference to the accompanying drawing, a specific embodiment of the invention is elaborated.Fig. 1 gives of the invention a kind of from curve graph The flow chart of the method for curve data is extracted in shape, comprising the following steps:
Step 1: rasterizing label is carried out to the 2 dimensional region where curve graph with limited pixel;
Step 2: along length (X) or wide direction (Y), marking by column or line by line the pixel set continuously tinted;
Step 3: according to the grey value profile feature at edge and adjacent pixel, calculating the boundary position for pixel set of continuously tinting;
Step 4: accurately calculating curved section described in above-mentioned set or node coordinate;
Step 5: according to the connectivity between adjacent pixel set of tinting, being sequentially output above-mentioned curved section set or node set The accurate mathematical description of coordinate and its chain relationship namely the curvilinear figure in infinitely subdivision pixel space.
Above-mentioned steps 1 carry out rasterizing label to the 2 dimensional region where curvilinear figure, it is intended to limited pixel to number The curvilinear figure of change carries out discretization, and valid pixel space occupied by curve is marked using figure gray value.The step Operating process can be subdivided into the following steps:
Step 101: (being about an amount with curve line width by specified pixel size according to the maximum magnitude of X-Y scheme Grade), by the curvilinear figure rasterizing, remember that maximum pixel points of the X-Y scheme in length (X), wide direction (Y) are N and M respectively;
Step 102: gray value f1(f1=0 ~ 255 of label curvilinear figure in each pixel), RGB color figure can be according to R, G, B Component method or weighted mean method are converted to grayscale image;
Step 103: traversing above-mentioned pixel set, with maximum gradation value max { f1 } for mould, all gray values for applying color pixel are returned One changes, i.e. f2=0 ~ 1.
The pixel size and curvilinear figure line width of above-mentioned rasterizing are about a magnitude.Therefore, step 2, along length (X) or Wide direction (Y), marks by column or line by line the pixel set continuously tinted, can be with accurate recording curvilinear figure in current column or row On line-segment sets or point set.The operating process of step 2 can be subdivided into the following steps:
Step 201: note ε is preset gray threshold.Start from first pixel (X1, Y1) of X-direction, determines it Whether gray value is greater than ε;If more than ε, then first pixel queue X1_R1 { } that tints is logged into;
Step 202: extract above-mentioned pixel along the consecutive points of Y-direction, such as (X1, Y2), and ibid, if its gray value is greater than ε, It is logged into queue X1_R1 { }, is not otherwise charged to;
Step 203: if the gray value ε and X1_R1 { } non-empty of (X1, Y2), then the pixel set number of tinting that X 1 arranges adds 1, is denoted as X1_R2{};
Step 204: repeating above-mentioned 201st step to the 203rd step, it is corresponding to obtain all line segments for all pixels point that traversal X 1 arranges Continuously tint pixel queue set { X1_Ri };
Step 205: extracting the adjacent pixel X2 on the right side of X1, repeat above-mentioned 201st step to the 204th step, obtain curve graph in X 2 The all of column continuously tint pixel queue set { X2_Rj };
Step 206: traversal queue { X2_Rj } marks its link relation between queue { X1_Ri }, for example, to color pixel is applied Queue X2_Rj marks X2_Rj if pixel set of tinting { X1_Yk } adjacent on the left of it belongs to collection of queues { X1_Rm } Left side and collection of queues { X1_Rm } connection;
It captures 207: repeating above-mentioned 201st step to the 206th step, traverse all pixels point of X-direction, obtain the corresponding institute of curve graph Have and continuously tint pixel queue set { Xi_Rj }, and from left to right, the connection for marking adjacent two column to apply between color pixel is closed System.
Above-mentioned steps 3 are the principles based on graphic edge gray value linear change, to define graphic edge, adjacent with edge The graphic attributes such as interior point (be directed to line segment), it may be assumed that according to the grey value profile feature at edge and adjacent pixel, accurately calculate continuous The boundary position for pixel set of tinting.The operating process of the step can be subdivided into the following steps:
Step 301: if collection of queues { X1_Rj } non-empty, takes queue X1_R1, successively remembering on two lower boundary point and two Boundary point P (- 2), P (- 1), P (1), P (2), and remember that initial value is 0;
Step 302: in queue X1_R1, first pixel (X1, Yj) is taken, it, should if its normalized gray value f (j) > 1- ε The coordinate value of queue lower boundary point P (- 1) is (/ 2, (j-1/2));
Step 303: if the gray value f (j) of element (X1, Yj) < 1- ε, and the gray value f (j+1) of its adjacent pixel (X1, Yj+1) > 1- ε, then the coordinate value for writing down boundary point P (- 2) is (/ 2, (j-f (j)/2)), and the coordinate value of lower boundary point P (- 1) is (/ 2, (j+1/2));
Step 304: if the gray value f (j) of element (X1, Yj) < 1- ε, and 0 < f of gray value (j+ of its adjacent pixel (X1, Yj+1) 1) < 1- ε then continues to search the adjacent pixel set { (X1, Yk) } in queue X1_R1, until first gray value meets item Part f (k) > 1- ε remembers that the coordinate value of P (- 1) is (/ 2, (k-1/2)), the coordinate value of P (- 2) is (/ 2, (k- at this time 1-f (k-1)/2));Otherwise, remember that the coordinate value of P (- 2) is (/ 2, (j-1/2)), P (- 1) is still initial value 0;
Step 305: if the gray value f (j) of element (X1, Yj) < 1- ε, and its adjacent element (X1, Yj+1) is in queue X1_R1, Then the coordinate value of its lower boundary point P (- 2) is (/ 2, (j-1/2));
Step 306: similarly, taking the coboundary pixel (X1, Yj) and its adjacent element (X1, Yj-1) of queue X1_R1, calculate thereon The coordinate value of boundary point P (1), P (2);
Step 307: traversal collection of queues { X1_Rj } repeats above-mentioned 301st step to the 306th step;
Step 308: traversal collection of queues { Xi_Rj } repeats above-mentioned 301st step to the 307th step.
Above-mentioned steps 4 accurately calculate the curved section endpoint or node coordinate marked by step 3 using Weighted Average Algorithm. The operating process of the step can be subdivided into the following steps:
Step 401: if collection of queues { X1_Rj } non-empty, taking queue X1_R1, the upper and lower boundary point in gray-scale pixels area is successively For P (- 2), P (- 1), P (1), P (2), remember that the quasi- upper and lower boundary point of segment data extracted is Q1, Q2;
Step 402: if P (- 2), P (- 1), P (1), P (2) are all larger than, the coordinate of 0, Q1 is P (- 2) and P (- 1) is based on gray value Weighted average, the coordinate of Q2 is the weighted average of P (1) and P (2) based on gray value;
Step 403: if one and only one in P (- 1) and P (1) for the coordinate value of 0, Q1 and Q2 be respectively P (- 2), P (2) with Non-zero coordinate points P (- 1) or the weighted average of P (1) based on gray value;
Step 404: if it is same point that P (- 1) and P (1), which are all 0, Q1 and Q2, and being equal to P (- 2) and P (2) based on gray value Weighted average;
Step 405: if | Q1-Q2 | <, enable g=(Q1+Q2)/2, Q1=Q2=g;
Step 406: traversal { X1_Rj } obtains the upper and lower boundary point coordinate that curve graph arranges all line segments in X 1;
Step 407: traversal collection of queues { Xi_Rj } obtains the line segment boundary point coordinate that curve graph marks in each column pixel.
After determining curved section endpoint or node coordinate, above-mentioned steps 5, according to the connection between adjacent pixel set of tinting Property, it is sequentially output the coordinate and its chain relationship of above-mentioned curved section set or node set.The concrete operations process of the step, can It is subdivided into the following steps:
Step 501: if collection of queues of tinting { Xi_Rj } non-empty, taking its 1st element (queue) X1_R1, remember the 1st article of line segment L1, endpoint are the upper and lower boundary point Q1 and Q2 of X1_R1;
Step 502: if the adjacent queue not empty of tinting in the left side of X1_R1, being denoted as X0_R0, and the upper and lower boundary point of note X0_R0 is Q0_1, Q0_2 calculate Q1, Q2 and Q0_1, the distance between Q0_2 value, it may be assumed that d1=| Q1-Q0_1 |, d2=| Q1-Q0_2 |, d3=| Q2-Q0_1|,d4=|Q2-Q0_2|;
Step 503: according to most short communication path, the chain relationship on the left of line segment L1 is constructed, such as d1=min { d1, d2, d3, d4 }, It then will be in the left side connection chained list of Q0_1 insertion Q1;
Step 504: similarly, if the adjacent queue not empty of tinting in the right side of X1_R1, repeats the 502nd step to the 503rd step, establish L1 Right side chain relationship;
Step 505: traversal { Xi_Rj } establishes the chain relationship (chained list) between all curved sections { Lk } each node, and give defeated Out.

Claims (6)

1. a kind of method for extracting curve data from curvilinear figure, it is characterised in that:
(1) rasterizing label is carried out to the 2 dimensional region where curvilinear figure with limited pixel;
(2) along length (X) or wide direction (Y), the pixel set continuously tinted is marked by column or line by line;
(3) according to the grey value profile feature at edge and adjacent pixel, the boundary position for pixel set of continuously tinting is calculated;
(4) curved section described in above-mentioned set or node coordinate are accurately calculated;
(5) according to the connectivity between adjacent pixel set of tinting, it is sequentially output the seat of above-mentioned curved section set or node set Mark and its chain relationship.
2. a kind of method for extracting curve data from curvilinear figure according to claim 1, which is characterized in that step (1) " rasterizing label is carried out to the 2 dimensional region where curvilinear figure with limited pixel ", the following steps can be divided into:
(1a) according to the maximum magnitude of X-Y scheme, by specified pixel size (being about a magnitude with curve line width), By the curvilinear figure rasterizing, remember that maximum pixel points of the X-Y scheme in length (X), wide direction (Y) are N and M respectively;
(1b) marks gray value f1(f1=0 ~ 255 of curvilinear figure in each pixel), RGB color figure can be according to R, G, B component Method or weighted mean method are converted to grayscale image;
(1c) traverses above-mentioned pixel set, with maximum gradation value max { f1 } for mould, by all gray value normalizings for applying color pixel Change, i.e. f2=0 ~ 1.
3. a kind of method for extracting curve data from curvilinear figure according to claim 2, which is characterized in that step (2) it " along length (X) or wide direction (Y), marks by column or line by line the pixel set continuously tinted ", the following steps can be divided into:
(2a) remembers that ε is preset gray threshold, starts from first pixel (X1, Y1) of X-direction, determines its gray value Whether it is greater than ε and is then logged into first pixel queue X1_R1 { } that tints if more than ε;
(2b) extracts above-mentioned pixel along the consecutive points of Y-direction, such as (X1, Y2), ibid, if its gray value is greater than ε, is remembered Enqueue X1_R1 { }, is not otherwise charged to;
(2c) if (X1, Y2) gray value ε and X1_R1 { } non-empty, then X 1 arrange pixel set number of tinting add 1, be denoted as X1_R2 {};
(2d) repeats above-mentioned (2b) to (2c) step, traverses all pixels point that X 1 arranges, obtains the corresponding company of all line segments It is continuous to tint pixel queue set { X1_Ri };
(2e) extracts the adjacent pixel X2 on the right side of X1, repeats above-mentioned (2a) to (2d) step, obtains what curve graph was arranged in X 2 It is all continuously to tint pixel queue set { X2_Rj };
(2f) traverses queue { X2_Rj }, its link relation between queue { X1_Ri } is marked, for example, to pixel queue of tinting X2_Rj is marked on the left of X2_Rj if pixel set of tinting { X1_Yk } adjacent on the left of it belongs to collection of queues { X1_Rm } With collection of queues { X1_Rm } connection;
(2g) repeats above-mentioned (2a) to (2f) step, traverses all pixels point of X-direction, obtains the corresponding all companies of curve graph It is continuous to tint pixel queue set { Xi_Rj }, and from left to right, mark adjacent two column to apply the link relation between color pixel.
4. a kind of method for extracting curve data from curvilinear figure according to claim 3, which is characterized in that step (3) it " according to the grey value profile feature at edge and adjacent pixel, calculates the boundary position for pixel set of continuously tinting ", can be divided into The following steps:
(3a) takes queue X1_R1 if collection of queues { X1_Rj } non-empty, successively remembers two lower boundary point and two coboundaries Point P (- 2), P (- 1), P (1), P (2), and remember that initial value is 0;
(3b) takes first pixel (X1, Yj) in queue X1_R1, if its normalized gray value f (j) > 1- ε, the queue The coordinate value of lower boundary point P (- 1) is (/ 2, (j-1/2));
(3c) if element (X1, Yj) gray value f (j)<1- ε, and gray value f (j+1)>1- of its adjacent pixel (X1, Yj+1) ε, then the coordinate value of lower boundary point P (- 2) is (/ 2, (j-f (j)/2)), the coordinate value of lower boundary point P (- 1) be (/ 2, (j+1/2));
(3d) if element (X1, Yj) gray value f (j) < 1- ε, and 0 < f of gray value (j+1) of its adjacent pixel (X1, Yj+1) < 1- ε then continues to search the adjacent pixel set { (X1, Yk) } in queue X1_R1, until first gray value meets condition f (k) > 1- ε, the coordinate value of P (- 1) is (/ 2, (k-1/2)) at this time, the coordinate value of P (- 2) is (/ 2, (k-1-f (k- 1)/2));Otherwise, the coordinate value of P (- 2) is (/ 2, (j-1/2)), P (- 1) is still initial value 0;
(3e) if element (X1, Yj) gray value f (j) < 1- ε, and its adjacent element (X1, Yj+1) is in queue X1_R1, then its The coordinate value of lower boundary point P (- 2) is (/ 2, (j-1/2));
(3f) similarly, takes the coboundary pixel (X1, Yj) and its adjacent element (X1, Yj-1) of queue X1_R1, calculates its coboundary The coordinate value of point P (1), P (2);
(3g) traverses collection of queues { X1_Rj }, repeats above-mentioned (3a) to (3f) step;
(3h) traverses collection of queues { Xi_Rj }, repeats above-mentioned (3a) to (3g) step.
5. a kind of method for extracting curve data from curvilinear figure according to claim 4, which is characterized in that step (4) " curved section described in above-mentioned set or node coordinate are accurately calculated ", the following steps can be divided into:
(4a) takes queue X1_R1 if collection of queues { X1_Rj } non-empty, and the upper and lower boundary point in gray-scale pixels area is followed successively by P (- 2), P (- 1), P (1), P (2) remember that the quasi- upper and lower boundary point of segment data extracted is Q1, Q2;
(4b) is if the coordinate that P (- 2), P (- 1), P (1), P (2) are all larger than 0, Q1 is P (- 2) and P (- 1) adding based on gray value Weight average value, the coordinate of Q2 are the weighted average of P (1) and P (2) based on gray value;
(4c) if one and only one in P (- 1) and P (1) for the coordinate value of 0, Q1 and Q2 be respectively P (- 2), P (2) with it is non-zero Coordinate points P (- 1) or the weighted average of P (1) based on gray value;
(4d) is if it is same point that P (- 1) and P (1), which are all 0, Q1 and Q2, and is equal to the weighting of P (- 2) and P (2) based on gray value Average value;
(4e) if | Q1-Q2 | <, enable g=(Q1+Q2)/2, Q1=Q2=g;
(4f) traverses { X1_Rj }, obtains the upper and lower boundary point coordinate that curve graph arranges all line segments in X 1;
(4g) traverses collection of queues { Xi_Rj }, obtains the line segment boundary point coordinate that curve graph marks in each column pixel.
6. a kind of method for extracting curve data from curvilinear figure according to claim 5, which is characterized in that step (5) " according to the connectivity between adjacent pixel set of tinting, be sequentially output above-mentioned curved section set or node set coordinate and Its chain relationship " can be divided into the following steps:
(5a) takes its 1st element (queue) X1_R1 if collection of queues of tinting { Xi_Rj } non-empty, remembers the 1st article of line segment L1, Endpoint is the upper and lower boundary point Q1 and Q2 of X1_R1;
(5b) is denoted as X0_R0 if the adjacent queue not empty of tinting in the left side of X1_R1, and remember X0_R0 upper and lower boundary point be Q0_1, Q0_2 calculates Q1, Q2 and Q0_1, the distance between Q0_2 value, it may be assumed that d1=| Q1-Q0_1 |, d2=| Q1-Q0_2 |, d3=| Q2-Q0_ 1|,d4=|Q2-Q0_2|;
(5c) constructs the chain relationship on the left of line segment L1 according to most short communication path, such as d1=min { d1, d2, d3, d4 }, then will Q0_1 is embedded in the left side connection chained list of Q1;
(5d) similarly, if the adjacent queue not empty of tinting in the right side of X1_R1, repeats (5b) to (5c), establishes the right side chain type of L1 Relationship;
(5e) traverses { Xi_Rj }, establishes the chain relationship (chained list) between all curved sections { Lk } each node, and exported.
CN201811022473.6A 2018-09-04 2018-09-04 Method for extracting curve data from curve graph Active CN109145857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811022473.6A CN109145857B (en) 2018-09-04 2018-09-04 Method for extracting curve data from curve graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811022473.6A CN109145857B (en) 2018-09-04 2018-09-04 Method for extracting curve data from curve graph

Publications (2)

Publication Number Publication Date
CN109145857A true CN109145857A (en) 2019-01-04
CN109145857B CN109145857B (en) 2024-02-09

Family

ID=64826362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811022473.6A Active CN109145857B (en) 2018-09-04 2018-09-04 Method for extracting curve data from curve graph

Country Status (1)

Country Link
CN (1) CN109145857B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112122175A (en) * 2020-08-12 2020-12-25 浙江大学 Material enhanced feature recognition and selection method of color sorter

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794268A (en) * 2005-12-21 2006-06-28 兰州大学 Method of abstracting data from curve function recorded on cooraination peper
CN101571381A (en) * 2009-06-02 2009-11-04 华南理工大学 Method for extracting material profiled outline curve and achieving profiled outline fractal characterization
CN104008558A (en) * 2013-02-25 2014-08-27 珠海全志科技股份有限公司 Bezier curve rasterization processing method and system
US20150228094A1 (en) * 2014-02-13 2015-08-13 Samsung Electronics Co., Ltd. Curve rendering method and apparatus
CN105938555A (en) * 2016-04-12 2016-09-14 常州市武进区半导体照明应用技术研究院 Extraction method for picture curve data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794268A (en) * 2005-12-21 2006-06-28 兰州大学 Method of abstracting data from curve function recorded on cooraination peper
CN101571381A (en) * 2009-06-02 2009-11-04 华南理工大学 Method for extracting material profiled outline curve and achieving profiled outline fractal characterization
CN104008558A (en) * 2013-02-25 2014-08-27 珠海全志科技股份有限公司 Bezier curve rasterization processing method and system
US20150228094A1 (en) * 2014-02-13 2015-08-13 Samsung Electronics Co., Ltd. Curve rendering method and apparatus
CN105938555A (en) * 2016-04-12 2016-09-14 常州市武进区半导体照明应用技术研究院 Extraction method for picture curve data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112122175A (en) * 2020-08-12 2020-12-25 浙江大学 Material enhanced feature recognition and selection method of color sorter

Also Published As

Publication number Publication date
CN109145857B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN108280856B (en) Unknown object grabbing pose estimation method based on mixed information input network model
CN100464347C (en) Vector graphics identifying method for engineering CAD drawing
KR102104605B1 (en) Method and apparatus of automatic recognition of symbols in piping and instrument diagrams using ai technology
CN105469084A (en) Rapid extraction method and system for target central point
CN103530590A (en) DPM (direct part mark) two-dimensional code recognition system
CN104680531B (en) A kind of connection amount statistical information extracting method and VLSI structure
CN105528485A (en) Method for automatic contour extraction and path generation of bitmap
CN112085651B (en) Automatic shock wave detection and tracking algorithm based on image self-adaptive threshold and feature extraction
CN114488190A (en) Laser radar 3D point cloud ground detection method
US20220379475A1 (en) Transparent object bin picking
CN101840582B (en) Boundary digitizing method of cadastral plot
CN110598634A (en) Machine room sketch identification method and device based on graph example library
CN110400335B (en) Texture image quality estimation method based on deep learning
CN109145857A (en) A method of extracting curve data from curvilinear figure
CN117745708A (en) Deep learning algorithm-based wood floor surface flaw detection method
CN117314940B (en) Laser cutting part contour rapid segmentation method based on artificial intelligence
CN103116890A (en) Video image based intelligent searching and matching method
CN113420670B (en) Environment-friendly monitoring method for power transmission and transformation line transition change based on high-resolution remote sensing
CN117292193B (en) Multi-station intelligent logistics conveying system
CN100555310C (en) A kind of preprocess method of engineering drawing vectorization recognition system
CN106780506B (en) Interactive image segmentation method based on multisource path shortest distance
CN103438802B (en) Optical fiber coating geometric parameter measurement method
CN110378307B (en) Texture image direction field estimation method based on deep learning
CN111508022B (en) Line laser stripe positioning method based on random sampling consistency
CN102073868A (en) Digital image closed contour chain-based image area identification method

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220414

Address after: 518000 2301, building D1, Nanshan Zhiyuan, No. 1001, Xueyuan Avenue, Changyuan community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong

Applicant after: Shenzhen Shifeng Technology Co.,Ltd.

Address before: 518000 1902, floor 19, building B1, Nanshan Zhiyuan, No. 1001, Xueyuan Avenue, Nanshan District, Shenzhen, Guangdong

Applicant before: SHENZHEN QINGFENGXI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant