CN103679731A - Arc partition method based on document images - Google Patents

Arc partition method based on document images Download PDF

Info

Publication number
CN103679731A
CN103679731A CN201310700137.3A CN201310700137A CN103679731A CN 103679731 A CN103679731 A CN 103679731A CN 201310700137 A CN201310700137 A CN 201310700137A CN 103679731 A CN103679731 A CN 103679731A
Authority
CN
China
Prior art keywords
point
points
circle
circular arc
arc
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
CN201310700137.3A
Other languages
Chinese (zh)
Other versions
CN103679731B (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 Graduate School Harbin Institute of Technology
Original Assignee
Shenzhen Graduate School Harbin Institute of Technology
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 Graduate School Harbin Institute of Technology filed Critical Shenzhen Graduate School Harbin Institute of Technology
Priority to CN201310700137.3A priority Critical patent/CN103679731B/en
Publication of CN103679731A publication Critical patent/CN103679731A/en
Application granted granted Critical
Publication of CN103679731B publication Critical patent/CN103679731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides an arc partition method based on document images. The method includes the following steps that first, parameters of an arc are determined; second, the parameters in the first step are corrected through the symmetry axis; third, whether the arc is a whole circle or part of a circle is judged. The vectorization efficiency of the document images can be improved with the method. Powerful support is provided for digitalization of paper documents, management of electronic documents and establishing of three-dimensional models with two-dimensional drawings.

Description

Arc fragmenting method based on file and picture
Technical field
The present invention relates to figure and cut apart, relate in particular to the arc fragmenting of file and picture.
Background technology
To the vector quantization of file and picture and digitizing, be the trend of information age, and figure identification is a key issue in file and picture.As long as can correctly identify the content of file and picture, just can process a lot of file and pictures.Circular arc, as a kind of shape very common in file and picture, is but a difficult point in figure identification.Realize fast and accurately arc fragmenting significant to processing file and picture.
The difference of circular arc identification and arc fragmenting:
Circular arc identification: only need know that this shape is that a complete circle or part circle are just passable.Do not need to obtain its radius size, central coordinate of circle, and live width.
Arc fragmenting: first need to know that this shape is a complete circle or part circle.If complete circle need to accurately be obtained its central coordinate of circle, radius, and live width.If part circle not only needs accurately to obtain its central coordinate of circle, radius, and live width, also need accurately to obtain this part round start angle and termination point.
In image is processed, Hough transformation is often used to the identification to circular arc, but when the content more complicated of image the non-constant of segmentation effect of Hough transformation, and the method time complexity is very high.Various improved skeleton techniques are also used to cut apart circular arc, and still, due to the birth defect of skeleton technique, the effect that these methods split is unsatisfactory.Therefore, the new method of cutting apart circular arc need to be proposed.
Summary of the invention
The arrival of information age allows the quantity of various resources increase sharply, how transmission rapidly and efficiently and to store these resources are problems of needing solution badly.Paper document is changed into e-file and build digital library, make it to be convenient to management, storage and transmission.By by engineering drawing file, be converted to e-file and can construct three-dimensional model.The method that the present invention proposes is exactly by comprising the paper document of various figures, as architectural drawing, and circuit design drawing, electrical design figure etc., the form that changes into vector deposits into computing machine, to facilitate later document management and structure three-dimensional model.Wherein to being a difficulties cutting apart of circular arc.If can effectively cut apart circular arc, the quality of file and picture vector quantization will be improved to a great extent.
In order to solve problem in prior art, the invention provides a kind of arc fragmenting method based on file and picture, comprise the steps:
Step 1) is determined the parameter of circular arc:
First need to find at least 3 points on circular arc, then utilize these points to calculate the parameter of circular arc.Its method is as follows: progressive scanning picture, when running into a black pixel point A, take this point is the center of circle, and the value of utilizing two regular lengths is radius, draw two concentric circless, regular length herein, selection be the length of two different numerical value, these two concentric circless obtain at least 3 intersection points with line segment intersection around, if only have two intersection points, this A point is given up, continued scanning, until meet, have at least 3 intersection points; Remove noise spot; With comprising the point being retained that A is ordered, obtain central coordinate of circle and radius;
Step 2) utilize axis of symmetry aligning step 1) in parameter:
Adopt in the horizontal direction three line sweeps simultaneously, adopt in vertical direction three line sweeps, if three sweep traces run into black pixel point simultaneously, and the same straight line at 3 places is all black simultaneously, this line may be exactly an axis of symmetry, and the coordinate of this axis of symmetry is left;
The information of the circular parameters of integrating step 1) trying to achieve, if it is less to try to achieve error during by the coordinate substitution equation of a circle of certain axis of symmetry, replaces coordinate corresponding to central coordinate of circle with this coordinate;
Step 3) judgement is complete circle or part circle:
According to fixed angle and the principle that meets equation of a circle, generate some points, and then judge the pixel value of these points:
Adopt the strategy that only generates part point, and these points are distributed on circumference, if these are all black picture elements, this circular arc is exactly complete circle; If be black picture element with regard to a part in these points, this circular arc is part circle, need to further obtain its start angle and termination point.
As a further improvement on the present invention, step 1) elimination noise spot method is as follows:
The first strategy is to remove these noise spots according to live width:
In a line or circular arc, if the live width at these intersection point places is different from the live width at A point place, these points are removed;
The second strategy is to utilize continuity to remove noise spot:
The A of take expands to both sides as source point, if the line segment of the point of newly adding and some formation is not in the past holomelanocratic point, the point of newly adding must be removed, otherwise can retain the point that this is newly added;
The third strategy be utilize and straight line that interior two round-formed intersection points are linked to be must A point and and the intersection point of cylindrical between;
Only have satisfied above three kinds of tactful intersection points simultaneously just can be retained.
Handled image is bianry image, and background is white, and prospect is black.
As a further improvement on the present invention, step 2) in, three lines preferably utilize following methods to determine: length or the width of establishing image to be scanned are L, and a middle sweep trace is L/2 place, and two other sweep trace apart from the distance of middle this sweep trace is.
As a further improvement on the present invention, in step 3), further obtain its start angle and termination point, method is as follows: the separation of first obtaining white pixel and black picture element on circumference, this separation is a more rough value, near this point, need again to generate intensive point, the value of trying to achieve is again only start angle or the termination point of this circular arc.
As a further improvement on the present invention, in step 3), fixing angle is as follows: the angle value scope between adjacent two points is 360/5.6R to 360/5.7R, and R is radius, and the number of pixel of take is length, and angle is got Circular measure.
The invention has the beneficial effects as follows:
The method can improve the vector quantization efficiency of file and picture.For the digitizing of paper document, the management of electronic document, and provide strong support according to two-dimentional drawing structure three-dimensional model.
Embodiment
This method mainly comprises the content of three aspects:
1) determine the parameter of circular arc, i.e. central coordinate of circle and radius;
2) utilize axis of symmetry to proofread and correct these parameters;
3) on circular arc, generate a series of point, and judge that the circular arc at these places is complete circle or part circles.
The image of all processing is all bianry image, and background is white, and prospect is black.
1) determine the parameter of circular arc
According to 3 thoughts that can determine an equation of a circle of conllinear not, first need to find several points, then utilize these points to calculate the parameter of circular arcs.Concrete grammar is as follows: progressive scanning picture, when running into a black pixel point A, take this point is the center of circle, the value of utilizing two regular lengths is radius, draw two concentric circless, regular length herein, selection be the length of two different numerical value, big or small the determining of length, person of ordinary skill in the field adjusts and determines according to the resolution of image and experience.These two concentric circless obtain several intersection points with line segment intersection around, are generally four intersection points, need at least three intersection points.Illustrate: if only have two intersection points, this A point is given up, continued scanning, until meet, have at least 3 intersection points.For the convenience of calculating is only carried out find intersection with two concentric circless.In order to improve as much as possible accuracy rate, the number of the point of calculating circle parameter is more preferably greater than three.At this, ask in process a little, may run into a lot of noise spots.The present invention adopts three kinds of strategies to eliminate these noise spots.The first strategy is to remove these noise spots according to live width.In a line or circular arc, the live width at each place should equate, if the live width at these intersection point places is different from the live width at A point place, these points is removed.The second strategy is to utilize continuity to remove noise spot.In piece image, different lines or circular arc are probably identical live widths, but these intersection points are not to be on the same line or circular arc with A.It according to the line segment between consecutive point, must be the principle of continuous black picture element, the A of take expands to both sides as source point, if the point of newly adding and the line segment that point formed are not in the past holomelanocratic points, the point of newly adding must be removed, otherwise can retain the point that this is newly added.The third strategy be utilize and straight line that interior two round-formed intersection points are linked to be must A point and and the intersection point of cylindrical between.Only have and meet these three kinds of tactful intersection points simultaneously and just can be retained.With the point that these (comprising A point) are retained, obtain central coordinate of circle and radius.
2) utilize axis of symmetry to proofread and correct
According to 3 thoughts that can determine a circle of conllinear not, three of conllinear points are not to determine an equation of a circle, but these three points not necessarily can be determined a unique circle, due to pixel error, calculate 3 very near points of distance and may obtain a plurality of circles.Due to when asking round parameter, concentrically ringed radius is fixed, and can not guarantee enough large of the distance of these intersection points, to such an extent as to try to achieve round parameter, is not very accurate.When what relation the relative position of these intersection points meet, the round parameter of trying to achieve is only the most accurately.Found through experiments, the circular arc forming when three points is half bowlder, and the round parameter of trying to achieve is more accurately.But in actual operation, want to allow the position distribution of these three points on semicircle, be unpractical.Therefore need to utilize information around to proofread and correct these parameter values.By analyzing these drawings, find that axis of symmetry is prevalent in drawing, these axis of symmetry are conventionally all through the center of circle, and are all that horizontal symmetry axis and vertical axis of symmetry are in the majority, so utilize the information of axis of symmetry can proofread and correct these parameters.Because partial graph does not have axis of symmetry, or there is Local Symmetric axle in certain part of figure.Comprehensive these situations, from the angle of time and efficiency, consider, adopt in the horizontal direction three line sweeps simultaneously, adopt in vertical direction three line sweeps simultaneously, horizontal direction herein and vertical direction are scanned horizontal ordinate and the ordinate direction of plane, if three sweep traces run into black pixel point simultaneously, and the same straight line at 3 places is all black, this line may be exactly an axis of symmetry, and the coordinate of this axis of symmetry is left.Article three, line preferably utilizes following methods to determine: length or the width of establishing image to be scanned are L, and a middle sweep trace is L/2 place, and two other sweep trace apart from the distance of middle this sweep trace is.Make to use the same method, until horizontal direction and vertical direction have all scanned.In conjunction with the information of the circular parameters of trying to achieve above, if it is less to try to achieve error during by the coordinate substitution equation of a circle of certain axis of symmetry, available this coordinate replaces coordinate corresponding to central coordinate of circle.
3) judgement is complete circle or part circle
Because part circle also needs to obtain its start angle and termination point, so need to judge that this section of circular arc belongs to complete circle or belong to part circle.Some researchist adopts classical Bresenham(literal translation: Bo Ruisen Durham) the circle method of drawing is carried out " redrawing " this circular arc.The present invention show that with experimental verification the efficiency of the method has much room for improvement.In the circular arc drawing by the Bresenham circle method of drawing, there is the pixel of a lot of redundancies.When needs judge, in advance all pixels on circumference are deposited in an array according to the order of angular dimension, when need to find on circular arc the next one point time, just need to scan this array, adjacent pixel value is all to have equal angular value conventionally, in order to obtain the pixel of a different angle, just must judge one by one the pixel of equal angular.When the radius of circular arc is larger, need the redundant points of judgement just more.Because the angle that circumference is corresponding is all 360 degree, radius is larger, and corresponding circumference is just longer, and the number of putting on circumference is just more.The method that the present invention adopts is " judgement " these points, if the coordinate that certain point is black picture element and this point meets equation of a circle, this point is just on circumference.During beginning, the present invention generates some points at random, and in experiment afterwards, the present invention finds that these random points can produce some mistakes.So the present invention generates some points according to fixed angle (computing method explanation sees below), and then judges the pixel value of these points.In order to raise the efficiency, the present invention can only generate a part of point.If these are all black picture elements, this circular arc is exactly complete circle; If be black picture element with regard to a part in these points, this circular arc is part circle, need to further obtain its start angle and termination point.First the separation of obtaining white pixel and black picture element on circumference, this separation is a more rough value, needs again to generate intensive point near this point, and the value of trying to achieve is again only start angle or the termination point of this circular arc.
The computing method of fixed angle are as follows: obtain by experiment the relation of the number put on the size of radius and circumference, as following table 1.For example, if radius R is 10 length in pixels, on this circumference, have 56 points, the angle value of these points is all different.When obtaining the radius of certain circular arc, just according to the following table, find out more approaching radius value, then obtain the number of putting on corresponding circumference.360 divided by this number, is exactly fixing angle, adjacent two points between angle value (Circular measure).
The relation of the number of putting on table 1 radius size and circumference
Figure BDA0000440843140000061
Figure BDA0000440843140000071
Above content is in conjunction with concrete preferred implementation further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.

Claims (6)

1. the arc fragmenting method based on file and picture, is characterized in that, comprises the steps:
Step 1) is determined the parameter of circular arc:
First need to find at least 3 points on circular arc, then utilize these points to calculate the parameter of circular arc, progressive scanning picture, when running into a black pixel point A, take this point is the center of circle, the value of utilizing two regular lengths is radius, draw two concentric circless, regular length herein, selection be the length of two different numerical value, these two concentric circless obtain at least 3 intersection points with line segment intersection around, if only have two intersection points, this A point is given up, continued scanning, until meet, have at least 3 intersection points; Remove noise spot; With comprising the point being retained that A is ordered, obtain central coordinate of circle and radius;
Step 2) utilize axis of symmetry aligning step 1) in parameter:
Adopt in the horizontal direction three line sweeps simultaneously, adopt in vertical direction three line sweeps, if three sweep traces run into black pixel point simultaneously, and the same straight line at 3 places is all black simultaneously, this line may be exactly an axis of symmetry, and the coordinate of this axis of symmetry is left;
The information of the circular parameters of integrating step 1) trying to achieve, if it is less to try to achieve error during by the coordinate substitution equation of a circle of certain axis of symmetry, replaces coordinate corresponding to central coordinate of circle with this coordinate;
Step 3) judgement is complete circle or part circle:
According to fixed angle and the principle that meets equation of a circle, generate some points, and then judge the pixel value of these points:
Adopt the strategy that only generates part point, and these points are distributed on circumference, if these are all black picture elements, this circular arc is exactly complete circle; If be black picture element with regard to a part in these points, this circular arc is part circle, need to further obtain its start angle and termination point.
2. the arc fragmenting method based on file and picture according to claim 1, is characterized in that: it is as follows that step 1) is eliminated noise spot method:
The first strategy is to remove these noise spots according to live width:
In a line or circular arc, if the live width at these intersection point places is different from the live width at A point place, these points are removed;
The second strategy is to utilize continuity to remove noise spot:
The A of take expands to both sides as source point, if the line segment of the point of newly adding and some formation is not in the past holomelanocratic point, the point of newly adding must be removed, otherwise can retain the point that this is newly added;
The third strategy be utilize and straight line that interior two round-formed intersection points are linked to be must A point and and the intersection point of cylindrical between;
Only have satisfied above three kinds of tactful intersection points simultaneously just can be retained.
3. the arc fragmenting method based on file and picture according to claim 1, is characterized in that: handled image is bianry image, and background is white, and prospect is black.
4. the arc fragmenting method based on file and picture according to claim 1, it is characterized in that: step 2) in, article three, line preferably utilizes following methods to determine: length or the width of establishing image to be scanned are L, a middle sweep trace is L/2 place, and two other sweep trace apart from the distance of middle this sweep trace is.
5. the arc fragmenting method based on file and picture according to claim 1, it is characterized in that: in step 3), further obtain its start angle and termination point, method is as follows: the separation of first obtaining white pixel and black picture element on circumference, this separation is a more rough value, near this point, need again to generate intensive point, the value of trying to achieve is again only start angle or the termination point of this circular arc.
6. the arc fragmenting method based on file and picture according to claim 1, it is characterized in that: in step 3), fixing angle is as follows: the angle value scope between adjacent two points is 360/5.6R to 360/5.7R, R is radius, the number of pixel of take is length, and angle is got Circular measure.
CN201310700137.3A 2013-12-18 2013-12-18 Arc partition method based on file and picture Active CN103679731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310700137.3A CN103679731B (en) 2013-12-18 2013-12-18 Arc partition method based on file and picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310700137.3A CN103679731B (en) 2013-12-18 2013-12-18 Arc partition method based on file and picture

Publications (2)

Publication Number Publication Date
CN103679731A true CN103679731A (en) 2014-03-26
CN103679731B CN103679731B (en) 2016-12-07

Family

ID=50317182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310700137.3A Active CN103679731B (en) 2013-12-18 2013-12-18 Arc partition method based on file and picture

Country Status (1)

Country Link
CN (1) CN103679731B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133499A (en) * 2017-11-16 2018-06-08 李名雪 A kind of conversion method of dot chart and CAD/CAM polar plots

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6219989A (en) * 1985-07-18 1987-01-28 Fuji Electric Co Ltd Discrimination method for superposed pattern
US20130142396A1 (en) * 2011-12-01 2013-06-06 Canon Kabushiki Kaisha Estimation of shift and small image distortion
CN103425988A (en) * 2013-07-03 2013-12-04 江南大学 Real-time positioning and matching method with arc geometric primitives

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6219989A (en) * 1985-07-18 1987-01-28 Fuji Electric Co Ltd Discrimination method for superposed pattern
US20130142396A1 (en) * 2011-12-01 2013-06-06 Canon Kabushiki Kaisha Estimation of shift and small image distortion
CN103425988A (en) * 2013-07-03 2013-12-04 江南大学 Real-time positioning and matching method with arc geometric primitives

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姬忠校: ""机械零件图纸的矢量化及拼接技术研究"", 《中国优秀硕士学位论文全文数据库(信息科技辑)》, no. 9, 15 September 2008 (2008-09-15), pages 24 - 45 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133499A (en) * 2017-11-16 2018-06-08 李名雪 A kind of conversion method of dot chart and CAD/CAM polar plots
CN108133499B (en) * 2017-11-16 2023-08-01 李名雪 Conversion method of bitmap and CAD/CAM vector diagram

Also Published As

Publication number Publication date
CN103679731B (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN106709946B (en) LiDAR point cloud-based automatic multi-split conductor extraction and fine modeling method
KR102125959B1 (en) Method and apparatus for determining a matching relationship between point cloud data
CN107767382B (en) The extraction method and system of static three-dimensional map contour of building line
CN110349252A (en) A method of small curvature part actual processing curve is constructed based on point cloud boundary
CN110188778B (en) Residential area element outline regularization method based on image extraction result
CN108550166B (en) Spatial target image matching method
CN104408772A (en) Grid projection-based three-dimensional reconstructing method for free-form surface
CN108921942A (en) The method and device of 2D transformation of ownership 3D is carried out to image
CN102881028A (en) Method for quickly vectorizing grid digital image
CN104517109A (en) QR code image correction method and system
US20150199797A1 (en) Method and system for image correction using a quasiperiodic grid
CN102236789A (en) Method and device for correcting table image
CN111209805B (en) Rapid fusion optimization method for multi-channel segment data of lane line crowdsourcing data
CN113191311B (en) Method, device, equipment and storage medium for identifying filling boundary of vector PDF drawing
CN106815830B (en) Image defect detection method
CN110132168A (en) A kind of three-dimensional laser point cloud data processing system
CN111696059B (en) Lane line smooth connection processing method and device
CN110415362B (en) Overlapping point cloud fusion method
CN115222883A (en) Electric power tower reconstruction method based on foundation LiDAR point cloud
WO2017107866A1 (en) Image retrieval server and system, related retrieval and troubleshooting method
CN103679731A (en) Arc partition method based on document images
CN106780577B (en) A kind of matching line segments method based on group feature
CN116539619B (en) Product defect detection method, system, device and storage medium
CN115564673B (en) Three-dimensional point cloud underground garage column extraction and vector automatic generation method and system
CN107464272A (en) The interpolation method of central diffusion type meteorological causes isopleth based on key point

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant