CN110473189A - A kind of definition of text images judgment method and system - Google Patents

A kind of definition of text images judgment method and system Download PDF

Info

Publication number
CN110473189A
CN110473189A CN201910733120.5A CN201910733120A CN110473189A CN 110473189 A CN110473189 A CN 110473189A CN 201910733120 A CN201910733120 A CN 201910733120A CN 110473189 A CN110473189 A CN 110473189A
Authority
CN
China
Prior art keywords
image
edge
definition
threshold
gradient
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
CN201910733120.5A
Other languages
Chinese (zh)
Other versions
CN110473189B (en
Inventor
严京旗
张成栋
钱之越
郭利敏
戴文静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yuezhikang Technology Co ltd
Original Assignee
Nantong Ai Ai Smart 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 Nantong Ai Ai Smart Technology Co Ltd filed Critical Nantong Ai Ai Smart Technology Co Ltd
Priority to CN201910733120.5A priority Critical patent/CN110473189B/en
Publication of CN110473189A publication Critical patent/CN110473189A/en
Application granted granted Critical
Publication of CN110473189B publication Critical patent/CN110473189B/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
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of definition of text images judgment method and system, the program includes: to carry out image preprocessing to image to be discriminated, obtains pretreatment image;The bianry image clarity evaluation of estimate of the pretreatment image is calculated using binarization method;The gradient image clarity evaluation of estimate of the pretreatment image is calculated using gradient method;Image definition is judged according to the bianry image clarity evaluation of estimate and the gradient image clarity evaluation of estimate and calculates the confidence level of definition judgment.Invention combines three evaluation indexes (two ratios and gradient image clarity evaluation of estimate in bianry image clarity evaluation of estimate) to be judged, improves the accuracy of judgement.Present invention combination real image noise that may be present is handled, it is more stable to the definition judgment performance of text image and have versatility.

Description

A kind of definition of text images judgment method and system
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of definition of text images judgment method and are System.
Background technique
The clarity of image refers to the readability on each thin portion shadow line and its boundary on image, and edge high fdrequency component is more, Image is more clear, this is consistent with the observation characteristic of human eye.In the case where there is reference picture, the edge high fdrequency component of clear image More compared with blurred picture, this method is in the more of optical imaging field.In the case where non-reference picture, need to single image Carry out quality evaluation.With the development of computer and digital acquisition technique, digitized document image be will be used wider and wider, Character recognition technologies and Document image processing reach its maturity, and the information office automation trend based on file and picture is significant. Document process is an important component part of office automation, and in scanning input process, document image is due to various originals Because inevitably causing the decline of inclination and image definition.However most of character recognition algorithm is to document image Degrade it is very sensitive.Therefore especially in the scanning of extensive file and picture, treatment process, the automatic detection of clarity is more It is important, guarantee is provided to subsequent image processing.
By the propulsion of optical imagery System Development, there is the Measurement for Digital Image Definition research of reference more, and most bases In defocusing principle, the Measurement for Digital Image Definition research of no reference is relatively fewer.In addition, the mathematical model of evaluation index is usual It needs to be correspondingly improved according to specifically application, function of good performance may act on text image in scene image Effect is undesirable.Therefore, the judgement scheme for how providing a kind of definition of text images that versatile and stability is good becomes This field urgent problem to be solved.
Summary of the invention
The object of the present invention is to provide a kind of definition of text images judgment method and systems, to solve the above problems.
To achieve the above object, the present invention provides a kind of definition of text images judgment methods, which comprises
Image preprocessing is carried out to image to be discriminated, obtains pretreatment image;
The bianry image clarity evaluation of estimate of the pretreatment image is calculated using binarization method;
The gradient image clarity evaluation of estimate of the pretreatment image is calculated using gradient method;
Image definition is judged according to the bianry image clarity evaluation of estimate and the gradient image clarity evaluation of estimate And calculate the confidence level of definition judgment.
Optionally, described that image preprocessing is carried out to image to be discriminated, it specifically includes:
The edge gray value of the image to be discriminated is detected, edge gray value described in the image to be discriminated is rejected and is greater than The point of white bright spot gray threshold, obtains noise filtering image;
The noise filtering image is zoomed in or out and is sized, pretreatment image is obtained.
Optionally, the bianry image clarity evaluation of estimate that the pretreatment image is calculated using binarization method, tool Body includes:
Fuzzy Processing is carried out according to setting fuzziness to the pretreatment image;
Different first edge threshold values are chosen, according to edge pixel number setting value, are extracted using canny edge detection algorithm The edge of the image to be discriminated, obtains first edge image;
The rotation angle of image is calculated according to the lines in the edge image, and affine according to the rotation angle calculation Matrix;The horizontal line that affine transformation makes horizontal frame in the image containing table or contains is carried out according to the affine matrix Level, obtain rotation image;
Binaryzation Local treatment is carried out to the rotation image and obtains binary image;It is filtered out in the binary image again Lines and non-legible region, obtain filter and make an uproar bianry image;
The multiple and different second edge threshold values for being different from the first edge threshold value are chosen, according to edge pixel number Mesh setting value is extracted the edge of the image to be discriminated using canny edge detection algorithm, obtains second edge image;
The first edge image and the second edge image are negated, reference picture is obtained;
Filter out the non-legible region of the first edge image;The first edge image is corrected in conjunction with the reference picture Marginal information, obtain amendment image;
The marginal information for filtering bianry image of making an uproar is modified using the amendment image, obtains amendment binary map Picture;
Contour area is positioned to the amendment bianry image;To the contour area of positioning, non-legible region is deleted, is contained There is the binary image of character area:
The character area is traversed, is contained respectively using OTSU algorithm to described with binarization threshold th+5, th and th-5 The binary image of character area carries out binary conversion treatment, respectively obtains threshold binarization image rect1, rect, rect2, unites Count described threshold binarization image rect1, rect2 and the threshold binarization image rect pixel number not etc. and null element Number;
Calculate the pixel of the threshold binarization image rect and described threshold binarization image rect1, rect2 not etc. Several and total pixel number purpose ratio bw_delta2area, calculates the threshold binarization image rect null element number and total pixel The ratio bw_delta2bpc of number obtains bianry image clarity evaluation of estimate.
Optionally, the gradient image clarity evaluation of estimate that the pretreatment image is calculated using gradient method, specifically Include:
The horizontal gradient value and pixel of the pixel horizontal direction in the pretreatment image are calculated using Sobel operator The vertical gradient value of vertical direction;
Calculate horizontal gradient value square root and vertical gradient value subduplicate and absolute value SMD_val, obtain ladder Spend image definition evaluation value.
Optionally, described to be judged according to the bianry image clarity evaluation of estimate and the gradient image clarity evaluation of estimate Image definition and the confidence level for calculating definition judgment, specifically include:
According to gradient image clarity Evaluation threshold SMD_thresh and bianry image clarity Evaluation threshold bw_ Delta2area_thresh, bw_delta2bpc_thresh judge whether the condition for meeting image clearly: smd_val > SMD_thresh) | | (bw_delta2area < bw_delta2area_thresh) | | (bw_delta2bpc < bw_ Delta2bpc_thresh), definition judgment result is obtained;
When definition judgment result expression is, then judge that the image to be discriminated is clear, and it is clear to calculate judgement Clear confidence level.
When the definition judgment result indicates no, then the image to be discriminated is judged to be unintelligible, calculating judgement is not Clear confidence level.
The present invention also provides a kind of definition of text images to judge system, the system comprises:
Pretreatment unit obtains pretreatment image for carrying out image preprocessing to image to be discriminated;
Binarization unit, for calculating the bianry image clarity evaluation of the pretreatment image using binarization method Value;
Gradient computing unit, for calculating the gradient image clarity evaluation of the pretreatment image using gradient method Value;
Definition judgment unit, for being commented according to the bianry image clarity evaluation of estimate and the gradient image clarity Value judgement image definition and the confidence level for calculating definition judgment.
Optionally, the pretreatment unit specifically includes:
Noise filtering subelement rejects the image to be discriminated for detecting the edge gray value of the image to be discriminated Described in edge gray value be greater than the point of white bright spot gray threshold, obtain noise filtering image;
Subelement is scaled, is sized for zooming in or out the noise filtering image, obtains pretreatment image.
Optionally, the binarization unit specifically includes:
It is blurred subelement, for carrying out Fuzzy Processing according to setting fuzziness to the pretreatment image;
Second edge detection sub-unit, for choosing different first edge threshold values, according to edge pixel number setting value, benefit The edge that the image to be discriminated is extracted with canny edge detection algorithm, obtains first edge image;
Image rotation subelement, for the rotation angle according to the lines calculating image in the edge image, and according to The rotation angle calculation affine matrix;Affine transformation, which is carried out, according to the affine matrix makes the water in the image containing table Pingbian frame or the horizontal level contained obtain rotation image;
Two-value filters subelement of making an uproar, and obtains binary image for carrying out binaryzation Local treatment to the rotation image;Again The lines in the binary image and non-legible region are filtered out, obtains filtering bianry image of making an uproar;
Second edge detection sub-unit, for choosing multiple and different described second for being different from the first edge threshold value Edge threshold extracts the side of the image to be discriminated using canny edge detection algorithm according to edge pixel number setting value Edge obtains second edge image;
Subelement is negated, for negating to the first edge image and the second edge image, obtains reference picture;
Edge revise subelemen, for filtering out the non-legible region of the first edge image;In conjunction with the reference picture The marginal information for correcting the first edge image obtains amendment image;
Two-value revise subelemen, for being repaired using the amendment image to the marginal information for filtering bianry image of making an uproar Just, amendment bianry image is obtained;
Character area screens subelement, for positioning contour area to the amendment bianry image;To the profile region of positioning Non-legible region is deleted in domain, obtains the binary image containing character area:
Threshold binarization subelement is adopted respectively with binarization threshold th+5, th and th-5 for traversing the character area Binary conversion treatment is carried out to the binary image containing character area with OTSU algorithm, respectively obtains threshold binarization image Rect1, rect, rect2 count described threshold binarization image rect1, rect2 and the threshold binarization image rect not Deng pixel number and null element number;
Ratio calculation subelement, for calculating the threshold binarization image rect and the threshold binarization image The pixel number and total pixel number purpose ratio bw_delta2area of rect1, rect2 not etc., calculate the threshold binarization figure As rect null element number and total pixel number purpose ratio bw_delta2bpc, bianry image clarity evaluation of estimate is obtained.
Optionally, the gradient computing unit specifically includes:
Gradient value computation subunit, for calculating the pixel level side in the pretreatment image using Sobel operator To horizontal gradient value and pixel vertical direction vertical gradient value;
Cumulative subelement, for calculate horizontal gradient value square root and vertical gradient value subduplicate and absolute value SMD_val obtains gradient image clarity evaluation of estimate.
Optionally, the definition judgment unit specifically includes:
Condition judgment sub-unit, for clear according to gradient image clarity Evaluation threshold SMD_thresh and bianry image Evaluation threshold bw_delta2area_thresh, bw_delta2bpc_thresh are spent, judges whether the item for meeting image clearly Part: smd_val > SMD_thresh) | | (bw_delta2area < bw_delta2area_thresh) | | (bw_delta2bpc < bw_delta2bpc_thresh), obtain definition judgment result;
It is clear to determine subelement, for when definition judgment result expression is, then judging the image to be discriminated To be clear, and calculate and judge clear confidence level.
Unintelligible determining subelement, for when the definition judgment result indicates no, then judging the figure to be discriminated As be it is unintelligible, calculating judge unintelligible confidence level.
The specific embodiment provided according to the present invention, the invention discloses following technical effects: text provided by the invention Image definition judgment method and system have the advantage that
1, compared with the performance with traditional images sharpness evaluation function in text image, the present invention is special for text image Point is handled in conjunction with real image noise that may be present, more stable to the definition judgment performance of text image.
2, compared with using the algorithm of an evaluation function, the present invention combines three evaluation index (bianry image clarity Two ratios and gradient image clarity evaluation of estimate in evaluation of estimate) judged, improve the accuracy of judgement.
3, compared with for the clarity evaluation method of concrete application design, the present invention to the image containing text information, There is certain versatility to all kinds of images met in size range, it can be with by parameter and structural adjustment in conjunction with concrete application Improve specificity or enhancing universal performance.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is the flow chart of definition of text images judgment method provided in an embodiment of the present invention;
Fig. 2 is the block diagram that definition of text images provided in an embodiment of the present invention judges system.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The object of the present invention is to provide a kind of definition of text images judgment method and systems, a kind of versatile to provide And the definition judgment scheme that stability is good.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
As shown in Figure 1, definition of text images judgment method provided in this embodiment includes:
Step 101: image preprocessing being carried out to image to be discriminated, obtains pretreatment image;
Image to be discriminated in the present embodiment can for shot with digital camera image data, shot with mobile phone To image data, obtained with scanner image data, read pre-existing image data file in data and decompression One of image data obtained afterwards is a variety of.But the image has a denominator, i.e., all contains textual portions, the present invention It is by the difference of text and image background to realize the accurate judgement to image integrity degree.
In practical applications, which specifically includes:
S11: the edge gray value of the detection image to be discriminated rejects edge gray value described in the image to be discriminated Greater than the point of white bright spot gray threshold, noise filtering image is obtained;
The step will affect the white bright spot removal of subsequent detection, improves the precision of subsequent edges information, is also entire The accuracy of definition judgment is laid a good foundation.
S12: the noise filtering image is zoomed in or out and is sized, pretreatment image is obtained.
In order to preferably adapt to the processing of subsequent image, it can be to be sized by Image Adjusting, can protect in this way Demonstrate,prove different size of picture can should the definition judgment method carry out definition judgment.
Step 102: the bianry image clarity evaluation of estimate of the pretreatment image is calculated using binarization method;
Step 102 specifically includes:
S21: Fuzzy Processing is carried out according to setting fuzziness to the pretreatment image;
The Fuzzy Processing can be improved the robustness of the method for the present invention.
S22: choosing different first edge threshold values, according to edge pixel number setting value, utilizes canny edge detection algorithm The edge for extracting the image to be discriminated, obtains first edge image;
In fact, the extraction of this edge image can also be realized using other Edge extraction algorithms, for different Picture size, then the size at edge also difference, therefore mentioning for image border is being realized using Edge extraction algorithm When taking, edge threshold can be set, and since image is quadrangle or other shapes, then its edge threshold can not Together, therefore the multiple and different edge threshold of setting is more advantageous to the extraction of image border, and can be improved edge extracting precision.
S23: the rotation angle of image is calculated according to the lines in the edge image, and according to the rotation angle calculation Affine matrix;The water that affine transformation makes horizontal frame in the image containing table or contains is carried out according to the affine matrix The level of horizontal line obtains rotation image;
Some images may be inclined, or distortion, it is therefore desirable to these images are subjected to rotation transformation, image is put Just, subsequent image procossing can be facilitated in this way, can be improved the accuracy of image definition judgement to a certain extent.
S24: binaryzation Local treatment is carried out to the rotation image and obtains binary image;The binary picture is filtered out again Lines and non-legible region as in obtain filtering bianry image of making an uproar;
S25: the multiple and different second edge threshold values for being different from the first edge threshold value are chosen, according to edge picture Prime number mesh setting value is extracted the edge of the image to be discriminated using canny edge detection algorithm, obtains second edge image;
S26: the first edge image and the second edge image are negated, reference picture is obtained;
S27: the non-legible region of the first edge image is filtered out;The first edge is corrected in conjunction with the reference picture The marginal information of image obtains amendment image;
S28: the marginal information for filtering bianry image of making an uproar is modified using the amendment image, obtains amendment two-value Image;
Above-mentioned filter process of making an uproar all can filter out together original part edge information, also will influence image border really It is fixed, certainly also will subsequent image clarity judgement, it is therefore desirable to marginal information is modified.
S29: contour area is positioned to the amendment bianry image;To the contour area of positioning, non-legible region is deleted, is obtained To the binary image containing character area:
S210: traversing the character area, uses OTSU algorithm to described with binarization threshold th+5, th and th-5 respectively Binary image containing character area carries out binary conversion treatment, respectively obtain threshold binarization image rect1, rect, Rect2 counts the pixel number of described threshold binarization image rect1, rect2 and the threshold binarization image rect not etc. With null element number;
S211: the threshold binarization image rect and described threshold binarization image rect1, rect2 are not calculated not etc. Pixel number and total pixel number purpose ratio bw_delta2area, calculate the threshold binarization image rect null element number with Total pixel number purpose ratio bw_delta2bpc, obtains bianry image clarity evaluation of estimate.
Step 103: the gradient image clarity evaluation of estimate of the pretreatment image is calculated using gradient method;
Step 103 specifically includes:
S31: the horizontal gradient value and picture of the pixel horizontal direction in the pretreatment image are calculated using Sobel operator The vertical gradient value of vegetarian refreshments vertical direction;
S32: calculate the square root of horizontal gradient value and the subduplicate of vertical gradient value and absolute value SMD_val, obtain To gradient image clarity evaluation of estimate.
Step 104: according to the bianry image clarity evaluation of estimate and gradient image clarity evaluation of estimate judgement figure Image sharpness and the confidence level for calculating definition judgment.
Step 104 specifically includes:
S31: according to gradient image clarity Evaluation threshold SMD_thresh and bianry image clarity Evaluation threshold bw_ Delta2area_thresh, bw_delta2bpc_thresh judge whether the condition for meeting image clearly: smd_val > SMD_thresh) | | (bw_delta2area < bw_delta2area_thresh) | | (bw_delta2bpc < bw_ Delta2bpc_thresh), definition judgment result is obtained;
S32: when definition judgment result expression is, then judge that the image to be discriminated is clear, and calculate and sentence Break clear confidence level.
S33: when the definition judgment result indicates no, then the image to be discriminated is judged to be unintelligible, calculating is sentenced Break unintelligible confidence level.
In practical applications, specific judgment method is as follows:
Image is pre-processed, normalize size scaling, using the processing method of canny edge algorithms and binaryzation very Good extraction text glyph calculates three clarity evaluation indexes then in conjunction with text image feature, finally integrates three and comment Valence index provides definition judgment conclusion and confidence level, and accuracy rate is high, versatile, has achieved the purpose that definition judgment, has been Text image, which is further processed, provides foundation.
Three evaluation index Computing Principles:
1. adjacent pixel gray variance method
Variance is discrete (inclined between one group of discrete data and its expectation (i.e. the mean values of data) for investigating in probability theory From) measure in Chengdu.Variance is larger, indicates the deviation between this group of data with regard to larger, and the data in group have larger, Some is smaller, is unevenly distributed weighing apparatus;Variance is smaller, indicates that the deviation between this group of data is smaller, is distributed between the data in group Average, size is close.Clearly image compares the fuzzy image of focusing for focusing, and the gray difference between its data should be more Greatly, i.e., its variance should be larger, and the clarity of image can be measured by the variance of image gradation data, and variance is bigger, Indicate that clarity is better.
If gray level image I, long w, wide h, gradient material calculation step, evaluation of estimate smd_val.
2. clear image marginal information is abundant, the variation of binarization threshold is smaller on obtained binary image influence, and Blurred picture is big by threshold interference, the small range variation of threshold value, and the bianry image quality being likely to be obtained is different.Threshold value is investigated to change Become, the region area that binarization result changes, available two parameters.
To each character area navigated to, binarization result brect and optimal threshold are obtained with OTSU Binarization methods Thresh is that threshold value respectively obtains two binarization results brect1 and brect2 with thresh ± 5.To brect1 and brect2 It is reference with brect, compares pixel-by-pixel, if value is different, changing value delta+1, while the picture of the accumulative background area brect Plain value totalbpc, character area gross area totalarea.
Obtain two evaluation indexes:
Confidence level calculation method
If being directed to threshold value SMD_thresh, bw_delta2area_thresh, bw_delta2bpc_ of three evaluation indexes Thresh, definition judgment confidence level p, if intermediate variable beliefrate.
1. judging clear confidence level
2. judging unintelligible confidence level
This definition judgment method is judged respectively from the angle of pixel and the angle of pixel orientation, is more fully obtained The clarity of image has been arrived, and has all had pixel and pixel orientation for image, therefore the definition judgment method energy Enough applications and various images, improve the versatility of definition judgment method.
The present embodiment additionally provides a kind of definition of text images corresponding with above-mentioned definition of text images judgment method Judgement system, as shown in Fig. 2, the system comprises:
Pretreatment unit 201 obtains pretreatment image for carrying out image preprocessing to image to be discriminated;
The pretreatment unit 201 specifically includes:
Noise filtering subelement rejects the image to be discriminated for detecting the edge gray value of the image to be discriminated Described in edge gray value be greater than the point of white bright spot gray threshold, obtain noise filtering image;
Subelement is scaled, is sized for zooming in or out the noise filtering image, obtains pretreatment image.
Binarization unit 202, the bianry image clarity for calculating the pretreatment image using binarization method are commented Value;
The binarization unit 202 specifically includes:
It is blurred subelement, for carrying out Fuzzy Processing according to setting fuzziness to the pretreatment image;
Second edge detection sub-unit, for choosing different first edge threshold values, according to edge pixel number setting value, benefit The edge that the image to be discriminated is extracted with canny edge detection algorithm, obtains first edge image;
Image rotation subelement, for the rotation angle according to the lines calculating image in the edge image, and according to The rotation angle calculation affine matrix;Affine transformation, which is carried out, according to the affine matrix makes the water in the image containing table Pingbian frame or the horizontal level contained obtain rotation image;
Two-value filters subelement of making an uproar, and obtains binary image for carrying out binaryzation Local treatment to the rotation image;Again The lines in the binary image and non-legible region are filtered out, obtains filtering bianry image of making an uproar;
Second edge detection sub-unit, for choosing multiple and different described second for being different from the first edge threshold value Edge threshold extracts the side of the image to be discriminated using canny edge detection algorithm according to edge pixel number setting value Edge obtains second edge image;
Subelement is negated, for negating to the first edge image and the second edge image, obtains reference picture;
Edge revise subelemen, for filtering out the non-legible region of the first edge image;In conjunction with the reference picture The marginal information for correcting the first edge image obtains amendment image;
Two-value revise subelemen, for being repaired using the amendment image to the marginal information for filtering bianry image of making an uproar Just, amendment bianry image is obtained;
Character area screens subelement, for positioning contour area to the amendment bianry image;To the profile region of positioning Non-legible region is deleted in domain, obtains the binary image containing character area:
Threshold binarization subelement is adopted respectively with binarization threshold th+5, th and th-5 for traversing the character area Binary conversion treatment is carried out to the binary image containing character area with OTSU algorithm, respectively obtains threshold binarization image Rect1, rect, rect2 count described threshold binarization image rect1, rect2 and the threshold binarization image rect not Deng pixel number and null element number;
Ratio calculation subelement, for calculating the threshold binarization image rect and the threshold binarization image The pixel number and total pixel number purpose ratio bw_delta2area of rect1, rect2 not etc., calculate the threshold binarization figure As rect null element number and total pixel number purpose ratio bw_delta2bpc, bianry image clarity evaluation of estimate is obtained.
Gradient computing unit 203, the gradient image clarity for calculating the pretreatment image using gradient method are commented Value;
The gradient computing unit 203 specifically includes:
Gradient value computation subunit, for calculating the pixel level side in the pretreatment image using Sobel operator To horizontal gradient value and pixel vertical direction vertical gradient value;
Cumulative subelement, for calculate horizontal gradient value square root and vertical gradient value subduplicate and absolute value SMD_val obtains gradient image clarity evaluation of estimate.
Definition judgment unit 204, for clear according to the bianry image clarity evaluation of estimate and the gradient image Degree evaluation of estimate judges image definition and calculates the confidence level of definition judgment.
The definition judgment unit 204 specifically includes:
Condition judgment sub-unit, for clear according to gradient image clarity Evaluation threshold SMD_thresh and bianry image Evaluation threshold bw_delta2area_thresh, bw_delta2bpc_thresh are spent, judges whether the item for meeting image clearly Part: smd_val > SMD_thresh) | | (bw_delta2area < bw_delta2area_thresh) | | (bw_delta2bpc < bw_delta2bpc_thresh), obtain definition judgment result;
It is clear to determine subelement, for when definition judgment result expression is, then judging the image to be discriminated To be clear, and calculate and judge clear confidence level.
Unintelligible determining subelement, for when the definition judgment result indicates no, then judging the figure to be discriminated As be it is unintelligible, calculating judge unintelligible confidence level.
It should be noted that for the system disclosed in the embodiment, since it is opposite with method disclosed in embodiment It answers, so being described relatively simple, reference may be made to the description of the method.
Definition of text images judgment method proposed by the present invention is using the technology in the fields such as image procossing, for text This feature of image extracts character area using canny edge detection algorithm and binarization method to image, and localized region is used OTSU algorithm obtains binary map and threshold value, and given threshold increment carries out binary conversion treatment again, statistics binary map null element quantity and Threshold delta acts on the pixel number of the variation of lower binary image, using the ratio of two values and sum of all pixels as evaluation of estimate, knot The evaluation of estimate that gradient calculates to be closed, by the multilevel iudge image definition with reference threshold, evaluates accuracy rate height, versatility is good, Achieve the purpose that definition of text images judges.
Application example of the invention is as follows:
Application example 1:
On general computer, text information medical clinic charge bill abundant is handled, the present invention is used The method, after obtaining image data, by step 101 image preprocessing, step 102 is calculated by binarization method Gradient image clarity evaluation of estimate is calculated by gradient method by step 103, finally in bianry image clarity evaluation of estimate Judge that the clarity of image meets eye-observation characteristic by step 104.
Application example 2
On general computer, the various regions medical clinic charge bill obtained to scanning is handled, and uses the present invention The method, after obtaining image data, by step 101 image preprocessing, step 102 is calculated by binarization method Gradient image clarity evaluation of estimate is calculated by gradient method by step 103, finally in bianry image clarity evaluation of estimate Judge that the clarity of image meets eye-observation characteristic by step 104.
Application example 3
On general computer, identity card is handled, using method of the present invention, obtains image data Afterwards, by step 101 image preprocessing, bianry image clarity evaluation of estimate is calculated by binarization method in step 102, warp It crosses step 103 and gradient image clarity evaluation of estimate is calculated by gradient method, finally judge the clear of image by step 104 Clear degree meets eye-observation characteristic.
Used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are said It is bright to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, foundation Thought of the invention, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification is not It is interpreted as limitation of the present invention.

