CN101393648B - Recognition method for hand drawing geometrical drawing - Google Patents
Recognition method for hand drawing geometrical drawing Download PDFInfo
- Publication number
- CN101393648B CN101393648B CN2008101989947A CN200810198994A CN101393648B CN 101393648 B CN101393648 B CN 101393648B CN 2008101989947 A CN2008101989947 A CN 2008101989947A CN 200810198994 A CN200810198994 A CN 200810198994A CN 101393648 B CN101393648 B CN 101393648B
- Authority
- CN
- China
- Prior art keywords
- point
- unique
- points
- output
- sampling
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a method for identifying hand drawing geometric figures. The method comprises the following steps: (a) storing the point sequence of a sampling curve in the trending sequence of a hand drawing geometric figure, and selecting sampling points from the point sequence, wherein the sampling points comprise a starting point and an ending point; (b)selecting sampling points on the turning site of the sampling curve from the sampling points and storing the same as characteristic points which include a starting point and an ending point, after the drawing is finished; and (c) analyzing the stored characteristic points from the starting point to the ending point step by step, determining whether a geometric figure is formed with all the characteristic points as the apex, connecting all the characteristic points and outputting the geometric figure if so, and outputting the stored sampling curve if not. The invention has the advantages of having no need of building a database in advance, saving system resource, identifying quickly and improving the utilization rate.
Description
Technical field
The present invention relates to be used to discern the recognition methods of hand-drawing graphics.
Background technology
The recognition technology of hand drawing geometrical drawing, in some sketch systems, can play good booster action, this technology is with mouse or other input tools, utilizes computing machine to draw, and some coarse geometric figures is discerned the geometric figure of the standard of repainting.
Hand drawing geometrical drawing recognition methods commonly used at present mainly contains following a few class:
1, statistical method, based on the most following square of matching method of linearity of conic section method, energy real-time grading Freehandhand-drawing stroke, identification straight line, elliptic arc and fillet;
2, fuzzy reasoning method, with fuzzy logic and fuzzy knowledge, the intention from position, direction, speed and the acceleration of sketch caught the illustrator realizes sketch recognition;
3, method of geometry is discerned cartographical sketching as a whole, need carry out smoothing processing, extracts circular arc, and recognition node decomposites steps such as straight-line segment;
4, neural net method by extracting the interior corner characteristics of pixel geometric configuration, is discerned with the Weight algorithm BSW of scale-of-two cynapse.
The above-mentioned method that is used to discern all needs to set up the lot of data storehouse, the step of analyzing identification is more loaded down with trivial details, when identification simple sealed geometric figure, especially in the sketch drafting, in most cases only need the fairly simple closed geometry figure of identification, but will set in advance bigger database yet, occupy resource, utilization ratio is not high.
Summary of the invention
The purpose of this invention is to provide a kind of recognition methods of hand drawing geometrical drawing that can the simple closed geometry figure of quick identification.
Technical solution of the present invention is: a kind of recognition methods of hand drawing geometrical drawing, and it may further comprise the steps:
A, write when beginning, preserve the point sequence of sampling curve in proper order along the hand drawing geometrical drawing trend, and select sampled point to preserve from this point sequence, sampled point comprises starting point and terminal point;
B, write when finishing, select the sampled point of sampling curve turning point to preserve as unique point from sampled point, described unique point comprises starting point and terminal point;
C, progressively analyze the unique point of preservation to terminal from starting point, judging whether to constitute by all unique points is the geometric figure on summit, in this way, then connects all unique points, the geometric figure that output is corresponding, if not, the sampling curve preserved of output then.
The fundamental element of various figures is exactly a little, line is by forming, and various figures can be regarded as by different lines and form, when writing with input equipment hand-drawing graphics such as mouses, preserve the point sequence of hand-drawing graphics, can in the time can't discerning, export original figure, take out sampled point, by analytical characteristic point identification simple geometry figure so that reduce calculated amount, can reduce database volume, accelerate identifying, system resource takies few, and utilization factor improves.
Among the step b, apart from the distance of line between two adjacent feature points, get distance sampled point farthest as unique point in analysis each sampled point between adjacent two unique points, order is obtained whole unique points.Judge the identification figure by unique point, can reduce operand, quick identification simple geometry figure helps improving recognition rate.
Among the step b, have setting value, analytical sampling point is apart from distance the preserving as unique point greater than setting value of line between two adjacent feature points.Avoid whole sampled points are taken out, further improve recognition speed.
Among the step c, unique point is two, the output straight line; Unique point is three, output angle; Unique point is four, and starting point and terminal point coincidence, the output triangle; Unique point is five, and starting point and terminal point coincidence, the output quadrilateral, analyze the slope of tetragonal two pairs of opposite side, and the angle of opposite side and transverse axis, when slope near and spend near 90 degree and 0 with the transverse axis angle, the output rectangle, approaching when slope, export rhombus; Unique point surpasses five, analyze the polygonal interior angle that connects whole unique points and, when this interior angle and with the convex polygon interior angle of corresponding edge number and near the time, output is oval.
Advantage of the present invention is: need not to set up in advance database, save system resource, identification is rapid, and utilization factor improves.
Description of drawings
Accompanying drawing 1 is the schematic flow sheet of recognition methods of the present invention;
Accompanying drawing 2 is the analysis synoptic diagram of unique point in the recognition methods of the present invention;
Accompanying drawing 3 is the Freehandhand-drawing rectilinear figure;
Accompanying drawing 4 is the rectilinear figure after discerning;
Accompanying drawing 5 is Freehandhand-drawing angle figure;
Accompanying drawing 6 is the angle figure after discerning;
Accompanying drawing 7 is the Freehandhand-drawing triangle;
Accompanying drawing 8 is the triangle after discerning;
Accompanying drawing 9 is the quadrilateral of Freehandhand-drawing;
Accompanying drawing 10 is the rectangle after discerning;
Accompanying drawing 11 is the quadrilateral of Freehandhand-drawing;
Accompanying drawing 12 is the rhombus after discerning;
Accompanying drawing 13 is the ellipse of Freehandhand-drawing;
Ellipse after accompanying drawing 14 identifications.
Embodiment
Embodiment:
Consult Fig. 1: a kind of recognition methods of hand drawing geometrical drawing, whole process can be divided into three steps: (1), obtain will participating in the figure sampled point of analysis; (2), according to sampled point analytical characteristic point; (3), discern according to unique point.
Following mask body is analyzed each step:
(1), when after mouse is pressed, lifting, the point sequence of sampling curve is saved in m_point in the database, the m_pointsVec module.This is because when hand-drawing graphics can not be identified as a geometric figure, and we will recover original Freehandhand-drawing figure, thus we have a few all and preserved.What preserve in the m_pointsVec module is the point of getting every a segment distance, distance value at interval can set up on their own according to the precision needs, wherein in the time being identified as the closed geometry figure, starting point and terminal point distance are very near, so just the value of terminal point directly has been arranged to the value of starting point, it is just more convenient, more humane to operate like this.
(2), when upspringing, mouse just begins to carry out choosing of unique point, its analysis principle is referring to sampling curve shown in Figure 2, the straight-line segment ab mark that first and last sampled point are linked to be, calculate point in the curve from i.e. curve the break for this reason of straight line ab sampled point farthest, it also is unique point, come mark with c, 2 new straight-line segment ac and cb have so just been obtained, obtaining new sampled point by the sampled point that calculates on the corresponding sampling curve to the distance of this two days straight-line segments, repeat said method, just can find out all unique points.It should be noted that, the unique point of taking out should be respectively in a scope, otherwise just all sampled points on the sampling curve have been taken out to the end, without any meaning, provide a setting value among the present invention, when the sampled point on the sampling curve, just takes out as unique point, otherwise just do not handle this sampled point during greater than this setting value to the distance of straight-line segment.In the present embodiment, this setting value can be the high or wide a certain ratio value of entire curve section, and being set at ratio value also is in order to adapt to the identification needs of the big or small hand-drawing graphics of difference.
Use following recursive function to calculate in the concrete analysis process, because the order of the unique point of taking out is extremely important for identification, thus need to consider the sequencing problem of unique point, so function needs to describe like this:
Cross(int?left,int?right)
{
Cross(left,tmp);
m_pointCross.push_back(maxPoint);
Cross(tmp,right);
}
Parameter l eft wherein, right is the index of sampled point among the pointsVec, and the concrete calculating of corss is described below:
At first check pointsVec[left], pointsVec[right] between whether also have sampled point, if between do not have sampled point, just do not look for necessity of unique point, return; Otherwise in the sampled point between just calculating apart from pointsVec[left], pointsVec[right] line segment that is linked to be is apart from maximum and satisfy the sampled point of distance greater than setting value, writes down the index of this sampled point point, with variable tmp preservation.(left tmp), preserves this m_pointCross.push_back (maxPoint), and what vectorial m_pointCross preserved is exactly the unique point that obtains to calculate Cross then.Calculate again Cross (tmp, right).This order has just guaranteed that unique point stores in order.
In this step, be exactly to calculate the distance that this puts straight-line segment to the calculating of unique point, then with a setting value relatively, greater than just staying, otherwise just continue.This setting value directly has influence on the degree of identification, because it is many more that the more little unique point of particular value is got, much the unique point that should ignore has just been preserved, and a lot of like this figures that should discern just can't be discerned, and the unique point of taking-up also will go wrong in the differentiation of figure very little.For example parallelogram is identified as ellipse etc.
(3), to the identification of figure.Number of vertex according to the particular geometric figure is determined.Shown in Fig. 3,4, hand-drawing graphics has 2 unique points, is identified as straight line.As illustrated in Figures 5 and 6,3 unique points of hand-drawing graphics are identified as the angle.Shown in Fig. 7 and 8, hand-drawing graphics has 4 unique points, but starting point and terminal point coincidence just are identified as triangle.When 5 unique points are arranged in the hand-drawing graphics is exactly quadrilateral, as Fig. 9 and shown in Figure 10, starting point and terminal point are approaching, are considered as overlapping, and obtain tetragonal 4 limits according to 4, whether the slope size of calculating two pairs of opposite side is similar, equally need be within the specific limits with the control of slope value size, if two pairs of opposite side slope differences are few, and two opposite side are all spent near 90 degree and 0 with the angle of transverse axis respectively, just be identified as rectangle, resetting that 4 summits make after redrawing is a rectangle.As Figure 11 and shown in Figure 12, if just two pairs of opposite side slope differences are few, just be identified as rhombus, recomputate and 4 point values are set redraw rhombus.As Figure 13 and shown in Figure 14, to with only consider whether be identified as ellipse greater than the hand-drawing graphics of 5 unique points, here the recognition methods of usefulness is that a polygon is formed on these summits in proper order, by calculate this polygonal interior angle and, whether the polygon that judgement is connected into by unique point is convex polygon.Usually taking out some in proper order on an ellipse, must be a convex polygon after being linked in sequence, and whether therefore, utilizing this principle to discern hand-drawing graphics is oval.According to the interior angle of convex polygon be: (n-2) * 180 (n is the limit number) compare polygonal interior angle and, whether counter this polygon that pushes away is convex polygon.
Claims (4)
1. the recognition methods of a hand drawing geometrical drawing, it is characterized in that: it may further comprise the steps:
A, write when beginning, preserve the point sequence of sampling curve in proper order along the hand drawing geometrical drawing trend, and select sampled point to preserve from this point sequence, sampled point comprises starting point and terminal point;
B, write when finishing, select the sampled point of sampling curve turning point to preserve as unique point from sampled point, described unique point comprises starting point and terminal point;
C, progressively analyze the unique point of preservation to terminal from starting point, judging whether to constitute by all unique points is the geometric figure on summit, if not, and the sampling curve preserved of output then; In this way, then connect all unique points, unique point is two, the output straight line, unique point is three, output angle, unique point is four, and starting point and terminal point coincidence, the output triangle, unique point is five, and starting point and terminal point coincidence, the output quadrilateral, unique point is above five, analyze to connect whole unique points the polygon interior angle and, when this interior angle and with the convex polygon interior angle of corresponding edge number and near the time, output is oval.
2. the recognition methods of hand drawing geometrical drawing according to claim 1, it is characterized in that: among the step b, apart from the distance of line between two adjacent feature points, get distance sampled point farthest as unique point in analysis each sampled point between adjacent two unique points, order is obtained whole unique points.
3. the recognition methods of hand drawing geometrical drawing according to claim 2 is characterized in that: among the step b, have setting value, analytical sampling point is apart from distance the preserving as unique point greater than setting value of line between two adjacent feature points.
4. according to the recognition methods of claim 1,2 or 3 described hand drawing geometrical drawings, it is characterized in that: among the step c, analyze the slope of tetragonal two pairs of opposite side, and the angle of opposite side and transverse axis, when slope near and opposite side and transverse axis angle spend near 90 degree and 0, the output rectangle when having only slope approaching, is exported rhombus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101989947A CN101393648B (en) | 2008-10-07 | 2008-10-07 | Recognition method for hand drawing geometrical drawing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101989947A CN101393648B (en) | 2008-10-07 | 2008-10-07 | Recognition method for hand drawing geometrical drawing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101393648A CN101393648A (en) | 2009-03-25 |
CN101393648B true CN101393648B (en) | 2011-06-29 |
Family
ID=40493930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008101989947A Expired - Fee Related CN101393648B (en) | 2008-10-07 | 2008-10-07 | Recognition method for hand drawing geometrical drawing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101393648B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102096831B (en) * | 2009-12-15 | 2013-01-30 | 华中师范大学 | Method for identifying graph dynamic relationship |
CN102034254B (en) * | 2010-09-29 | 2012-07-04 | 广东威创视讯科技股份有限公司 | Method for recognizing geometric figure |
CN102411790A (en) * | 2011-07-21 | 2012-04-11 | 福州锐达数码科技有限公司 | Method for mouse track identification and automatic graph generation |
CN102999930B (en) * | 2011-09-15 | 2015-11-25 | 汉王科技股份有限公司 | A kind of electronic handwriting lines plotting method and device |
CN104714666B (en) * | 2013-12-12 | 2017-09-05 | 鸿合科技有限公司 | A kind of smart pen and its stroke recognition processing method |
CN103795925A (en) * | 2014-02-08 | 2014-05-14 | 厦门美图网科技有限公司 | Interactive main-and-auxiliary-picture real-time rendering photographing method |
WO2016145581A1 (en) * | 2015-03-13 | 2016-09-22 | 王浩屹 | Method for generating precise pattern according to hand-drawn graph |
CN104794741B (en) * | 2015-04-09 | 2017-06-16 | 北京工商大学 | The removing method and system of a kind of hand-drawing graphics puppet break |
CN110851062A (en) * | 2019-08-29 | 2020-02-28 | 华为技术有限公司 | Drawing method and electronic equipment |
CN113240774A (en) * | 2021-07-09 | 2021-08-10 | 北京易真学思教育科技有限公司 | Pattern recognition processing method, device, storage medium and electronic equipment |
CN114415876A (en) * | 2022-01-21 | 2022-04-29 | 北京大麦地信息技术有限公司 | Hand-drawn image processing method and device and electronic equipment |
CN117270709B (en) * | 2023-11-20 | 2024-02-13 | 深圳市摩记电子有限公司 | Mouse pointer control method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1150281A (en) * | 1996-06-28 | 1997-05-21 | 王军铸 | Real-time hand-drawing image graphic generating method and system thereof |
JP3686289B2 (en) * | 1999-08-06 | 2005-08-24 | シャープ株式会社 | Handwritten graphic processing apparatus and method, and computer-readable recording medium recording a handwritten graphic processing program |
US7324691B2 (en) * | 2003-09-24 | 2008-01-29 | Microsoft Corporation | System and method for shape recognition of hand-drawn objects |
JP4060261B2 (en) * | 2003-10-16 | 2008-03-12 | 独立行政法人科学技術振興機構 | Method for determining body shape contained in image and method for realizing non-contact type pointing device |
-
2008
- 2008-10-07 CN CN2008101989947A patent/CN101393648B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101393648A (en) | 2009-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101393648B (en) | Recognition method for hand drawing geometrical drawing | |
CN105117054B (en) | A kind of recognition methods of handwriting input and system | |
CN101290659B (en) | Hand-written recognition method based on assembled classifier | |
EP2100258B1 (en) | Device, method and computer program for identifying a road sign in an image | |
CN110443239A (en) | The recognition methods of character image and its device | |
US7515752B2 (en) | Sketch recognition and enhancement | |
CN102034254B (en) | Method for recognizing geometric figure | |
CN101930483B (en) | Method for simplifying numerical map settlement place polygon by utilizing parametric design model | |
CN103258201A (en) | Form line extraction method integrating global information and local information | |
CN104517112A (en) | Table recognition method and system | |
Marie et al. | The delta medial axis: a fast and robust algorithm for filtered skeleton extraction | |
CN106095787A (en) | A kind of Symbolic Representation method of time series data | |
CN101398902A (en) | Natural hand-written Arabian letter on-line identification method | |
CN104680157A (en) | Bundled bar material identification and counting method based on support vector machine | |
CN105046287A (en) | Clustering and fitting method of on-line multi-stroke repeatedly drawn sketch | |
CN110263874A (en) | A kind of image classification method and device based on the study of attention relational graph | |
CN111046735A (en) | Lane line point cloud extraction method, electronic device and storage medium | |
CN101452531B (en) | Identification method for handwriting latin letter | |
CN104156730A (en) | Anti-noise Chinese character feature extraction method based on framework | |
CN104392053A (en) | Skin roll-bending part sectional curvature analysis method | |
CN107729954A (en) | A kind of character recognition method, device, Text region equipment and storage medium | |
Mishchenko et al. | Model-based chart image classification | |
CN107609704A (en) | Two-dimensional silhouette Nesting based on profile principal component analysis feature extraction | |
Sun et al. | Adaptive online multi-stroke sketch recognition based on hidden markov model | |
CN103871055A (en) | Conspicuous object detection method based on dynamic anisotropy receptive field |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 | ||
CP03 | Change of name, title or address |
Address after: 510670 Guangdong Province, Guangzhou high tech Industrial Development Zone Kezhu Road No. 233 Patentee after: Wei Chong group Limited by Share Ltd Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No. Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110629 Termination date: 20181007 |