CN110414525A - A kind of character identifying method and device - Google Patents

A kind of character identifying method and device Download PDF

Info

Publication number
CN110414525A
CN110414525A CN201910701844.1A CN201910701844A CN110414525A CN 110414525 A CN110414525 A CN 110414525A CN 201910701844 A CN201910701844 A CN 201910701844A CN 110414525 A CN110414525 A CN 110414525A
Authority
CN
China
Prior art keywords
circle
center
radius
character
feature
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
CN201910701844.1A
Other languages
Chinese (zh)
Other versions
CN110414525B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201910701844.1A priority Critical patent/CN110414525B/en
Publication of CN110414525A publication Critical patent/CN110414525A/en
Application granted granted Critical
Publication of CN110414525B publication Critical patent/CN110414525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/60Rotation of a whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
    • G06V10/422Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation for representing the structure of the pattern or shape of an object therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Character Input (AREA)
  • Character Discrimination (AREA)

Abstract

The embodiment of the present application provides a kind of character identifying method and device, is related to technical field of image processing, comprising: determines first center of circle comprising the border circular areas around ocra font ocr in images to be recognized;Obtain the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle;According to the first radius and the second radius, determine passed through by first straight line, the adjacent two edges rectangular area parallel with Shui Ping, vertical direction respectively;It is rotation angle step and using first center of circle as rotation axis points using preset angle, along preset direction of rotation continuous rotation at least once around ocra font ocr region, extracts the feature for being located at the picture material of rectangular area after rotation every time;Indicatrix is formed according to extracted feature, obtains the feature for belonging to maximum on indicatrix;The picture material characterized to acquired feature carries out character recognition.Character recognition is carried out using scheme provided by the embodiments of the present application, can be realized to the identification around ocra font ocr.

Description

A kind of character identifying method and device
Technical field
This application involves technical field of image processing, more particularly to a kind of character identifying method and device.
Background technique
With the development of artificial intelligence technology, more and more application scenarios can be related to character recognition.
When carrying out character recognition in the prior art, usually horizontal positioned character is identified.
However, needing to identify to around ocra font ocr in some application scenarios, for example, it is desired to in round seal image Circular ocra font ocr identify etc..
Given this, it is desirable to provide one kind can identify the character recognition scheme of circulating type character.
Summary of the invention
The embodiment of the present application is designed to provide a kind of character identifying method and device, to realize to around ocra font ocr Identification.Specific technical solution is as follows:
In a first aspect, the embodiment of the present application provides a kind of character identifying method, which comprises
The center of circle comprising the border circular areas around ocra font ocr in images to be recognized is determined, as first center of circle;
Obtain the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle, wherein described inscribed The center of circle in the round center of circle and circumscribed circle is first center of circle;
According to first radius and the second radius, determine by first straight line pass through and adjacent two edges respectively with level The parallel rectangular area of direction, vertical direction, wherein the first straight line are as follows: by the vertical straight line in first center of circle;
It is rotation angle step and using first center of circle as rotation axis points using preset angle, along preset rotation side To the continuous rotation circular ocra font ocr region at least once, and extract the figure for being located at the rectangular area after rotation every time As the feature of content;
According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on the indicatrix;
The picture material characterized to acquired feature carries out character recognition, obtains recognition result.
Second aspect, the embodiment of the present application provide a kind of character recognition device, and described device includes:
Center of circle determining module, for determining the center of circle comprising the border circular areas around ocra font ocr in images to be recognized, as First center of circle;
Radius obtains module, for obtain the inscribed circle around ocra font ocr the first radius and circumscribed circle the second half Diameter, wherein the center of circle of the inscribed circle and the center of circle of circumscribed circle are first center of circle;
Area determination module is passed through and adjacent for determining according to first radius and the second radius by first straight line Two sides rectangular area parallel with horizontal direction, vertical direction respectively, wherein the first straight line are as follows: pass through described first The vertical straight line in the center of circle;
Characteristic extracting module, for being to rotate angle step and using first center of circle as rotary shaft using preset angle Point, along the preset direction of rotation continuous rotation circular ocra font ocr region, and position after each rotation of extraction at least once In the feature of the picture material of the rectangular area;
Feature obtains module, for forming indicatrix according to extracted feature, and obtains and belongs on the indicatrix In the feature of maximum;
Character recognition module, the picture material for being characterized to acquired feature carry out character recognition, are identified As a result.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including processor and machine readable storage medium, The machine readable storage medium is stored with the machine-executable instruction that can be executed by the processor, and the processor is by institute It states machine-executable instruction to promote: realizing character identifying method step described in the embodiment of the present application.
Fourth aspect, the embodiment of the present application provide a kind of machine readable storage medium, are stored with machine-executable instruction, When being called and being executed by processor, the machine-executable instruction promotes the processor: realizing described in the embodiment of the present application Character identifying method step.
It as seen from the above, is rotation with preset angle when carrying out character recognition using scheme provided by the embodiments of the present application Gyration step-length and using the center of circle of the border circular areas where the ocra font ocr as rotation axis points, continuously revolves along preset direction of rotation Turn at least once around ocra font ocr region, and is located at the feature of the picture material of rectangular area after each rotation of extraction, according to According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on indicatrix, to acquired feature institute The picture material of characterization carries out character recognition, obtains recognition result.Since above-mentioned rectangular area is to be passed through by first straight line and phase Adjacent two sides rectangular area parallel with horizontal direction, vertical direction respectively.Again since above-mentioned first straight line is by circulating type The vertical straight line in the center of circle of border circular areas where character.So can be by after rotating around ocra font ocr to above-mentioned rectangular area It is considered horizontal positioned character, and then the character being located in above-mentioned rectangular area can be identified, to realizes to ring Around the identification of ocra font ocr.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of character identifying method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another character identifying method provided by the embodiments of the present application;
Fig. 3 a is inscribed circle provided by the embodiments of the present application and circumscribed circle schematic diagram;
Fig. 3 b is the first edge image provided by the embodiments of the present application;
Fig. 3 c is second of edge image provided by the embodiments of the present application;
Fig. 3 d is the third edge image provided by the embodiments of the present application;
Fig. 3 e is the 4th kind of edge image provided by the embodiments of the present application;
Fig. 3 f is the 5th kind of edge image provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram of character recognition device provided by the embodiments of the present application;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Due to needing to identify that the embodiment of the present application provides one kind thus to around ocra font ocr in concrete application scene Character identifying method and device.
In one embodiment of the application, a kind of character identifying method is provided, this method can be applied to electronic equipment. This method comprises:
The center of circle comprising the border circular areas around ocra font ocr in images to be recognized is determined, as first center of circle;
Obtain the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle, wherein above-mentioned inscribed circle The center of circle and the center of circle of circumscribed circle are first center of circle;
According to the first radius and the second radius, determine by first straight line pass through and adjacent two edges respectively with horizontal direction, The parallel rectangular area of vertical direction, wherein above-mentioned first straight line are as follows: by the vertical straight line in first center of circle;
It is rotation angle step and using first center of circle as rotation axis points using preset angle, connects along preset direction of rotation Continuous rotation is located at the spy of the picture material of rectangular area around ocra font ocr region, and after each rotation of extraction at least once Sign;
According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on features described above curve;
The picture material characterized to acquired feature carries out character recognition, obtains recognition result.
Due to above-mentioned rectangular area be passed through by first straight line and adjacent two edges respectively with horizontal direction, vertical direction Parallel rectangular area.Again since above-mentioned first straight line is by around the vertical straight of the center of circle of border circular areas where ocra font ocr Line.So being considered horizontal positioned character after rotating around ocra font ocr to above-mentioned rectangular area, and then can be right Character in above-mentioned rectangular area is identified, to realize to the identification around ocra font ocr.
Character identifying method provided by the embodiments of the present application is described in detail below by specific embodiment.
Referring to Fig. 1, Fig. 1 is a kind of flow diagram of character identifying method provided by the embodiments of the present application, the above method Including following S101-S106.
S101: the center of circle comprising the border circular areas around ocra font ocr in images to be recognized is determined, as first center of circle.
Around the character that ocra font ocr is along circular arc arrangement.For example, with reference to Fig. 3 a, the character " UVWX that circumferentially arranges in figure Seal scholar trade Co., Ltd " is around ocra font ocr.
Wherein, the character for including in above-mentioned circular ocra font ocr can be the squares such as Chinese character, Japanese character, Korea character Shape character can also be the non-box-shaped character such as English character, method Chinese character, German character.
It, can be according to round recognition methods (for example, the round knowledge based on Hough transform in one embodiment of the application Other method) identification images to be recognized in circle, then detect in the circle whether circumferentially there is foreground point again.If it is detected that Circle in circumferentially there is foreground point, it may be considered that the circle area defined is comprising around the circle of ocra font ocr Domain.
It will be appreciated by persons skilled in the art that in the picture, the content of image can be divided into foreground and background. Wherein, prospect refers to the object that subjective role is played in image, and background refers to the content in image in addition to prospect.Before in image Scape and background can be according to different application scenarios and determination.For example, prospect can be image in video monitoring scene In the objects such as people, automobile, building, trees etc. in image in addition to people, automobile are then background, and in character recognition scene In, prospect is character, and the content in image in addition to the characters is then background.
Based on this, it is properly termed as foreground point for describing the pixel of prospect in image, for describing the pixel of background It is properly termed as background dot.
It, can be based on being in Identifying Technique of Object detection image specifically, when whether there is foreground point in detection image The no object existed as prospect, and if it exists, it may be considered that there are foreground points in image.
It can be realized with connected applications scene using any Identifying Technique of Object in the prior art during specific implementation Object detection, I will not elaborate.
Specifically, the circle in images to be recognized can be detected by the way of carrying out Hough transform to images to be recognized. In addition, can also determine detected circle other than it can detecte out the circle in images to be recognized using Hough transform The center of circle, that is, above-mentioned first center of circle.
S102: the first radius of the above-mentioned inscribed circle around ocra font ocr and the second radius of circumscribed circle are obtained.
Wherein, the center of circle of above-mentioned inscribed circle and the center of circle of circumscribed circle are first center of circle.
Since character has certain height, and due to arranging around ocra font ocr along circular arc, it is therefore contemplated that circulating type Character has inscribed circle and circumscribed circle.Wherein, inscribed circle can be understood as above-mentioned circular ocra font ocr close to above-mentioned first center of circle The corresponding circle in side.Circumscribed circle can be understood as side corresponding circle of the above-mentioned circular ocra font ocr far from above-mentioned first center of circle Shape.
For example, with reference to Fig. 3 a, the inscribed circle and circumscribed circle around ocra font ocr are shown.Wherein, " UVWX seal scholar in Fig. 3 a Trade Co., Ltd " is to surround ocra font ocr, and circle shown in the thick dashed line in figure on the outside of circulating type character is around ocra font ocr Circumscribed circle, circle shown in the fine dotted line in figure on the inside of circulating type character are the inscribed circle around ocra font ocr.
It is noted that above-mentioned inscribed circle and circumscribed circle are not the circle actually existed in images to be recognized, but Fictionalize the circle come.
In view of the foregoing, in one embodiment of the application, obtain around ocra font ocr inscribed circle the first radius and When the second radius of circumscribed circle, the graphics field and non-circulating type character location in above-mentioned border circular areas can be first determined Domain, the pixel that will include in the zone boundary of above-mentioned border circular areas, above-mentioned graphics field and non-circulating type character region Point is set as background dot, can make in above-mentioned border circular areas in this way except the pixel for describing to surround ocra font ocr is foreground point Outside, other pixels are arranged to background dot.
On the basis of the above, the minimum range in first center of circle and above-mentioned border circular areas between foreground point can be obtained, is made For the first radius of the above-mentioned inscribed circle around ocra font ocr, and obtain in first center of circle and above-mentioned border circular areas between foreground point Maximum distance, the second radius as the above-mentioned circumscribed circle around ocra font ocr.
Specifically, above-mentioned graphics field can be the region including star graphic, it is also possible to the area of star graphic composition Domain etc..
In one embodiment, SWT (Stationary Wavelet can be carried out using to above-mentioned border circular areas Transform, Stationary Wavelet Transform) mode, determine the graphics field in above-mentioned border circular areas.Above-mentioned border circular areas is image Region carries out SWT processing to above-mentioned border circular areas, that is, carries out SWT processing to image-region, then carries out to processing result Graphics field detection, to determine the graphics field of the border circular areas.Specifically, can be examined according to graphics field in the prior art Survey mode carries out graphics field detection to processing result, and I will not elaborate.
Furthermore it is also possible to be determined in above-mentioned border circular areas by the way of carrying out edge extracting to above-mentioned border circular areas Graphics field.Wherein, it can be realized using any Boundary extracting algorithm in the prior art when carrying out edge extracting, here no longer in detail It states.Then the graphics field in above-mentioned border circular areas can be determined according to the information such as shape of connected domain in edge extracting result.
In one embodiment of the application, the non-circulating type character region in above-mentioned border circular areas can be by following Mode determines:
Horizontally arranged character is known otherwise using existing, or the character being vertically arranged is identified Mode, non-circulating type character recognition is carried out to above-mentioned border circular areas, in this case, it is believed that can successfully be carried out word The region of symbol identification is non-circulating type character region.
Above-described embodiment is illustrated below with reference to specific example.
Referring to Fig. 3 b- Fig. 3 d, wherein circular edge line is the above-mentioned border circular areas comprising around ocra font ocr in Fig. 3 b Boundary, pentalpha region are above-mentioned graphics field, and " YZ branch company " region is non-circulating type character region. Image after setting the pixel for including in the boundary of above-mentioned border circular areas and pentalpha to background dot is as shown in Figure 3c.It will It is as shown in Figure 3d that the pixel for including in non-circulating type character is set as the image after background dot.
In addition, black line short in Fig. 3 e indicates that above-mentioned first radius, long black line indicate above-mentioned second radius.
S103: according to the first radius and the second radius, determine by first straight line pass through and adjacent two edges respectively with level The parallel rectangular area of direction, vertical direction.
Wherein, above-mentioned first straight line are as follows: by the vertical straight line in first center of circle.
Specifically, above-mentioned rectangular area can be located at the upside in above-mentioned first center of circle, above-mentioned first center of circle can also be located at Downside.
In one embodiment of the application, the region in above-mentioned rectangular area positioned at first straight line two sides can be equal , it is, above-mentioned rectangular area is the axial symmetry image-region using first straight line as symmetry axis.Certainly, the embodiment of the present application In do not limit yet in above-mentioned rectangular area positioned at first straight line two sides region it is strictly equal.
Based on foregoing description, in one embodiment of the application, above-mentioned rectangle region can be determined by following steps A-C Domain.
Step A: the side length L of rectangular area is calculated according to following formula:
L=R2-R1+2P
Wherein, R1 indicates that the first radius, R2 indicate that the second radius, P indicate default value.
Above-mentioned default value P can be determined according to subsequent rotary course bring pixel-shift.A kind of realization of the application In mode, subsequent rotary course bring pixel-shift is bigger, and the value of above-mentioned P can be set bigger, for example, above-mentioned P Value can be set to 8,9,10 etc., and the unit of above-mentioned P can be pixel.Conversely, subsequent rotary course bring pixel is inclined Move smaller, the value of above-mentioned P can be set smaller, for example, the value of above-mentioned P can be set to 2,3,4 etc..It is calculating in this way When the side length of rectangular area, above-mentioned P is introduced, can effectively mitigate subsequent rotary course bring pixel-shift.
Step B: the coordinate of the lower-left angular vertex of above-mentioned rectangular area is calculated according to following formula:
CL_X=CO_X-L/2
CL_Y=CO_Y+R1-P
Wherein, CL_X、CL_YIndicate cross, the ordinate of above-mentioned lower-left angular vertex, CO_X、CO_YIndicate the horizontal, vertical of first center of circle Coordinate.
Step C: according to the coordinate of above-mentioned lower-left angular vertex, determine side length be L and adjacent two edges respectively with level side The rectangular area parallel to, vertical direction.
The rectangular area determined in this way according to above-mentioned steps A-C, from horizontal direction for, be located around ocra font ocr institute In the centre of border circular areas horizontal direction, from vertical direction for, correspond to around ocra font ocr highest area in the vertical direction Domain.And it surround the character that horizontal center and vertical highest character are generally horizontally arranged in ocra font ocr.
For example, with reference to Fig. 3 f, figure center is above-mentioned rectangle in the rectangle frame area defined outside " scholar " this character Region
S104: being rotation angle step and using first center of circle as rotation axis points using preset angle, along preset rotation side It is located at the picture material of rectangular area around ocra font ocr region, and after each rotation of extraction at least once to continuous rotation Feature.
Herein, " continuous rotation is at least once " refers to using first center of circle as rotation axis points, with initial position (if not carrying out Cross rotation)/last time postrotational position (if carrying out rotation) is as starting rotation position, and rotation is at least once.
By taking circulating type character region in Fig. 3 f along clockwise direction continuous rotation 3 times as an example.By circulating type in Fig. 3 f Character region is rotated in a clockwise direction once, it is assumed that " chapter " this character is located in rectangular area, this is rotation 1 It is secondary.Then circulating type character region in image that " chapter " this character is located in rectangular area is rotated in a clockwise direction Once, it is assumed that " print " this character is located in rectangular area, this is rotation 2 times." print " this character is finally located at square Circulating type character region is rotated in a clockwise direction once in image in shape region, it is assumed that " X " this character bit In in rectangular area, this is rotation 3 times.
Specifically, above-mentioned preset angle can be set according to the requirement in concrete application scene to precision.For example, to essence It spends more demanding, then can set above-mentioned preset angle to lesser value, but calculating speed can be relatively slow in this way, if otherwise It is lower to required precision, then biggish value can be set by above-mentioned preset angle, required precision can met in this way Meanwhile accelerating calculating speed.
For example, above-mentioned preset angle can be set to 3 degree, 5 degree etc..
It above-mentioned preset direction of rotation can be for counterclockwise, or clockwise.It specifically can be according to answering It is set with the habit that character in scene is written.For example, the habit that character is written in application scenarios is book from left to right It writes, then above-mentioned preset direction of rotation can be for counterclockwise.
Above-mentioned circular ocra font ocr region can be entire above-mentioned border circular areas, can also be only comprising around type-word The region of symbol, it is, a part of above-mentioned border circular areas, the application are defined not to this.
In addition, can rotate a circle, that is, after 360 degree when being rotated to above-mentioned circular ocra font ocr region, Terminate rotation.
Furthermore since the thought that scheme provided by the embodiments of the present application carries out character recognition is: when in ocra font ocr After each character is rotated into above-mentioned rectangular area, it is converted into the character of level of approximation placement, so as to realize that character is known Not, given this situation, it is respectively positioned on the left side of above-mentioned first straight line in above-mentioned circular ocra font ocr, or is respectively positioned on above-mentioned first When the right of straight line, rotation can also be terminated after rotating 180 degree.
The feature mode for the picture material for being located at above-mentioned rectangular area after rotating is extracted in following embodiments shown in Fig. 2 It is described, wouldn't be described in detail here.
S105: according to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on indicatrix.
The above-mentioned available multiple features of S104, these are characterized in the presentation of specific value, that is, above-mentioned S104 can , in this case can be by the way of curve matching to obtain the value of multiple features, each spy that above-mentioned S104 is obtained The value of sign carries out curve fitting, to obtain an indicatrix.Wherein, the every bit on this indicatrix is rotation It is located at the value of the feature of the picture material of rectangular area in the process.Maximum point on this indicatrix is characterized on curve Point, so the value of above-mentioned maximum point is also the value of the feature of the picture material positioned at rectangular area, it is, above-mentioned The value of maximum point corresponds to the value of the feature of the picture material of rectangular area, and the value of maximum point also characterizes in image Feature possessed by holding.Again since the maximum point on indicatrix is the maximum point of local value on indicatrix, so, pole The value of the feature of the picture material of the corresponding rectangular area of value of big value point is also in circulating type character zone rotary course Positioned at the local maxima value of the feature of the picture material of rectangular area.Furthermore the value of feature is bigger, illustrate this feature institute table The picture material of sign more has feature abundant, and therefore, the picture material that the value of these maximum points is characterized has part The most abundant feature.
In addition, when annular character includes the whole region of a character in rotary course, in above-mentioned rectangular area, rectangle The feature of picture material is able to reflect the feature of entire character in region, and feature is compared with horn of plenty, and in above-mentioned rectangular area only When partial region comprising a character, the feature of picture material is then merely capable of the spy of reflection partial character in rectangular area Sign, therefore, feature will not be very abundant.In consideration of it, after annular character is rotated to above-mentioned rectangular area, in rectangular area in image It is most abundant that the feature of appearance can reach part.
From the discussion above it is known that the feature for belonging to maximum on features described above curve is considered complete character The feature of picture material in rectangular area behind above-mentioned rectangular area.
S106: the picture material characterized to acquired feature carries out character recognition, obtains recognition result.
In this step, acquired feature is to belong to the feature of maximum on the indicatrix obtained in above-mentioned S105, It is exactly, it is considered to be complete character is rotated into the feature of picture material in rectangular area behind above-mentioned rectangular area.Again due to upper Stating rectangular area is to be passed through by first straight line and the adjacent two edges rectangular area parallel with horizontal direction, vertical direction respectively, And above-mentioned first straight line is by the vertical straight line around the center of circle of border circular areas where ocra font ocr.So acquired in above-mentioned It is not only may be considered that in the picture material that feature is characterized comprising complete character, included complete character can also be considered It is horizontal positioned.In this case, character recognition can be carried out using existing character recognition mode.
As seen from the above, when carrying out character recognition using the scheme that above-mentioned each embodiment provides, it is with preset angle Rotate angle step and using the center of circle of the border circular areas where the ocra font ocr as rotation axis points, it is continuous along preset direction of rotation Rotation is located at the feature of the picture material of rectangular area around ocra font ocr region, and after each rotation of extraction at least once, According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on indicatrix, to acquired feature The picture material characterized carries out character recognition, obtains recognition result.Due to above-mentioned rectangular area be passed through by first straight line and The adjacent two edges rectangular area parallel with horizontal direction, vertical direction respectively.Again since above-mentioned first straight line is by surrounding The vertical straight line in the center of circle of border circular areas where ocra font ocr.So can be with after rotating around ocra font ocr to above-mentioned rectangular area It is considered as horizontal positioned character, and then the character being located in above-mentioned rectangular area can be identified, thus realization pair Around the identification of ocra font ocr.
In one embodiment of the application, referring to fig. 2, Fig. 2 provides the flow diagram of another character identifying method, Compared with above-mentioned embodiment illustrated in fig. 1, above-mentioned S104 can be realized by following S104A-S104D.
S104A: being rotation angle step and using first center of circle as rotation axis points using preset angle, along preset rotation Direction continuous rotation above-mentioned circular ocra font ocr region at least once.
S104B: counting the quantity of foreground point in picture material to be processed, as the first quantity.
Wherein, above-mentioned picture material to be processed are as follows: be located at the picture material of above-mentioned rectangular area after rotation every time.
S104C: counting the quantity for meeting the foreground point of preset condition in picture material to be processed, as the second quantity.
Wherein, above-mentioned preset condition are as follows: adjacent pixel is foreground point or along the vertical direction in the horizontal direction Neighbor pixel is foreground point.
It is assumed that pixel is Pic (x, y), then adjacent pixel in the horizontal direction are as follows: Pic (x-1, y) and Pic (x+1, y), along the vertical direction adjacent pixel are as follows: Pic (x, y-1) and Pic (x, y+1).
On this basis, the foreground point for meeting above-mentioned preset condition refers to:
In the case where Pic (x y) is foreground point, Pic (x-1, y) and Pic (x+1, y) are foreground point or Pic (x, y-1) and Pic (x, y+1) are foreground point.
In other examples, above-mentioned preset condition are as follows: adjacent pixel is foreground point and along perpendicular in the horizontal direction Histogram to neighbor pixel be foreground point.
S104D: it is in varying numbers in zero in the case where first, ratio of second quantity relative to the first quantity is calculated, is made For the feature of picture material to be processed.
In one embodiment of the application, when above-mentioned first quantity is equal to zero, above-mentioned image to be processed can be directly set The feature of content is zero.
It should be noted that can first pass through above-mentioned S104A during executing above-mentioned S104A-S104D and carry out one Then secondary rotation executes above-mentioned S104B-S104D for the picture material for being located at above-mentioned rectangular area after rotation, on having executed It after stating S104B-S104D, returns to above-mentioned S104A and continues rotation process, so circulation is until meet the knot for terminating rotation Beam condition.
For example, above-mentioned termination condition, which can be, has rotated through 360 degree, or has rotated through preset other angles, Such as, 180 degree etc..
Since position of the above-mentioned circular ocra font ocr in images to be recognized is arbitrary, so the first character identified Symbol is not necessarily the first character in ocra font ocr, so after completing character recognition, it can also be each to what is identified The sequence of character is adjusted.
Again due to along preset direction of rotation, although the first character around ocra font ocr is deposited between a last character In character, but the opposite direction along above-mentioned direction of rotation, it can between the first character and last character of ocra font ocr It can be that character is not present.For example, with reference to Fig. 3 f, along clockwise direction, around ocra font ocr " the limited public affairs of UVWX seal scholar's trade Department " in first character " U " between a last character " department " there are character " V ", " W ", " X " " print ", " chapter ", " scholar ", " trade ", " easy ", " having ", " limit ", " public affairs ", " department ".And opposite direction along clockwise direction is namely counterclockwise, above-mentioned first There is no characters between a last character " department " for a character " U ".When the region there is no character is rotated to above-mentioned rectangle region Behind domain, since picture material is simple in rectangular area, so the value of the feature of picture material is smaller in rectangular area.
In consideration of it, after obtaining recognition result, can also determine and connect on indicatrix in one embodiment of the application The curve section that the continuous value no more than preset value is formed, and according to preset direction of rotation, acquired feature and above-mentioned curve Relative positional relationship of the section on indicatrix adjusts the sequence of character in obtained recognition result.
Wherein, acquired feature and relative position of the above-mentioned curve section on indicatrix may be that acquired feature exists Before above-mentioned curve section, it is also possible to which acquired feature is after above-mentioned curve section.
Since the value in above-mentioned curve section is no more than preset value, and the every bit on indicatrix is to rotate through It is located at the feature of the picture material of rectangular area in journey, it is, it is rotation that each value in curve section, which is every bit, It is located at the feature of the picture material of rectangular area during turning, then illustrates the figure that each value in above-mentioned curve section is characterized As content is relatively simple, may not include character.So as to think that above-mentioned curve section corresponds in ocra font ocr, along upper The opposite direction of direction of rotation is stated from first character to the image-region a last character.
Specifically, can be the curve area that determination section length is not less than preset length when determining above-mentioned curve section Between.Due to some characters are relatively simple or adjacent character between gap it is big, the rotation of image-region in the case of these is supreme After stating rectangular area, the feature of picture material can be smaller in obtained rectangular area, so having on features described above curve can Shorter curve section can occur.To exclude such situation, a preset length can be set, when determining curve section is less than this When preset length, it is believed that the curve section be due to character is relatively simple or adjacent character between gap it is big and obtain.Although Value is all not more than above-mentioned preset value in these shorter curve sections, but these shorter curve sections are not correspond to edge The opposite direction of above-mentioned direction of rotation is from first character to the region for not including character a last character, therefore, application Aforesaid way can effectively exclude this kind of continuum.
When the siding-to-siding block length in a certain curve section is not less than preset length, then curve section then corresponds to rectangular area Picture material in do not include character region.
Specifically, above-mentioned preset value can be zero.
Due to above-mentioned preset direction of rotation can be clockwise, be also possible to counterclockwise, below assuming that Character is according in tactic situation from left to right, and a point situation is illustrated.
The first situation, above-mentioned preset direction of rotation are counterclockwise
In this case, after determining above-mentioned curve section, above-mentioned curve area can will be located in acquired feature Between after first characterized picture material of feature recognition result, as the first character in the ocra font ocr.Also It is the feature being located at after above-mentioned curve section according to determined feature putting in order from left to right, in acquired feature The recognition result of the picture material characterized is the last period character in ocra font ocr, and is located at before above-mentioned curve section The recognition result for the picture material that feature is characterized is the latter section of character in the ocra font ocr, then splice the last period character and Latter section of character, obtains final recognition result.
For example, according to rotating counterclockwise, then " scholar's trade is limited when identifying to the circular ocra font ocr in Fig. 3 f The feature of picture material is located at before curve section in these character regions of company ", and " UVWX seal " these words The feature of picture material is located at after curve section in symbol region, and " U " is first feature after above-mentioned curve section The recognition result of characterized picture material, this six characters of U, V, W, X, print, chapter be it is successively identified, scholar, trade, easily, have, Limit, public, to take charge of this seven characters be successively identified, but is identified before U, V, W, X, print, chapter this six characters, on State the identified sequence of each character with it is above-mentioned it is preset put in order it is consistent.By the knowledge of U, V, W, X, print, chapter this six characters Other result and scholar, trade, easily, have, limit, recognition result that is public, taking charge of this seven characters splices, the knowledge after sequencing can be obtained Other result.
Second situation, above-mentioned preset direction of rotation are clockwise
In this case, after determining above-mentioned curve section, above-mentioned curve area can will be located in acquired feature Between before the characterized picture material of the last one feature recognition result, as the first character in the ocra font ocr. It is exactly, according to determined feature putting in order from right to left, to be located at before above-mentioned curve section in the feature determined The recognition result of picture material that is characterized of feature be the last period character around ocra font ocr, and be located at above-mentioned curve section it The recognition result for the picture material that feature afterwards is characterized is the latter section of character in ocra font ocr.
In one example, in such a way that latter section of character is posterior in preceding, the last period character, splicing the last period character with it is latter Section character, obtains the reversed character of character after splicing, obtains final recognition result.
For example, when being identified to the circular ocra font ocr in Fig. 3 f, according to being rotated clockwise, then " scholar's chapter prints XWVU " The feature of picture material is located at before curve section in these character regions, and " the public limit of department has easy trade " these characters The feature of picture material is located at after curve section in region, " U " be above-mentioned curve section before first feature institute Characterize the recognition result of picture material, scholar, chapter, print, X, W, V, U this seven characters be it is successively identified, department, it is public, limit, have, Easily, trade, this six characters are successively identified, but are identified after scholar, chapter, print, X, W, V, U this seven characters, The identified sequence of above-mentioned each character and it is above-mentioned it is preset put in order it is opposite.With latter section of character in preceding, the last period character Posterior mode, splicing scholar, chapter, print, the recognition result of X, W, V, U this seven characters and department, public affairs, limit, have, easily, trade this six The recognition result of character, character after being spliced " department, it is public, limit, have, easily, trade, scholar, chapter, print, X, W, V, U ".Then according to from The right side is reversed to left sequence, obtains the reversed character of character after splicing, that is, obtain " U, V, W, X, print, chapter, scholar, trade, easily, Have, limit, is public, department ", the recognition result after sequencing can be obtained.
In another example, the reversed character of the last period character and the reversed word of latter section of character can be obtained respectively Symbol, then splices the reversed character of the last period character and the reversed character of latter section of character again, obtains final recognition result.
For example, when being identified to the circular ocra font ocr in Fig. 3 f, according to being rotated clockwise, then " scholar's chapter prints XWVU " The feature of picture material is located at before curve section in these character regions, and " the public limit of department has easy trade " these characters The feature of picture material is located at after curve section in region, " U " be above-mentioned curve section before first feature institute Characterize the recognition result of picture material, scholar, chapter, print, X, W, V, U this seven characters be it is successively identified, department, it is public, limit, have, Easily, this six characters of trade are successively identified, but are identified after scholar, chapter, print, X, W, V, U this seven characters, on State the identified sequence of each character and it is above-mentioned it is preset put in order it is opposite.Obtain offices and men, chapter, print, X, W, V, U this seven words The reversed character of symbol: U, V, W, X, print, chapter, scholar and acquisition department, public affairs, limit, have, easily, the reversed character of trade this six characters: Trade, easily, have, limit, is public, department, the reversed character of the reversed character and latter section of character that splice the last period character obtain " U, V, W, X, Print, chapter, scholar, trade, easily, have, limit, is public, department ", the recognition result after sequencing can be obtained.
Corresponding with above-mentioned character identifying method, the embodiment of the present application also provides a kind of character recognition devices.
Referring to fig. 4, Fig. 4 provides a kind of structural schematic diagram of character recognition device, which includes:
Center of circle determining module 401 is made for determining the center of circle comprising the border circular areas around ocra font ocr in images to be recognized For first center of circle;
Radius obtains module 402, for obtain the inscribed circle around ocra font ocr the first radius and circumscribed circle the Two radiuses, wherein the center of circle of the inscribed circle and the center of circle of circumscribed circle are first center of circle;
Area determination module 403, passed through by first straight line for determining according to first radius and the second radius and The adjacent two edges rectangular area parallel with horizontal direction, vertical direction respectively, wherein the first straight line are as follows: described in process The vertical straight line in first center of circle;
Characteristic extracting module 404, for being to rotate angle step and using first center of circle as rotary shaft using preset angle Point along preset direction of rotation continuous rotation at least once around ocra font ocr region, and is located at square after extracting rotation every time The feature of the picture material in shape region;
Feature obtains module 405, for forming indicatrix according to extracted feature, and obtains the indicatrix On belong to the feature of maximum;
Character recognition module 406, the picture material for being characterized to acquired feature carry out character recognition, are known Other result.
In one embodiment of the application, the characteristic extracting module 404 is specifically used for:
Using preset angle as rotary step and using first center of circle as rotation axis points, along preset direction of rotation pair The circular ocra font ocr region is gradually rotated;
The quantity for counting foreground point in picture material to be processed, as the first quantity, wherein the picture material to be processed Are as follows: it is located at the picture material of the rectangular area after rotation every time;
The quantity for meeting the foreground point of preset condition in the picture material to be processed is counted, as the second quantity, wherein The preset condition are as follows: adjacent pixel is foreground point in the horizontal direction or neighbor pixel along the vertical direction is Foreground point;
It is in varying numbers in zero in the case where described first, calculate ratio of second quantity relative to first quantity Value, the feature as the picture material to be processed.
In one embodiment of the application, described device further include:
Section determining module, for determining the curve area continuously formed no more than the value of preset value on the indicatrix Between;
Sort adjustment module is used for according to the preset direction of rotation, acquired feature and the curve section in institute The relative positional relationship on indicatrix is stated, the sequence of character in obtained recognition result is adjusted.
In one embodiment of the application, the area determination module 403 is specifically used for:
The side length L of rectangular area is calculated according to following formula:
L=R2-R1+2P
Wherein, R1 indicates that first radius, R2 indicate that second radius, P indicate default value;
The coordinate of the lower-left angular vertex of the rectangular area is calculated according to following formula:
CL_X=CO_X-L/2
CL_Y=CO_Y+R1-P
Wherein, CL_X、CL_YIndicate cross, the ordinate of the lower-left angular vertex, CO_X、CO_YIndicate first center of circle Horizontal, ordinate;
According to the coordinate of the lower-left angular vertex, determine side length be L and adjacent two edges respectively with horizontal direction, perpendicular Histogram is to parallel rectangular area.
In one embodiment of the application, the radius obtains module 402, is specifically used for:
Determine the graphics field and non-circulating type character region in the border circular areas;
To include in the zone boundary of the border circular areas, the graphics field and non-circulating type character region Pixel is set as background dot;
The minimum range in first center of circle and the border circular areas between foreground point is obtained, as the circular type-word First radius of the inscribed circle of symbol;
The maximum distance in first center of circle and the border circular areas between foreground point is obtained, as the circular type-word Second radius of the circumscribed circle of symbol.
As seen from the above, when carrying out character recognition using the scheme that above-mentioned each embodiment provides, it is with preset angle Rotate angle step and using the center of circle of the border circular areas where the ocra font ocr as rotation axis points, it is continuous along preset direction of rotation Rotation is located at the feature of the picture material of rectangular area around ocra font ocr region, and after each rotation of extraction at least once, According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on indicatrix, to acquired feature The picture material characterized carries out character recognition, obtains recognition result.Due to above-mentioned rectangular area be passed through by first straight line and The adjacent two edges rectangular area parallel with horizontal direction, vertical direction respectively.Again since above-mentioned first straight line is by surrounding The vertical straight line in the center of circle of border circular areas where ocra font ocr.So can be with after rotating around ocra font ocr to above-mentioned rectangular area It is considered as horizontal positioned character, and then the character being located in above-mentioned rectangular area can be identified, thus realization pair Around the identification of ocra font ocr.
Corresponding with above-mentioned character identifying method, the embodiment of the present application also provides a kind of electronic equipment.
The structural schematic diagram of a kind of electronic equipment is provided referring to Fig. 5, Fig. 5, above-mentioned electronic equipment includes: processor 501 With machine readable storage medium 502, the machine readable storage medium 502 is stored with and can be executed by the processor 501 Machine-executable instruction, the processor 501 are promoted by the machine-executable instruction: realizing word provided by the embodiments of the present application The step of according with recognition methods.
In one embodiment of the application, a kind of character identifying method is provided, this method comprises:
The center of circle comprising the border circular areas around ocra font ocr in images to be recognized is determined, as first center of circle;
Obtain the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle, wherein described inscribed The center of circle in the round center of circle and circumscribed circle is first center of circle;
According to first radius and the second radius, determine by first straight line pass through and adjacent two edges respectively with level The parallel rectangular area of direction, vertical direction, wherein the first straight line are as follows: by the vertical straight line in first center of circle;
It is rotation angle step and using first center of circle as rotation axis points using preset angle, along preset rotation side To continuous rotation at least once around ocra font ocr region, and it is located in the image of the rectangular area after extracting rotation every time The feature of appearance;
According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on the indicatrix;
The picture material characterized to acquired feature carries out character recognition, obtains recognition result.
It should be noted that its for the character identifying method that above-mentioned processor 501 is promoted to realize by machine-executable instruction His embodiment, identical as embodiment mentioned by preceding method embodiment part, which is not described herein again.
As seen from the above, when carrying out character recognition using electronic equipment provided in this embodiment, due to above-mentioned rectangular area It is to be passed through by first straight line and the adjacent two edges rectangular area parallel with horizontal direction, vertical direction respectively.Again due to above-mentioned First straight line is by the vertical straight line around the center of circle of border circular areas where ocra font ocr.So when around ocra font ocr rotate to Be considered horizontal positioned character behind above-mentioned rectangular area, so can to the character being located in above-mentioned rectangular area into Row identification, to realize to the identification around ocra font ocr.
Corresponding with above-mentioned character identifying method, the embodiment of the present application also provides a kind of machine readable storage mediums, should Machine readable storage medium is stored with machine-executable instruction, and when being called and being executed by processor, the machine is executable to be referred to Order promotes the processor: the step of realizing character identifying method provided by the embodiments of the present application.
In one embodiment of the application, a kind of character identifying method is provided, this method comprises:
The center of circle comprising the border circular areas around ocra font ocr in images to be recognized is determined, as first center of circle;
Obtain the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle, wherein described inscribed The center of circle in the round center of circle and circumscribed circle is first center of circle;
According to first radius and the second radius, determine by first straight line pass through and adjacent two edges respectively with level The parallel rectangular area of direction, vertical direction, wherein the first straight line are as follows: by the vertical straight line in first center of circle;
It is rotation angle step and using first center of circle as rotation axis points using preset angle, along preset rotation side To continuous rotation at least once around ocra font ocr region, and it is located in the image of the rectangular area after extracting rotation every time The feature of appearance;
According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on the indicatrix;
The picture material characterized to acquired feature carries out character recognition, obtains recognition result.
It should be noted that other for the character identifying method that above-mentioned machine-executable instruction promotes above-mentioned processor to realize Embodiment, identical as embodiment mentioned by preceding method embodiment part, which is not described herein again.
As seen from the above, execute the machine-executable instruction that is stored in machine readable storage medium provided in this embodiment into When line character identifies, due to above-mentioned rectangular area be passed through by first straight line and adjacent two edges respectively with horizontal direction, vertical The parallel rectangular area in direction.Again since above-mentioned first straight line is by around the vertical of the center of circle of border circular areas where ocra font ocr Straight line.So being considered horizontal positioned character after rotating around ocra font ocr to above-mentioned rectangular area, and then can The character being located in above-mentioned rectangular area is identified, to realize to the identification around ocra font ocr.
It should be noted that above-mentioned machine readable storage medium may include random access memory (Random Access Memory, RAM), it also may include nonvolatile memory (Non-Volatile Memory, NVM), for example, at least a magnetic Disk storage.Optionally, above-mentioned machine readable storage medium can also be that at least one is located remotely from the storage of aforementioned processor Device.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
Herein, relational terms such as first and second and the like be used merely to by an entity or operation with it is another One entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this reality Relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability Contain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also including Other elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device. In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element Process, method, article or equipment in there is also other identical elements.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For electronic equipment and machine readable storage medium embodiment, since it is substantially similar to the method embodiment, so the ratio of description Relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (12)

1. a kind of character identifying method, which is characterized in that the described method includes:
The center of circle comprising the border circular areas around ocra font ocr in images to be recognized is determined, as first center of circle;
Obtain the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle, wherein the inscribed circle The center of circle and the center of circle of circumscribed circle are first center of circle;
According to first radius and the second radius, determine by first straight line pass through and adjacent two edges respectively with horizontal direction, The parallel rectangular area of vertical direction, wherein the first straight line are as follows: by the vertical straight line in first center of circle;
It is rotation angle step and using first center of circle as rotation axis points using preset angle, connects along preset direction of rotation It is continuous to rotate the circular ocra font ocr region at least once, and be located in the image of the rectangular area after extracting rotation every time The feature of appearance;
According to extracted feature, indicatrix is formed, and obtains the feature for belonging to maximum on the indicatrix;
The picture material characterized to acquired feature carries out character recognition, obtains recognition result.
2. the method according to claim 1, wherein the extraction is located at the rectangular area after rotating every time The feature of picture material, comprising:
The quantity for counting foreground point in picture material to be processed, as the first quantity, wherein the picture material to be processed are as follows: It is located at the picture material of the rectangular area after rotation every time;
The quantity for meeting the foreground point of preset condition in the picture material to be processed is counted, as the second quantity, wherein described Preset condition are as follows: adjacent pixel is foreground point in the horizontal direction or neighbor pixel along the vertical direction is prospect Point;
It is in varying numbers in zero in the case where described first, ratio of second quantity relative to first quantity is calculated, Feature as the picture material to be processed.
3. according to the method described in claim 2, it is characterized in that, after the acquisition recognition result, further includes:
Determine the curve section continuously formed no more than the value of preset value on the indicatrix;
According to the preset direction of rotation, acquired feature and relative position of the curve section on the indicatrix Relationship adjusts the sequence of character in obtained recognition result.
4. the method according to claim 1, wherein described according to first radius and the second radius, determination It is passed through and the adjacent two edges rectangular area parallel with horizontal direction, vertical direction respectively by first straight line, comprising:
The side length L of rectangular area is calculated according to following formula:
L=R2-R1+2P
Wherein, R1 indicates that first radius, R2 indicate that second radius, P indicate default value;
The coordinate of the lower-left angular vertex of the rectangular area is calculated according to following formula:
CL_X=CO_X-L/2
CL_Y=CO_Y+R1-P
Wherein, CL_X、CL_YIndicate cross, the ordinate of the lower-left angular vertex, CO_X、CO_YIndicate the horizontal, vertical of first center of circle Coordinate;
According to the coordinate of the lower-left angular vertex, determine side length be L and adjacent two edges respectively with horizontal direction, vertical side To parallel rectangular area.
5. method according to any of claims 1-4, which is characterized in that described to obtain the interior of the circular ocra font ocr Connect the second radius of round the first radius and circumscribed circle, comprising:
Determine the graphics field and non-circulating type character region in the border circular areas;
The pixel that will include in the zone boundary of the border circular areas, the graphics field and non-circulating type character region Point is set as background dot;
The minimum range in first center of circle and the border circular areas between foreground point is obtained, as the circular ocra font ocr First radius of inscribed circle;
The maximum distance in first center of circle and the border circular areas between foreground point is obtained, as the circular ocra font ocr Second radius of circumscribed circle.
6. a kind of character recognition device, which is characterized in that described device includes:
Center of circle determining module, for determining the center of circle comprising the border circular areas around ocra font ocr in images to be recognized, as first The center of circle;
Radius obtains module, for obtaining the first radius of the inscribed circle around ocra font ocr and the second radius of circumscribed circle, Wherein, the center of circle of the inscribed circle and the center of circle of circumscribed circle are first center of circle;
Area determination module is passed through and two adjacent for determining according to first radius and the second radius by first straight line The side rectangular area parallel with horizontal direction, vertical direction respectively, wherein the first straight line are as follows: pass through first center of circle Vertical straight line;
Characteristic extracting module, for being rotation angle step and using first center of circle as rotation axis points, edge using preset angle The preset direction of rotation continuous rotation circular ocra font ocr region at least once, and extract be located at after rotation every time it is described The feature of the picture material of rectangular area;
Feature obtains module, for forming indicatrix according to extracted feature, and obtains and belongs to pole on the indicatrix The feature being worth greatly;
Character recognition module, the picture material for being characterized to acquired feature carry out character recognition, obtain recognition result.
7. device according to claim 6, which is characterized in that the characteristic extracting module is specifically used for:
Using preset angle as rotary step and using first center of circle as rotation axis points, along preset direction of rotation to described It is gradually rotated around ocra font ocr region;
The quantity for counting foreground point in picture material to be processed, as the first quantity, wherein the picture material to be processed are as follows: It is located at the picture material of the rectangular area after rotation every time;
The quantity for meeting the foreground point of preset condition in the picture material to be processed is counted, as the second quantity, wherein described Preset condition are as follows: adjacent pixel is foreground point in the horizontal direction or neighbor pixel along the vertical direction is prospect Point;
It is in varying numbers in zero in the case where described first, ratio of second quantity relative to first quantity is calculated, Feature as the picture material to be processed.
8. device according to claim 7, which is characterized in that described device further include:
Section determining module, it is continuously bent no more than the curve section that the value of preset value is formed on the indicatrix for determining Line;
Sort adjustment module is used for according to the preset direction of rotation, acquired feature and the curve section in the spy The relative positional relationship on curve is levied, the sequence of character in obtained recognition result is adjusted.
9. device according to claim 6, which is characterized in that the area determination module is specifically used for:
The side length L of rectangular area is calculated according to following formula:
L=R2-R1+2P
Wherein, R1 indicates that first radius, R2 indicate that second radius, P indicate default value;
The coordinate of the lower-left angular vertex of the rectangular area is calculated according to following formula:
CL_X=CO_X-L/2
CL_Y=CO_Y+R1-P
Wherein, CL_X、CL_YIndicate cross, the ordinate of the lower-left angular vertex, CO_X、CO_YIndicate the horizontal, vertical of first center of circle Coordinate;
According to the coordinate of the lower-left angular vertex, determine side length be L and adjacent two edges respectively with horizontal direction, vertical side To parallel rectangular area.
10. the device according to any one of claim 6-9, which is characterized in that the radius obtains module, specific to use In:
Determine the graphics field and non-circulating type character region in the border circular areas;
The pixel that will include in the zone boundary of the border circular areas, the graphics field and non-circulating type character region Point is set as background dot;
The minimum range in first center of circle and the border circular areas between foreground point is obtained, as the circular ocra font ocr First radius of inscribed circle;
The maximum distance in first center of circle and the border circular areas between foreground point is obtained, as the circular ocra font ocr Second radius of circumscribed circle.
11. a kind of electronic equipment, which is characterized in that including processor and machine readable storage medium, the machine readable storage Media storage has the machine-executable instruction that can be executed by the processor, and the processor is by the machine-executable instruction Promote: realizing any method and step of claim 1-5.
12. a kind of machine readable storage medium, which is characterized in that be stored with machine-executable instruction, by processor call and When execution, the machine-executable instruction promotes the processor: realizing any method and step of claim 1-5.
CN201910701844.1A 2019-07-31 2019-07-31 Character recognition method and device Active CN110414525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910701844.1A CN110414525B (en) 2019-07-31 2019-07-31 Character recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910701844.1A CN110414525B (en) 2019-07-31 2019-07-31 Character recognition method and device

Publications (2)

Publication Number Publication Date
CN110414525A true CN110414525A (en) 2019-11-05
CN110414525B CN110414525B (en) 2022-02-25

Family

ID=68364686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910701844.1A Active CN110414525B (en) 2019-07-31 2019-07-31 Character recognition method and device

Country Status (1)

Country Link
CN (1) CN110414525B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991449A (en) * 2019-11-28 2020-04-10 南京工程学院 Character wheel character-oriented full-character and half-character recognition method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090022426A1 (en) * 2007-07-20 2009-01-22 Noboru Yamazaki Method And Device For Generating Character Data, Method And Control Device For Displaying Character Data, And Navigation Apparatus
CN102663386A (en) * 2012-03-27 2012-09-12 江南大学 Online detection method of mechanical-bearing annular-distributed pressed character
CN104239888A (en) * 2014-09-10 2014-12-24 河海大学 Method for positioning steel seal characters annularly distributed on water meter plate
CN105046257A (en) * 2015-07-31 2015-11-11 武汉理工大学 Character recognition method and system for special marking form of main gear of rear axle
CN105067638A (en) * 2015-07-22 2015-11-18 广东工业大学 Tire fetal-membrane surface character defect detection method based on machine vision
US20160224863A1 (en) * 2015-01-29 2016-08-04 Dain Co., Ltd. Tire recognition method and apparatus
CN109657666A (en) * 2018-11-23 2019-04-19 汉王科技股份有限公司 A kind of circular stamp recognition methods and device
CN109993739A (en) * 2019-03-29 2019-07-09 深圳市创业印章实业有限公司 A kind of seal distinguishing method between true and false and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090022426A1 (en) * 2007-07-20 2009-01-22 Noboru Yamazaki Method And Device For Generating Character Data, Method And Control Device For Displaying Character Data, And Navigation Apparatus
CN102663386A (en) * 2012-03-27 2012-09-12 江南大学 Online detection method of mechanical-bearing annular-distributed pressed character
CN104239888A (en) * 2014-09-10 2014-12-24 河海大学 Method for positioning steel seal characters annularly distributed on water meter plate
US20160224863A1 (en) * 2015-01-29 2016-08-04 Dain Co., Ltd. Tire recognition method and apparatus
CN105067638A (en) * 2015-07-22 2015-11-18 广东工业大学 Tire fetal-membrane surface character defect detection method based on machine vision
CN105046257A (en) * 2015-07-31 2015-11-11 武汉理工大学 Character recognition method and system for special marking form of main gear of rear axle
CN109657666A (en) * 2018-11-23 2019-04-19 汉王科技股份有限公司 A kind of circular stamp recognition methods and device
CN109993739A (en) * 2019-03-29 2019-07-09 深圳市创业印章实业有限公司 A kind of seal distinguishing method between true and false and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
曾锐: ""印章特征提取算法研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
黄剑航: ""基于HALCON的圆环区域字符识别实现"", 《图形图像》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110991449A (en) * 2019-11-28 2020-04-10 南京工程学院 Character wheel character-oriented full-character and half-character recognition method

Also Published As

Publication number Publication date
CN110414525B (en) 2022-02-25

Similar Documents

Publication Publication Date Title
CN110689037B (en) Method and system for automatic object annotation using deep networks
CN112348815B (en) Image processing method, image processing apparatus, and non-transitory storage medium
CN111178337B (en) Human face key point data enhancement method, device and system and model training method
TW202011733A (en) Method and device for performing target sampling on pictures
JP4755202B2 (en) Face feature detection method
US20100208988A1 (en) Method and system for image feature extraction
CN110333240B (en) Method and device for detecting appearance of capacitor, storage medium and processor
CN108986152B (en) Foreign matter detection method and device based on difference image
CN111259878A (en) Method and equipment for detecting text
EP3028256A1 (en) Geodesic saliency using background priors
Huang et al. Automatic detection and localization of natural scene text in video
CN108537237A (en) Characteristic area extracting method, device, equipment and the storage medium of bill
CN110647882A (en) Image correction method, device, equipment and storage medium
US20140153817A1 (en) Patch Size Adaptation for Image Enhancement
CN109002823B (en) Region-of-interest determining method, device, equipment and readable storage medium
CN111798480A (en) Character detection method and device based on single character and character connection relation prediction
KR20200036098A (en) Apparatus, method and system for detecting character
CN110414525A (en) A kind of character identifying method and device
CN116051439A (en) Method, equipment and storage medium for removing rainbow-like glare of under-screen RGB image by utilizing infrared image
CN113570540A (en) Image tampering blind evidence obtaining method based on detection-segmentation architecture
CN109299718A (en) A kind of character identifying method and device
US20210295478A1 (en) Method and apparatus for recognizing landmark in panoramic image and non-transitory computer-readable medium
JP2004151815A (en) Method, device and program for extracting specific area, and recording medium recording this program
CN113378821B (en) Official seal character recognition method, system, equipment and storage medium based on deep learning
TWI480809B (en) Image feature extraction method and device

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