Claims (10)

1. a kind of definition of text images judgment method, which is characterized in that the described method includes:
Image preprocessing is carried out to image to be discriminated, obtains pretreatment image;
The bianry image clarity evaluation of estimate of the pretreatment image is calculated using binarization method;
The gradient image clarity evaluation of estimate of the pretreatment image is calculated using gradient method;
Image definition is judged according to the bianry image clarity evaluation of estimate and the gradient image clarity evaluation of estimate and is counted Calculate the confidence level of definition judgment.
2. definition of text images judgment method according to claim 1, which is characterized in that it is described to image to be discriminated into Row image preprocessing, specifically includes:
The edge gray value of the image to be discriminated is detected, edge gray value described in the image to be discriminated is rejected and is greater than white The point of bright spot gray threshold, obtains noise filtering image;
The noise filtering image is zoomed in or out and is sized, pretreatment image is obtained.
3. definition of text images judgment method according to claim 1, which is characterized in that described to use binarization method The bianry image clarity evaluation of estimate for calculating the pretreatment image, specifically includes:
Fuzzy Processing is carried out according to setting fuzziness to the pretreatment image;
Different first edge threshold values are chosen, according to edge pixel number setting value, using described in the extraction of canny edge detection algorithm The edge of image to be discriminated obtains first edge image;
The rotation angle of image is calculated according to the lines in the edge image, and according to the affine square of the rotation angle calculation Battle array;Affine transformation is carried out according to the affine matrix to make horizontal frame in the image containing table or contain horizontal Level obtains rotation image;
Binaryzation Local treatment is carried out to the rotation image and obtains binary image;The line in the binary image is filtered out again Item and non-legible region obtain filtering bianry image of making an uproar;
The multiple and different second edge threshold values for being different from the first edge threshold value are chosen, are set according to edge pixel number Definite value is extracted the edge of the image to be discriminated using canny edge detection algorithm, obtains second edge image;
The first edge image and the second edge image are negated, reference picture is obtained;
Filter out the non-legible region of the first edge image;The side of the first edge image is corrected in conjunction with the reference picture Edge information obtains amendment image;
The marginal information for filtering bianry image of making an uproar is modified using the amendment image, obtains amendment bianry image;
Contour area is positioned to the amendment bianry image;To the contour area of positioning, non-legible region is deleted, is obtained containing text The binary image in block domain:
The character area is traversed, text is contained to described using OTSU algorithm with binarization threshold th+5, th and th-5 respectively The binary image in region carries out binary conversion treatment, respectively obtains threshold binarization image rect1, rect, rect2, counts institute State threshold binarization image rect1, rect2 and the threshold binarization image rect pixel number not etc. and null element number;
Calculate the pixel number of the threshold binarization image rect and described threshold binarization image rect1, rect2 not etc. with Total pixel number purpose ratio bw_delta2area calculates the threshold binarization image rect null element number and total number-of-pixels Ratio bw_delta2bpc, obtain bianry image clarity evaluation of estimate.
4. definition of text images judgment method according to claim 3, which is characterized in that described to use gradient method meter The gradient image clarity evaluation of estimate for calculating the pretreatment image, specifically includes:
Horizontal gradient value and the pixel that the pixel horizontal direction in the pretreatment image is calculated using Sobel operator are vertical The vertical gradient value in direction;
Calculate horizontal gradient value square root and vertical gradient value subduplicate and absolute value SMD_val, obtain gradient map Image sharpness evaluation of estimate.
5. definition of text images judgment method according to claim 4, which is characterized in that described according to the binary map Image sharpness evaluation of estimate and the gradient image clarity evaluation of estimate judge image definition and calculate the credible of definition judgment Degree, specifically includes:
According to gradient image clarity Evaluation threshold SMD_thresh and bianry image clarity Evaluation threshold bw_ Delta2area_thresh, bw_delta2bpc_thresh judge whether the condition for meeting image clearly: smd_val > SMD_thresh) | | (bw_delta2area < bw_delta2area_thresh) | | (bw_delta2bpc < bw_ Delta2bpc_thresh), definition judgment result is obtained;
When definition judgment result expression is, then judge that the image to be discriminated is clear, and calculates judgement and clearly may be used Reliability.
When the definition judgment result indicates no, then the image to be discriminated is judged to be unintelligible, calculating judges unintelligible Confidence level.
6. a kind of definition of text images judges system, which is characterized in that the system comprises:
Pretreatment unit obtains pretreatment image for carrying out image preprocessing to image to be discriminated;
Binarization unit, for calculating the bianry image clarity evaluation of estimate of the pretreatment image using binarization method;
Gradient computing unit, for calculating the gradient image clarity evaluation of estimate of the pretreatment image using gradient method;
Definition judgment unit, for according to the bianry image clarity evaluation of estimate and the gradient image clarity evaluation of estimate Judge image definition and calculates the confidence level of definition judgment.
7. definition of text images according to claim 6 judges system, which is characterized in that the pretreatment unit is specific Include:
Noise filtering subelement rejects institute in the image to be discriminated for detecting the edge gray value of the image to be discriminated The point that edge gray value is greater than white bright spot gray threshold is stated, noise filtering image is obtained;
Subelement is scaled, is sized for zooming in or out the noise filtering image, obtains pretreatment image.
8. definition of text images according to claim 6 judges system, which is characterized in that the binarization unit is specific Include:
It is blurred subelement, for carrying out Fuzzy Processing according to setting fuzziness to the pretreatment image;
Second edge detection sub-unit, according to edge pixel number setting value, is utilized for choosing different first edge threshold values Canny edge detection algorithm extracts the edge of the image to be discriminated, obtains first edge image;
Image rotation subelement, for calculating the rotation angle of image according to the lines in the edge image, and according to described Rotate angle calculation affine matrix;Affine transformation, which is carried out, according to the affine matrix makes the horizontal sides in the image containing table Frame or the horizontal level contained obtain rotation image;
Two-value filters subelement of making an uproar, and obtains binary image for carrying out binaryzation Local treatment to the rotation image;It filters out again Lines and non-legible region in the binary image obtain filtering bianry image of making an uproar;
Second edge detection sub-unit, for choosing the multiple and different second edges for being different from the first edge threshold value Threshold value is extracted the edge of the image to be discriminated using canny edge detection algorithm, obtained according to edge pixel number setting value To second edge image;
Subelement is negated, for negating to the first edge image and the second edge image, obtains reference picture;
Edge revise subelemen, for filtering out the non-legible region of the first edge image;It is corrected in conjunction with the reference picture The marginal information of the first edge image obtains amendment image;
Two-value revise subelemen, for being modified using the amendment image to the marginal information for filtering bianry image of making an uproar, Obtain amendment bianry image;
Character area screens subelement, for positioning contour area to the amendment bianry image;To the contour area of positioning, delete Unless character area, obtains the binary image containing character area:
Threshold binarization subelement, for traversing the character area, respectively with binarization threshold th+5, th and th-5 use OTSU algorithm carries out binary conversion treatment to the binary image containing character area, respectively obtains threshold binarization image Rect1, rect, rect2 count described threshold binarization image rect1, rect2 and the threshold binarization image rect not Deng pixel number and null element number;
Ratio calculation subelement, for calculate the threshold binarization image rect and the threshold binarization image rect1, Rect2 not equal pixel number and total pixel number purpose ratio bw_delta2area, calculates the threshold binarization image rect Null element number and total pixel number purpose ratio bw_delta2bpc, obtain bianry image clarity evaluation of estimate.
9. definition of text images according to claim 8 judges system, which is characterized in that the gradient computing unit tool Body includes:
Gradient value computation subunit, for calculating the pixel horizontal direction in the pretreatment image using Sobel operator The vertical gradient value of horizontal gradient value and pixel vertical direction;
Cumulative subelement, for calculate horizontal gradient value square root and vertical gradient value subduplicate and absolute value SMD_ Val obtains gradient image clarity evaluation of estimate.
10. definition of text images according to claim 9 judges system, which is characterized in that the definition judgment list Member specifically includes:
Condition judgment sub-unit, for being commented according to gradient image clarity Evaluation threshold SMD_thresh and bianry image clarity Valence threshold value bw_delta2area_thresh, bw_delta2bpc_thresh judges whether the condition for meeting image clearly: Smd_val > SMD_thresh) | | (bw_delta2area < bw_delta2area_thresh) | | (bw_delta2bpc < Bw_delta2bpc_thresh), definition judgment result is obtained;
It is clear to determine subelement, for when definition judgment result expression is, then judging that the image to be discriminated is clear It is clear, and calculate and judge clear confidence level.
Unintelligible determining subelement, for when the definition judgment result indicates no, then judging that the image to be discriminated is Unintelligible, calculating judges unintelligible confidence level.
CN201910733120.5A 2019-08-02 2019-08-02 Text image definition judging method and system Active CN110473189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910733120.5A CN110473189B (en) 2019-08-02 2019-08-02 Text image definition judging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910733120.5A CN110473189B (en) 2019-08-02 2019-08-02 Text image definition judging method and system

Publications (2)

Publication Number Publication Date
CN110473189A true CN110473189A (en) 2019-11-19
CN110473189B CN110473189B (en) 2024-01-23

Family

ID=68510248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910733120.5A Active CN110473189B (en) 2019-08-02 2019-08-02 Text image definition judging method and system

Country Status (1)

Country Link
CN (1) CN110473189B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432125A (en) * 2020-03-31 2020-07-17 合肥英睿系统技术有限公司 Focusing method and device, electronic equipment and storage medium
CN112233049A (en) * 2020-12-14 2021-01-15 成都中轨轨道设备有限公司 Image fusion method for improving image definition
CN112561890A (en) * 2020-12-18 2021-03-26 深圳赛安特技术服务有限公司 Image definition calculation method and device and computer equipment
CN112668640A (en) * 2020-12-28 2021-04-16 泰康保险集团股份有限公司 Text image quality evaluation method, device, equipment and medium
CN112668468A (en) * 2020-12-28 2021-04-16 北京翰立教育科技有限公司 Photographing evaluation method and device
CN113052815A (en) * 2021-03-23 2021-06-29 Oppo广东移动通信有限公司 Image definition determining method and device, storage medium and electronic equipment
CN114723721A (en) * 2022-04-18 2022-07-08 贝塔通科技(北京)有限公司 Image definition determining method and system and image uploading method
CN116939170A (en) * 2023-09-15 2023-10-24 深圳市达瑞电子科技有限公司 Video monitoring method, video monitoring server and encoder equipment
CN116992496A (en) * 2023-09-28 2023-11-03 武汉彤新科技有限公司 Data resource safety supervision system for enterprise service management

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7079287B1 (en) * 2000-08-01 2006-07-18 Eastman Kodak Company Edge enhancement of gray level images
CN104574381A (en) * 2014-12-25 2015-04-29 南京邮电大学 Full reference image quality evaluation method based on LBP (local binary pattern)
CN104902267A (en) * 2015-06-08 2015-09-09 浙江科技学院 No-reference image quality evaluation method based on gradient information
CN105469413A (en) * 2015-12-10 2016-04-06 哈尔滨工业大学 Normalized ringing weighting based no-reference comprehensive quality assessment method for fuzzy restored image
US20160171710A1 (en) * 2014-12-10 2016-06-16 Omnivision Technologies, Inc. Edge Detection System And Methods
CN107146216A (en) * 2017-04-07 2017-09-08 浙江科技学院 A kind of non-reference picture method for evaluating objective quality based on gradient self-similarity
CN108389200A (en) * 2018-03-15 2018-08-10 武汉大学 Halftone Image quality evaluating method and system based on texture visual characteristic

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7079287B1 (en) * 2000-08-01 2006-07-18 Eastman Kodak Company Edge enhancement of gray level images
US20160171710A1 (en) * 2014-12-10 2016-06-16 Omnivision Technologies, Inc. Edge Detection System And Methods
CN104574381A (en) * 2014-12-25 2015-04-29 南京邮电大学 Full reference image quality evaluation method based on LBP (local binary pattern)
CN104902267A (en) * 2015-06-08 2015-09-09 浙江科技学院 No-reference image quality evaluation method based on gradient information
CN105469413A (en) * 2015-12-10 2016-04-06 哈尔滨工业大学 Normalized ringing weighting based no-reference comprehensive quality assessment method for fuzzy restored image
CN107146216A (en) * 2017-04-07 2017-09-08 浙江科技学院 A kind of non-reference picture method for evaluating objective quality based on gradient self-similarity
CN108389200A (en) * 2018-03-15 2018-08-10 武汉大学 Halftone Image quality evaluating method and system based on texture visual characteristic

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LIQUAN SHEN 等: "No-Reference Stereoscopic Image Quality Assessment Based on Image Distortion and Stereo Perceptual Information", 《IEEE TRANSACTIONS ON EMERGING TOPICS IN COMPUTATIONAL INTELLIGENCE》 *
刘建武: "文档图像的清晰度评价研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
吴金建: "基于人类视觉系统的图像信息感知和图像质量评价", 《中国博士学位论文全文数据库信息科技辑》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432125B (en) * 2020-03-31 2022-04-05 合肥英睿系统技术有限公司 Focusing method and device, electronic equipment and storage medium
CN111432125A (en) * 2020-03-31 2020-07-17 合肥英睿系统技术有限公司 Focusing method and device, electronic equipment and storage medium
CN112233049A (en) * 2020-12-14 2021-01-15 成都中轨轨道设备有限公司 Image fusion method for improving image definition
CN112233049B (en) * 2020-12-14 2021-03-02 成都中轨轨道设备有限公司 Image fusion method for improving image definition
CN112561890A (en) * 2020-12-18 2021-03-26 深圳赛安特技术服务有限公司 Image definition calculation method and device and computer equipment
CN112668640B (en) * 2020-12-28 2023-10-17 泰康保险集团股份有限公司 Text image quality evaluation method, device, equipment and medium
CN112668468A (en) * 2020-12-28 2021-04-16 北京翰立教育科技有限公司 Photographing evaluation method and device
CN112668640A (en) * 2020-12-28 2021-04-16 泰康保险集团股份有限公司 Text image quality evaluation method, device, equipment and medium
CN113052815A (en) * 2021-03-23 2021-06-29 Oppo广东移动通信有限公司 Image definition determining method and device, storage medium and electronic equipment
CN114723721A (en) * 2022-04-18 2022-07-08 贝塔通科技(北京)有限公司 Image definition determining method and system and image uploading method
CN116939170A (en) * 2023-09-15 2023-10-24 深圳市达瑞电子科技有限公司 Video monitoring method, video monitoring server and encoder equipment
CN116939170B (en) * 2023-09-15 2024-01-02 深圳市达瑞电子科技有限公司 Video monitoring method, video monitoring server and encoder equipment
CN116992496A (en) * 2023-09-28 2023-11-03 武汉彤新科技有限公司 Data resource safety supervision system for enterprise service management
CN116992496B (en) * 2023-09-28 2023-12-29 武汉彤新科技有限公司 Data resource safety supervision system for enterprise service management

Also Published As

Publication number Publication date
CN110473189B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN110473189A (en) A kind of definition of text images judgment method and system
CN111507994B (en) Portrait extraction method, portrait extraction device and mobile terminal
CN106934803B (en) method and device for detecting surface defects of electronic device
WO2019153739A1 (en) Identity authentication method, device, and apparatus based on face recognition, and storage medium
CN108537782B (en) Building image matching and fusing method based on contour extraction
EP1394723A2 (en) Method for detecting red-eye effect in digital images
US8254644B2 (en) Method, apparatus, and program for detecting facial characteristic points
CN109859227A (en) Reproduction image detecting method, device, computer equipment and storage medium
WO2006087581A1 (en) Method for facial features detection
CN110188747A (en) A kind of sloped correcting method of text image, device and image processing equipment
CN104732225B (en) image rotation processing method
CN109146832B (en) Video image splicing method and device, terminal equipment and storage medium
CN111105346A (en) Full-scanning microscopic image splicing method based on peak value search and gray template registration
CN114037992A (en) Instrument reading identification method and device, electronic equipment and storage medium
CN113674303A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113375555A (en) Power line clamp measuring method and system based on mobile phone image
CN110930358B (en) Solar panel image processing method based on self-adaptive algorithm
EP0964362A1 (en) Image processing method, apparatus, and storage medium for recognition of irradiation area
JP3860540B2 (en) Entropy filter and region extraction method using the filter
CN114972084A (en) Image focusing accuracy evaluation method and system
CN112634298B (en) Image processing method and device, storage medium and terminal
US7376285B2 (en) Method of auto-deskewing a tilted image
JP2008084109A (en) Eye opening/closing determination device and eye opening/closing determination method
US6693669B1 (en) Method for reducing image blurring
CN109448012A (en) A kind of method for detecting image edge 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200819

Address after: Room 2087, No. 100, Lane 130, Taopu Road, Putuo District, Shanghai

Applicant after: Jingpu (Shanghai) Artificial Intelligence Technology Co.,Ltd.

Address before: 226000 Jiangsu city of Nantong province No. 2 Building 1 room 110494 Hyde

Applicant before: NANTONG SHIAI INTELLIGENT TECHNOLOGY Co.,Ltd.

DD01 Delivery of document by public notice
DD01 Delivery of document by public notice

Addressee: Jingpu (Shanghai) Artificial Intelligence Technology Co.,Ltd. Person in charge of patents

Document name: Notice of First Examination Opinion

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231215

Address after: 518000, Area 101, Block B, Famous Procurement Center, Fishery Community, Xixiang Street, Bao'an District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Yuezhikang Technology Co.,Ltd.

Address before: 200333, Room 2087, No. 100, Lane 130, Taopu Road, Putuo District, Shanghai

Applicant before: Jingpu (Shanghai) Artificial Intelligence Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant