CN110188747A - A kind of sloped correcting method of text image, device and image processing equipment - Google Patents

A kind of sloped correcting method of text image, device and image processing equipment Download PDF

Info

Publication number
CN110188747A
CN110188747A CN201910350575.9A CN201910350575A CN110188747A CN 110188747 A CN110188747 A CN 110188747A CN 201910350575 A CN201910350575 A CN 201910350575A CN 110188747 A CN110188747 A CN 110188747A
Authority
CN
China
Prior art keywords
text image
image
corrected
tilt angle
internal expression
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.)
Pending
Application number
CN201910350575.9A
Other languages
Chinese (zh)
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.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201910350575.9A priority Critical patent/CN110188747A/en
Publication of CN110188747A publication Critical patent/CN110188747A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/243Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)

Abstract

This application discloses a kind of sloped correcting method of text image, device and image processing equipment, the sloped correcting method of text image includes: to carry out feature detection to text image to be corrected, to obtain the first inclination information of text image to be corrected;The first correction is carried out to text image to be corrected according to the first inclination information, to obtain internal expression text image;Intermediate text image is detected, to obtain the direction of internal expression text image, as the second inclination information;The second correction is carried out to intermediate text image according to the second inclination information, to obtain the target text image after slant correction.By the above-mentioned means, can accurately be corrected to inclined text image, computation complexity is low, adaptable.

Description

A kind of sloped correcting method of text image, device and image processing equipment
Technical field
This application involves technical field of image processing, sloped correcting method, device more particularly to a kind of text image And image processing equipment.
Background technique
With the development of development of Mobile Internet technology, such as a large amount of hand-held mobile terminals of smart phone, tablet computer come into me Life, become we live in indispensable a part.These handheld terminals are owned by camera function, this is our energy Enough document information of acquisition at any time provide huge convenience.But the image document quality that we acquire is because by shooting ring The influence of the factors such as border, shooting angle and photographer, always will appear text in the picture run-off the straight the problem of, this is subsequent Fixation and recognition processing bring very big challenge.
Summary of the invention
To solve the above problems, this application provides at a kind of sloped correcting method of text image, device and image Equipment is managed, accurately inclined text image can be corrected, computation complexity is low, adaptable.
The technical solution that the application uses is: providing a kind of sloped correcting method of text image, this includes: to treat It corrects text image and carries out feature detection, to obtain the first inclination information of text image to be corrected;According to the first inclination information First correction is carried out to text image to be corrected, to obtain internal expression text image;Intermediate text image is detected, to obtain The direction of internal expression text image, as the second inclination information;The second school is carried out to intermediate text image according to the second inclination information Just, to obtain the target text image after slant correction.
Wherein, feature detection is carried out to text image to be corrected, to obtain the first inclination information of text image to be corrected The step of, comprising: obtain text image to be corrected estimates tilt angle set;Inclined according to predetermined inclination angular range to estimating Rake angle set is grouped, to obtain multiple tilt angle groups;According in each tilt angle group multiple tilt angles from The degree of dissipating, determines the smallest target tilt angle group of dispersion degree;By being averaged for tilt angles multiple in target tilt angle group Tilt angle is as the first inclination information.
Wherein, the step of estimating tilt angle set of text image to be corrected is obtained, comprising: use Hough transformation algorithm Calculate text image to be corrected estimates tilt angle.
Wherein, it is grouped according to predetermined inclination angular range to tilt angle set is estimated, to obtain multiple inclinations angle The step of degree group, comprising: according to it is preset [0 °, 30 °), [30 °, 60 °), [60 °, 90 °), [90 °, 120 °), [120 °, 150 °), [150 °, 180 °) six groups of range of tilt angles are grouped to tilt angle set is estimated;Delete tilt angle quantity Less than the grouping of setting quantity, to obtain multiple tilt angle groups.
Wherein, according to the dispersion degree of multiple tilt angles in each tilt angle group, the smallest mesh of dispersion degree is determined The step of marking tilt angle group, comprising: calculate the variance of multiple tilt angles in each tilt angle group;Determine that variance is the smallest Target tilt angle group.
Wherein, the first correction is carried out to text image to be corrected according to the first inclination information, to obtain internal expression text image The step of, comprising: using the average tilt angle of multiple tilt angles in target tilt angle group, to text image to be corrected into Row angle rotation, to obtain internal expression text image.
Wherein, intermediate text image is detected, to obtain the direction of internal expression text image, as the second inclination information The step of, comprising: intermediate text image is detected using the convolutional neural networks model of built in advance, to obtain internal expression text figure The direction of picture, as the second inclination information.
Wherein, it before the step of being detected using the convolutional neural networks model of built in advance to intermediate text image, also wraps It includes: building convolutional neural networks;Received text image is rotated according to the angle of setting, obtains postrotational training text Image and corresponding towards label;Using training text image and corresponding convolutional neural networks are instructed towards label Practice, to obtain convolutional neural networks model.
Wherein, the second correction is carried out to intermediate text image according to the second inclination information, to obtain the mesh after slant correction The step of marking text image, comprising: intermediate text image is carried out towards rotation, to obtain according to the direction of internal expression text image Target text image after slant correction.
Wherein, this method further include: obtain original text image;Gray level image is converted by original text image;To ash It spends image and carries out Denoising disposal;The processing of binaryzation inverse is carried out to the gray level image after Denoising disposal, to obtain binaryzation Image;Edge calculations are carried out to binary image, to obtain edge image, and using edge image as text image to be corrected.
Another technical solution that the application uses is: providing a kind of tilt calibration apparatus of text image, the device packet Include: first detection module inclines for carrying out feature detection to text image to be corrected with obtain text image to be corrected first Oblique information;First correction module, for carrying out the first correction to text image to be corrected according to the first inclination information, in obtaining Between text image;Second detection module, for being detected to intermediate text image, to obtain the direction of internal expression text image, As the second inclination information;Second correction module, for carrying out the second correction to intermediate text image according to the second inclination information, To obtain the target text image after slant correction.
Another technical solution that the application uses is: providing a kind of image processing equipment, which includes Processor and memory, memory is for storing program data, and processor is for executing program data to realize as above-mentioned Method.
Another technical solution that the application uses is: providing a kind of computer storage medium, the computer storage medium For storing program data, program data is when being executed by processor, to realize such as above-mentioned method.
The sloped correcting method of text image provided by the present application includes: to carry out feature detection to text image to be corrected, To obtain the first inclination information of text image to be corrected;The first school is carried out to text image to be corrected according to the first inclination information Just, to obtain internal expression text image;Intermediate text image is detected, to obtain the direction of internal expression text image, as Two inclination informations;The second correction is carried out to intermediate text image according to the second inclination information, to obtain the target after slant correction Text image.By the above-mentioned means, treating correction image by feature detection carries out preliminary corrections, then use convolutional neural networks Model is corrected again, can be accurately corrected to inclined text image, computation complexity is low, adaptable.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.Wherein:
Fig. 1 is the flow diagram of the sloped correcting method of text image provided by the embodiments of the present application;
Fig. 2 is the first schematic diagram of text image provided by the embodiments of the present application;
Fig. 3 is to carry out pretreated flow diagram to text image in the embodiment of the present application;
Fig. 4 is the flow diagram that the first inclination information is obtained in the embodiment of the present application;
Fig. 5 is the second schematic diagram of text image provided by the embodiments of the present application;
Fig. 6 is the flow diagram provided by the embodiments of the present application for establishing convolutional neural networks model;
Fig. 7 is the third schematic diagram of text image provided by the embodiments of the present application;
Fig. 8 is the structural schematic diagram of the tilt calibration apparatus of text image provided by the embodiments of the present application;
Fig. 9 is the structural schematic diagram of image processing equipment provided by the embodiments of the present application;
Figure 10 is the structural schematic diagram of computer storage medium 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 understood that specific embodiment described herein is only used for explaining the application, rather than to the limit of the application It is fixed.It also should be noted that illustrating only part relevant to the application for ease of description, in attached drawing and not all knot Structure.Based on the embodiment in the application, 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.
Term " first ", " second " in the application etc. be for distinguishing different objects, rather than it is specific suitable for describing Sequence.In addition, term " includes " and " having " and their any deformations, it is intended that cover and non-exclusive include.Such as comprising The process, method, system, product or equipment of a series of steps or units are not limited to listed step or unit, and It is optionally further comprising the step of not listing or unit, or optionally further comprising for these process, methods, product or equipment Intrinsic other step or units.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Refering to fig. 1, Fig. 1 is the flow diagram of the sloped correcting method of text image provided by the embodiments of the present application, should Method includes:
Step 11: feature detection being carried out to text image to be corrected, to obtain the first inclination letter of text image to be corrected Breath.
Text image, also referred to as file and picture, the i.e. document of picture format.It is to be turned paper document by certain mode The document of picture format is turned to, for user's electronic reading.The format of general text image include JPG (JPEG), BMP, PNG, GIF, FSP, TIFF, TGA, EPS etc..
Optionally, the first inclination information here be text image between character arranging direction and a certain specific direction Angle.
As shown in Fig. 2, Fig. 2 is the first schematic diagram of text image provided by the embodiments of the present application.Wherein, X-direction is water Square to, Y-direction is vertical direction, and the angle between X-direction and Y-direction is 90 °, Z-direction be text orientation.Its In, the angle between Z-direction and X-direction is α, and the angle between Z-direction and Y-direction is β.
It is to be appreciated that getting above-mentioned angle α or angle β, so that it may be carried out based on the angle to text image Rotation, so that it is parallel with horizontal direction or vertical direction to make the orientation of text, to achieve the purpose that slant correction.
It optionally, can be first to text image to be corrected before the first inclination information for obtaining text image to be corrected It is pre-processed, as shown in figure 3, Fig. 3 is to carry out pretreated flow diagram, the party to text image in the embodiment of the present application Method includes:
Step 31: obtaining original text image.
Wherein, the acquisition of text image can using take pictures, screenshotss etc..
Step 32: converting gray level image for original text image.
Gray scale is the most direct visual signature for describing gray level image content.It refers to the color depth at black white image midpoint, Range is generally from 0 to 255, and white is 255, black 0, therefore black white image is also referred to as gray level image.Gray level image matrix element Value is usually [0,255], therefore its data type is generally 8 signless integers, and here it is usually said 256 grades of people Gray scale.When color image is converted to gray level image, need to calculate each effective brightness value of pixel, calculation formula in image Are as follows:
Y=0.3R+0.59G+0.11B.
Step 33: Denoising disposal is carried out to gray level image.
It is alternatively possible to carry out Gaussian smoothing to gray level image using Gaussian filter algorithm.Gaussian filtering is exactly pair The process that entire image is weighted and averaged, the value of each pixel are all passed through by other pixel values in itself and neighborhood It is obtained after crossing weighted average.The concrete operations of gaussian filtering are: with every in a template (or convolution, mask) scan image One pixel goes the value of alternate template central pixel point with the weighted average gray value of pixel in the determining neighborhood of template.
Step 34: the processing of binaryzation inverse being carried out to the gray level image after Denoising disposal, to obtain binary image.
Image binaryzation (Image Binarization) be exactly set the gray value of the pixel on image to 0 or 255, that is, whole image is showed to the process of apparent black and white effect.
Inverse is that the color that can become white is superimposed with primary colors, i.e., subtracts primary colors with white (RGB:255,255,255) Color.Such as the inverse of red (RGB:255,0,0) is cyan (0,255,255).And to binaryzation in above-mentioned steps 34 Treated image, is that gray value 0 is become gray value 255, gray value 255 becomes gray value 0.
Step 35: edge calculations being carried out to binary image, to obtain edge image, and using edge image as to be corrected Text image.
It is alternatively possible to which the target of Canny edge algorithms is to find an optimal edge using Canny edge algorithms Detection algorithm, optimal edge detection are meant that:
(1) optimal detection: algorithm can identify the actual edge in image as much as possible, missing inspection true edge it is general The probability of rate and erroneous detection non-edge is all as small as possible;
(2) oplimal Location criterion: the position of the positional distance actual edge point of the marginal point detected is nearest, or by It is minimum in the degree for the true edge that influence of noise causes the edge detected to deviate object;
(3) test point and marginal point correspond: the marginal point and actual edge point of operator detection should be corresponded.
Canny edge algorithms may include following steps:
(1) intensity gradient (intensity gradients) of image is looked for;
(2) using non-maximum suppression (non-maximum suppression) technology come eliminate side erroneous detection (originally be not but Detected is);
(3) possible (potential) boundary is determined using the method for dual threshold;
(4) boundary is tracked using hysteresis techniques.
It is pre-processed by above-mentioned mode to text image to be corrected, then starts to obtain the first inclination information.
As shown in figure 4, Fig. 4 is the flow diagram for obtaining the first inclination information in the embodiment of the present application, step 11 can be with It specifically includes:
Step 111: obtain text image to be corrected estimates tilt angle set.
Optionally, can calculate text image to be corrected in the present embodiment using Hough transformation algorithm estimates inclination angle Degree.
Hough transformation is a kind of feature detection (feature extraction), is widely used in image analysis, computer Vision and digital image processing.Hough transformation be for distinguishing the feature found out in object, such as: lines.His algorithm stream Journey is approximately as the type of a given object, the shape to be distinguished, algorithm can execute ballot in parameter space to determine object The shape of body, and this is the local maximum by adding up in space to determine.
It is possible to further obtain the tilt angle of each lines in text image by Hough transformation.It is understood that , in text more lines be in the horizontal direction or vertical direction, by obtain the tilt angle of each line again into Row subsequent processing, the then orientation of available text.
Step 112: being grouped according to predetermined inclination angular range to tilt angle set is estimated, to obtain multiple inclinations Angle group.
It is alternatively possible to by angular divisions be [0 °, 30 °), [30 °, 60 °), [60 °, 90 °), [90 °, 120 °), [120 °, 150 °), [150 °, 180 °) six groups of range of tilt angles, to be grouped to estimating tilt angle set.Angle is grouped it Afterwards, six groups of data are obtained, are S1, S2, S3, S4, S5, S6 respectively.Further, it is possible to which deleting tilt angle quantity is less than setting number The grouping of amount, to obtain multiple tilt angle groups, for example, deleting grouping of the tilt angle quantity less than 10.
Step 113: according to the dispersion degree of multiple tilt angles in each tilt angle group, determining that dispersion degree is the smallest Target tilt angle group.
Dispersion degree (Measures of Dispersion) refers to by between each value of randomly observational variable Difference degree, for measuring the index of risk size.Generally can use asks the mode of variance or standard deviation discrete to obtain its Program.
Optionally, the variance of multiple tilt angles in each tilt angle group is calculated;Determine the smallest target tilt of variance Angle group.Wherein, the dispersion degree of multiple inclination angle values in the smallest tilt angle group of variance is minimum.
Step 114: using the average tilt angle of tilt angles multiple in target tilt angle group as the first inclination information.
Step 12: the first correction being carried out to text image to be corrected according to the first inclination information, to obtain internal expression text figure Picture.
Specifically, the average tilt angle being calculated using above-mentioned steps 114 carries out angle to text image to be corrected Rotation, to obtain internal expression text image.
It is to be appreciated that general here rotated using counter clockwise direction.
It is the second schematic diagram of text image provided by the embodiments of the present application in conjunction with Fig. 2 and Fig. 5, Fig. 5, Fig. 5 is in Fig. 2 On the basis of carried out first correction after, the schematic diagram of text in text image, it can be seen that because counterclockwise rotation, text Orientation and horizontal direction parallel, but, text therein is reverse.
Slant correction is carried out on the basis of Fig. 5 by the second correction again below.
Optionally, in another embodiment, the straight line in bianry image can also be extracted by Hough transformation;According to straight line Length and tilt angle, straight line is filtered, for filtered straight line, determines the median of tilt angle for band correction The tilt angle of text image;The first correction is carried out to text image to be corrected according to tilt angle.
Step 13: intermediate text image being detected, to obtain the direction of internal expression text image, as the second inclination letter Breath.
Optionally, intermediate text image is detected using the convolutional neural networks model of built in advance, to obtain intermediate text The direction of this image, as the second inclination information.
As shown in fig. 6, Fig. 6 is the flow diagram provided by the embodiments of the present application for establishing convolutional neural networks model, it should Method includes:
Step 61: building convolutional neural networks.
Convolutional neural networks (Convolutional Neural Networks, CNN) are a kind of comprising convolutional calculation and tool There is the feedforward neural network (Feedforward Neural Networks) of depth structure, is deep learning (deep Learning one of representative algorithm).
Optionally, for the convolutional neural networks that the present embodiment uses for VGG16 network, VGG16 network is quilt in image domains There is one of deep neural network of extensive utilization the model parameter of open source can directly use.
Wherein, the VGG16 network used in the present embodiment include 16 layers, including input layer, convolutional layer, pond layer, Full articulamentum and classification layer.
Step 62: received text image being rotated according to the angle of setting, obtains postrotational training text image And it is corresponding towards label.
Optionally, collect a batch towards normal text image, to any normally text image according to 0 degree clockwise, 45 degree, 90 degree, 135 degree, 180 degree, 225 degree, 270 degree, 315 degree of 8 texts towards being rotated, obtain postrotational text diagram As and its it is corresponding towards label.Postrotational text image is pre-processed according to the preprocess method of VGG16, obtains pre- place Training image after reason.Output layer behind the convolutional neural networks model based on VGG16 is modified, concrete operation step is, The feature vector chart input of last classification layer is evened up as vector, and once linear transformation and twice linear R eLU are carried out to it (Rectified Linear Unit, line rectification function) transformation, finally by the behaviour of softmax (normalization exponential function) Make, exports 8 towards the other probability of tag class.
Step 63: using training text image and it is corresponding convolutional neural networks are trained towards label, with To convolutional neural networks model.
The training image obtained using above-mentioned steps 62 is with obtained correspondence towards label to the convolutional Neural net modified Network model is trained, and obtains trained model.
Step 14: the second correction being carried out to intermediate text image according to the second inclination information, after obtaining slant correction Target text image.
Intermediate text image is carried out towards rotation, to obtain the mesh after slant correction according to the direction of internal expression text image Mark text image.
Specifically, by internal expression text image scaling to be corrected to 224*224 size, by pretreatment and convolutional Neural net Network model inspection obtains Chinese this direction classification of the image.Become a full member again using obtained text towards rotation counterclockwise is carried out To the text image of full correction.
It is the third schematic diagram of text image provided by the embodiments of the present application in conjunction with Fig. 5 and Fig. 7, Fig. 7, Fig. 7 is in Fig. 5 On the basis of carried out second correction after, the schematic diagram of text in text image, it can be seen that by text direction into It has gone after amendment, the inclination of text is corrected.
It is different from the prior art, the sloped correcting method of text image provided in this embodiment includes: to text to be corrected Image carries out feature detection, to obtain the first inclination information of text image to be corrected;According to the first inclination information to be corrected Text image carries out the first correction, to obtain internal expression text image;Intermediate text image is detected, to obtain internal expression text The direction of image, as the second inclination information;The second correction is carried out to intermediate text image according to the second inclination information, to obtain Target text image after slant correction.By the above-mentioned means, treating correction image by feature detection carries out preliminary corrections, then It is corrected, accurately inclined text image can be corrected again using convolutional neural networks model, calculated complicated Spend it is low, it is adaptable.
In addition, influence of the non-legible part to word segment can be reduced by the pretreatment carried out to text image.
It is the structural schematic diagram of the tilt calibration apparatus of text image provided by the embodiments of the present application refering to Fig. 8, Fig. 8, it should Tilt calibration apparatus 80 includes first detection module 81, the first correction module 82, the second detection module 83 and the second straightening die Block 84.
Wherein, first detection module 81 is used to carry out feature detection to text image to be corrected, to obtain text to be corrected First inclination information of image;First correction module 82 is used to carry out first to text image to be corrected according to the first inclination information Correction, to obtain internal expression text image;Second detection module 83 is for detecting intermediate text image, to obtain intermediate text The direction of this image, as the second inclination information;Second correction module 84 is used for according to the second inclination information to intermediate text diagram As carrying out the second correction, to obtain the target text image after slant correction.
It is the structural schematic diagram of image processing equipment provided by the embodiments of the present application refering to Fig. 9, Fig. 9, which sets Standby 90 include processor 91 and memory 92, and memory 92 is for storing program data, and processor 91 is for executing program number Following method and step is realized accordingly:
Feature detection is carried out to text image to be corrected, to obtain the first inclination information of text image to be corrected;According to First inclination information carries out the first correction to text image to be corrected, to obtain internal expression text image;To intermediate text image into Row detection, to obtain the direction of internal expression text image, as the second inclination information;According to the second inclination information to intermediate text diagram As carrying out the second correction, to obtain the target text image after slant correction.
Optionally, processor 91 is also used to execute following method and step: obtain text image to be corrected estimates inclination Angle set;It is grouped according to predetermined inclination angular range to tilt angle set is estimated, to obtain multiple tilt angle groups; According to the dispersion degree of multiple tilt angles in each tilt angle group, the smallest target tilt angle group of dispersion degree is determined; Using the average tilt angle of tilt angles multiple in target tilt angle group as the first inclination information.
Optionally, processor 91 is also used to execute following method and step: calculating text to be corrected using Hough transformation algorithm This image estimates tilt angle.
Optionally, processor 91 is also used to execute following method and step: according to it is preset [0 °, 30 °), [30 °, 60 °), [60 °, 90 °), [90 °, 120 °), [120 °, 150 °), [150 °, 180 °) six groups of range of tilt angles are to estimating tilt angle collection Conjunction is grouped;The grouping that tilt angle quantity is less than setting quantity is deleted, to obtain multiple tilt angle groups.
Optionally, processor 91 is also used to execute following method and step: calculating multiple inclinations in each tilt angle group The variance of angle;Determine the smallest target tilt angle group of variance.
Optionally, processor 91 is also used to execute following method and step: using multiple inclinations in target tilt angle group The average tilt angle of angle carries out angle rotation to text image to be corrected, to obtain internal expression text image.
Optionally, processor 91 is also used to execute following method and step: utilizing the convolutional neural networks model pair of built in advance Internal expression text image is detected, to obtain the direction of internal expression text image, as the second inclination information.
Optionally, processor 91 is also used to execute following method and step: building convolutional neural networks;By received text figure As being rotated according to the angle of setting, postrotational training text image and corresponding towards label is obtained;Utilize training Text image and it is corresponding convolutional neural networks are trained towards label, to obtain convolutional neural networks model.
Optionally, processor 91 is also used to execute following method and step: according to the direction of internal expression text image to centre Text image is carried out towards rotation, to obtain the target text image after slant correction.
Optionally, processor 91 is also used to execute following method and step: obtaining original text image;By original text figure As being converted into gray level image;Denoising disposal is carried out to gray level image;Binaryzation is carried out to the gray level image after Denoising disposal Inverse processing, to obtain binary image;Edge calculations are carried out to binary image, to obtain edge image, and by edge graph As being used as text image to be corrected.
0, Figure 10 is the structural schematic diagram of computer storage medium provided by the embodiments of the present application, the computer refering to fig. 1 Program data 101 is stored in storage medium 100, the program data is when being executed by processor, to realize following method Step:
Feature detection is carried out to text image to be corrected, to obtain the first inclination information of text image to be corrected;According to First inclination information carries out the first correction to text image to be corrected, to obtain internal expression text image;To intermediate text image into Row detection, to obtain the direction of internal expression text image, as the second inclination information;According to the second inclination information to intermediate text diagram As carrying out the second correction, to obtain the target text image after slant correction.
In several embodiments provided herein, it should be understood that disclosed method and equipment, Ke Yitong Other modes are crossed to realize.For example, equipment embodiment described above is only schematical, for example, the module or The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of unit therein can be selected to realize present embodiment scheme according to the actual needs Purpose.
In addition, each functional unit in each embodiment of the application can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.It is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit in above-mentioned other embodiments is realized in the form of SFU software functional unit and as independence Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the application Technical solution substantially all or part of the part that contributes to existing technology or the technical solution can be in other words It is expressed in the form of software products, which is stored in a storage medium, including some instructions are used So that a computer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) all or part of the steps of each embodiment the method for the application is executed.And storage medium packet above-mentioned It includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), the various media that can store program code such as magnetic or disk.
The foregoing is merely presently filed embodiments, are not intended to limit the scope of the patents of the application, all according to this Equivalent structure or equivalent flow shift made by application specification and accompanying drawing content, it is relevant to be applied directly or indirectly in other Technical field similarly includes in the scope of patent protection of the application.

Claims (13)

1. a kind of sloped correcting method of text image characterized by comprising
Feature detection is carried out to text image to be corrected, to obtain the first inclination information of the text image to be corrected;
The first correction is carried out to the text image to be corrected according to first inclination information, to obtain internal expression text image;
The internal expression text image is detected, to obtain the direction of the internal expression text image, as the second inclination information;
The second correction is carried out to the internal expression text image according to second inclination information, to obtain the target after slant correction Text image.
2. the method according to claim 1, wherein
It is described that feature detection is carried out to text image to be corrected, to obtain the first inclination information of the text image to be corrected Step, comprising:
Obtain text image to be corrected estimates tilt angle set;
The tilt angle set of estimating is grouped according to predetermined inclination angular range, to obtain multiple tilt angle groups;
According to the dispersion degree of multiple tilt angles in each tilt angle group, the smallest target tilt angle of dispersion degree is determined Group;
Using the average tilt angle of multiple tilt angles in the target tilt angle group as the first inclination information.
3. according to the method described in claim 2, it is characterized in that,
It is described to obtain the step of estimating tilt angle set of text image to be corrected, comprising:
Tilt angle is estimated using what Hough transformation algorithm calculated the text image to be corrected.
4. according to the method described in claim 2, it is characterized in that,
It is described that the tilt angle set of estimating is grouped according to predetermined inclination angular range, to obtain multiple tilt angles The step of group, comprising:
According to it is preset [0 °, 30 °), [30 °, 60 °), [60 °, 90 °), [90 °, 120 °), [120 °, 150 °), [150 °, 180 °) Six groups of range of tilt angles are grouped the tilt angle set of estimating;
The grouping that tilt angle quantity is less than setting quantity is deleted, to obtain multiple tilt angle groups.
5. according to the method described in claim 2, it is characterized in that,
The dispersion degree according to multiple tilt angles in each tilt angle group, determines the smallest target tilt of dispersion degree The step of angle group, comprising:
Calculate the variance of multiple tilt angles in each tilt angle group;
Determine the smallest target tilt angle group of variance.
6. according to the method described in claim 2, it is characterized in that,
The first correction is carried out to the text image to be corrected according to first inclination information, to obtain internal expression text image Step, comprising:
Using the average tilt angle of multiple tilt angles in the target tilt angle group, to the text image to be corrected into Row angle rotation, to obtain internal expression text image.
7. the method according to claim 1, wherein
It is described that the internal expression text image is detected, to obtain the direction of the internal expression text image, as the second inclination The step of information, comprising:
The internal expression text image is detected using the convolutional neural networks model of built in advance, to obtain the internal expression text figure The direction of picture, as the second inclination information.
8. the method according to the description of claim 7 is characterized in that
Before the step of convolutional neural networks model using built in advance detects the internal expression text image, also wrap It includes:
Construct convolutional neural networks;
Received text image is rotated according to the angle of setting, obtains postrotational training text image and corresponding court To label;
Using the training text image and it is corresponding the convolutional neural networks are trained towards label, to obtain State convolutional neural networks model.
9. the method according to the description of claim 7 is characterized in that
It is described that second correction is carried out to the internal expression text image according to second inclination information, after obtaining slant correction The step of target text image, comprising:
The internal expression text image is carried out towards rotation, after obtaining slant correction according to the direction of the internal expression text image Target text image.
10. the method according to claim 1, wherein
The method also includes:
Obtain original text image;
Gray level image is converted by the original text image;
Denoising disposal is carried out to the gray level image;
The processing of binaryzation inverse is carried out to the gray level image after Denoising disposal, to obtain binary image;
Edge calculations are carried out to the binary image, to obtain edge image, and using the edge image as text to be corrected This image.
11. a kind of tilt calibration apparatus of text image characterized by comprising
First detection module, for carrying out feature detection to text image to be corrected, to obtain the text image to be corrected First inclination information;
First correction module, for carrying out the first correction to the text image to be corrected according to first inclination information, with Obtain internal expression text image;
Second detection module, for being detected to the internal expression text image, to obtain the direction of the internal expression text image, As the second inclination information;
Second correction module, for carrying out the second correction to the internal expression text image according to second inclination information, with Target text image after to slant correction.
12. a kind of image processing equipment, which is characterized in that including processor and memory, the memory is for storing journey Ordinal number evidence, the processor is for executing described program data to realize such as the described in any item methods of claim 1-10.
13. a kind of computer storage medium, which is characterized in that the computer storage medium is described for storing program data Program data is when being executed by processor, to realize such as the described in any item methods of claim 1-10.
CN201910350575.9A 2019-04-28 2019-04-28 A kind of sloped correcting method of text image, device and image processing equipment Pending CN110188747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910350575.9A CN110188747A (en) 2019-04-28 2019-04-28 A kind of sloped correcting method of text image, device and image processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910350575.9A CN110188747A (en) 2019-04-28 2019-04-28 A kind of sloped correcting method of text image, device and image processing equipment

Publications (1)

Publication Number Publication Date
CN110188747A true CN110188747A (en) 2019-08-30

Family

ID=67715262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910350575.9A Pending CN110188747A (en) 2019-04-28 2019-04-28 A kind of sloped correcting method of text image, device and image processing equipment

Country Status (1)

Country Link
CN (1) CN110188747A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569847A (en) * 2019-09-20 2019-12-13 上海交通大学苏州人工智能研究院 Character inclination angle determining method, character inclination correcting method and computer
CN110647882A (en) * 2019-09-20 2020-01-03 上海眼控科技股份有限公司 Image correction method, device, equipment and storage medium
CN111079641A (en) * 2019-12-13 2020-04-28 科大讯飞股份有限公司 Answering content identification method, related device and readable storage medium
CN111260569A (en) * 2020-01-10 2020-06-09 百度在线网络技术(北京)有限公司 Method and device for correcting image inclination, electronic equipment and storage medium
CN111340040A (en) * 2020-02-26 2020-06-26 五八有限公司 Paper character recognition method and device, electronic equipment and storage medium
CN111507908A (en) * 2020-03-11 2020-08-07 平安科技(深圳)有限公司 Image correction processing method, device, storage medium and computer equipment
CN111768344A (en) * 2020-05-12 2020-10-13 北京奇艺世纪科技有限公司 Method, device and equipment for correcting front image of identity card and storage medium
CN112287927A (en) * 2020-10-14 2021-01-29 中国人民解放军战略支援部队信息工程大学 Method and device for detecting inclination angle of text image
CN112790952A (en) * 2019-11-14 2021-05-14 纬创资通股份有限公司 Control method and electric walking aid
CN113516103A (en) * 2021-08-07 2021-10-19 山东微明信息技术有限公司 Table image inclination angle determining method based on support vector machine
CN117690139A (en) * 2023-12-12 2024-03-12 北京蓝湾博阅科技有限公司 Image preprocessing method and system based on paper book reading electronization

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662581A (en) * 2009-09-09 2010-03-03 谭洪舟 Multifunctional certificate information collection system
CN102509093A (en) * 2011-10-18 2012-06-20 谭洪舟 Close-range digital certificate information acquisition system
CN105761219A (en) * 2016-02-03 2016-07-13 北京云江科技有限公司 Inclination correction method and system of text image
KR101706554B1 (en) * 2015-09-07 2017-02-16 (주)넥스트칩 Apparatus and method for processing image for clear edge reproduction
CN107239776A (en) * 2017-05-08 2017-10-10 北京京东金融科技控股有限公司 The method and apparatus of tilted image correction
CN109583445A (en) * 2018-11-26 2019-04-05 平安科技(深圳)有限公司 Character image correction processing method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662581A (en) * 2009-09-09 2010-03-03 谭洪舟 Multifunctional certificate information collection system
CN102509093A (en) * 2011-10-18 2012-06-20 谭洪舟 Close-range digital certificate information acquisition system
KR101706554B1 (en) * 2015-09-07 2017-02-16 (주)넥스트칩 Apparatus and method for processing image for clear edge reproduction
CN105761219A (en) * 2016-02-03 2016-07-13 北京云江科技有限公司 Inclination correction method and system of text image
CN107239776A (en) * 2017-05-08 2017-10-10 北京京东金融科技控股有限公司 The method and apparatus of tilted image correction
CN109583445A (en) * 2018-11-26 2019-04-05 平安科技(深圳)有限公司 Character image correction processing method, device, equipment and storage medium

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647882A (en) * 2019-09-20 2020-01-03 上海眼控科技股份有限公司 Image correction method, device, equipment and storage medium
CN110569847A (en) * 2019-09-20 2019-12-13 上海交通大学苏州人工智能研究院 Character inclination angle determining method, character inclination correcting method and computer
CN110569847B (en) * 2019-09-20 2023-08-22 上海交通大学苏州人工智能研究院 Character inclination angle determining method, character inclination correcting method and computer
CN112790952A (en) * 2019-11-14 2021-05-14 纬创资通股份有限公司 Control method and electric walking aid
CN111079641A (en) * 2019-12-13 2020-04-28 科大讯飞股份有限公司 Answering content identification method, related device and readable storage medium
CN111079641B (en) * 2019-12-13 2024-04-16 科大讯飞股份有限公司 Answer content identification method, related device and readable storage medium
CN111260569A (en) * 2020-01-10 2020-06-09 百度在线网络技术(北京)有限公司 Method and device for correcting image inclination, electronic equipment and storage medium
CN111260569B (en) * 2020-01-10 2023-09-01 百度在线网络技术(北京)有限公司 Image tilt correction method, image tilt correction device, electronic equipment and storage medium
CN111340040A (en) * 2020-02-26 2020-06-26 五八有限公司 Paper character recognition method and device, electronic equipment and storage medium
CN111340040B (en) * 2020-02-26 2023-09-12 五八有限公司 Paper character recognition method and device, electronic equipment and storage medium
WO2021179485A1 (en) * 2020-03-11 2021-09-16 平安科技(深圳)有限公司 Image rectification processing method and apparatus, storage medium, and computer device
CN111507908B (en) * 2020-03-11 2023-10-20 平安科技(深圳)有限公司 Image correction processing method, device, storage medium and computer equipment
CN111507908A (en) * 2020-03-11 2020-08-07 平安科技(深圳)有限公司 Image correction processing method, device, storage medium and computer equipment
CN111768344B (en) * 2020-05-12 2023-06-30 北京奇艺世纪科技有限公司 Correction method, device, equipment and storage medium for front image of identity card
CN111768344A (en) * 2020-05-12 2020-10-13 北京奇艺世纪科技有限公司 Method, device and equipment for correcting front image of identity card and storage medium
CN112287927B (en) * 2020-10-14 2023-04-07 中国人民解放军战略支援部队信息工程大学 Method and device for detecting inclination angle of text image
CN112287927A (en) * 2020-10-14 2021-01-29 中国人民解放军战略支援部队信息工程大学 Method and device for detecting inclination angle of text image
CN113516103A (en) * 2021-08-07 2021-10-19 山东微明信息技术有限公司 Table image inclination angle determining method based on support vector machine
CN117690139A (en) * 2023-12-12 2024-03-12 北京蓝湾博阅科技有限公司 Image preprocessing method and system based on paper book reading electronization

Similar Documents

Publication Publication Date Title
CN110188747A (en) A kind of sloped correcting method of text image, device and image processing equipment
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN102360421B (en) Face identification method and system based on video streaming
CN103714327B (en) Method and system for correcting image direction
CN101650783B (en) Image identification method and imaging apparatus
CN111680690B (en) Character recognition method and device
CN110852311A (en) Three-dimensional human hand key point positioning method and device
CN108416343B (en) Face image recognition method and device
CN110059666B (en) Attention detection method and device
CN109360179B (en) Image fusion method and device and readable storage medium
CN113111880B (en) Certificate image correction method, device, electronic equipment and storage medium
CN112183517B (en) Card edge detection method, device and storage medium
CN110969164A (en) Low-illumination imaging license plate recognition method and device based on deep learning end-to-end
CN111222433A (en) Automatic face auditing method, system, equipment and readable storage medium
CN110210467B (en) Formula positioning method of text image, image processing device and storage medium
CN105608689A (en) Method and device for eliminating image feature mismatching for panoramic stitching
CN113221897B (en) Image correction method, image text recognition method, identity verification method and device
CN112613471A (en) Face living body detection method and device and computer readable storage medium
CN116050379A (en) Document comparison method and storage medium
CN115222621A (en) Image correction method, electronic device, storage medium, and computer program product
CN114359923A (en) Certificate character recognition method and device, computer and storage medium
CN113807237A (en) Training of in vivo detection model, in vivo detection method, computer device, and medium
CN117496019B (en) Image animation processing method and system for driving static image
WO2006008992A1 (en) Web site connecting method using portable information communication terminal with camera
CN110705352A (en) Fingerprint image detection method based on deep learning

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190830

Assignee: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000030

Denomination of invention: The invention relates to a text image tilt correction method, a device and an image processing device

License type: Common License

Record date: 20210125

EE01 Entry into force of recordation of patent licensing contract