CN106951902A - A kind of image binaryzation processing method and processing device - Google Patents

A kind of image binaryzation processing method and processing device Download PDF

Info

Publication number
CN106951902A
CN106951902A CN201710186867.4A CN201710186867A CN106951902A CN 106951902 A CN106951902 A CN 106951902A CN 201710186867 A CN201710186867 A CN 201710186867A CN 106951902 A CN106951902 A CN 106951902A
Authority
CN
China
Prior art keywords
binary
image
character
error
threshold
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
CN201710186867.4A
Other languages
Chinese (zh)
Other versions
CN106951902B (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 Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201710186867.4A priority Critical patent/CN106951902B/en
Publication of CN106951902A publication Critical patent/CN106951902A/en
Application granted granted Critical
Publication of CN106951902B publication Critical patent/CN106951902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Character Input (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The embodiment of the invention discloses a kind of image binaryzation processing method and processing device.Methods described includes:Binary conversion treatment is carried out to target image respectively according to two or more binary-state thresholds in binary-state threshold group, binary image group is obtained;Determine the error in each binary image between the characteristic value and corresponding default characteristic value of either objective character in the binary image group;Targets threshold is determined according to the error of target character in each binary image and from the binary-state threshold group, and binary conversion treatment is carried out to the target image according to the targets threshold.By technical scheme, the influence of noise on image binaryzation effect can be reduced, the stability of image binaryzation effect is improved.

Description

A kind of image binaryzation processing method and processing device
Technical field
The present embodiments relate to image processing techniques, more particularly to a kind of image binaryzation processing method and processing device.
Background technology
With the development of paper money discrimination technology, paper money discrimination algorithm also emerges in an endless stream, but many paper money discrimination algorithms are all Be based on binary conversion treatment after banknote image and carry out.
The image binaryzation processing method generally used at present is common OTSU (maximum between-cluster variance) algorithm, P parameter Method etc., but be due to the presence of some stains or noise on bank note or on original image, binaryzation effect may be caused not good and shakiness It is fixed, and then the follow-up processing procedure that influence is carried out based on the binary image.
The content of the invention
The embodiment of the present invention provides a kind of image binaryzation processing method and processing device, to realize reduction noise on image two-value Change the influence of effect, improve the stability of image binaryzation effect.
In a first aspect, the embodiments of the invention provide a kind of image binaryzation processing method, including:
Binaryzation is carried out to target image according to two or more binary-state thresholds in binary-state threshold group respectively Processing, obtains binary image group;
Determine in the binary image group in each binary image the characteristic value of either objective character with it is corresponding pre- If the error between characteristic value;
Targets threshold is determined according to the error of target character in each binary image and from the binary-state threshold group, and Binary conversion treatment is carried out to the target image according to the targets threshold.
Further, according to two or more binary-state thresholds in binary-state threshold group respectively to target image Carry out before binary conversion treatment, also include:
Initial threshold is obtained using Binarization methods to the target image;
It is adjusted centered on the initial threshold in setting interval, obtains binary-state threshold group, wherein, described two Value sets of threshold values includes at least two binary-state thresholds.
Further, it is described to be adjusted centered on the initial threshold in setting interval, obtain binary-state threshold Group, including:
According to formula:V=T-k × i, is adjusted to the initial threshold in interval [min (k × i), max (k × i)] It is whole, obtain binary-state threshold group;
Wherein, V is binary-state threshold, and T is the initial threshold, and k is zoom factor, and i is integer.
Further, the feature for determining either objective character in each binary image in the binary image group Value and the error between corresponding default characteristic value, including:
The centre coordinate of the either objective character in the binary image group in each binary image is calculated respectively;
The centre coordinate and the corresponding difference expected between coordinate for determining the either objective character are the first error;With/ Or,
The distance between the centre coordinate of the either objective character and the centre coordinate of first object character are calculated, and really Fixed difference between the distance and corresponding pre-determined distance is the second error, wherein, the first object character is the target Default reference character in character.
Further, the either objective character calculated respectively in the binary image group in each binary image Centre coordinate, including:
Determine the up-and-down boundary coordinate of each binary image in the binary image group respectively according to row projection;
Determine that each binary image is wrapped in the binary image group according to row projection and the up-and-down boundary coordinate The right boundary coordinate of the either objective character contained;
Each two-value in the binary image group is calculated according to the up-and-down boundary coordinate and the right boundary coordinate Change the centre coordinate for the either objective character that image is included.
Further, each two-value in the binary image group is determined according to row projection and the up-and-down boundary coordinate After the right boundary coordinate for changing the either objective character that image is included, also include:
The up-and-down boundary coordinate is adjusted according to the right boundary coordinate of the either objective character and row projection.
Further, the difference between the centre coordinate for determining the either objective character and corresponding expectation coordinate is First error, including:
The centre coordinate of target character in each binary image in the binary image group determines to intend respectively Close straight line;
Appoint according to being determined the center abscissa of either objective character in the fitting a straight line and the target character The corresponding expectation center ordinate of one target character;
Determine the vertical seat in center of the corresponding expectation center ordinate of the either objective character and the either objective character Difference between mark is the first error.
Further, the error of target character and true from the binary-state threshold group in each binary image of the basis Set the goal threshold value, including:
By the corresponding first error sum of each binary image, and/or, each binary image is corresponding Second error sum be defined as in each binary image the error of target character and;
According to the error and determine in the binary-state threshold group be with minimal error and corresponding binary-state threshold Targets threshold.
Second aspect, the embodiment of the present invention additionally provides a kind of image binaryzation processing unit, and the device includes:
Image processing module, for according to two or more binary-state thresholds in binary-state threshold group respectively to mesh Logo image carries out binary conversion treatment, obtains binary image group;
Error determination module, for determining in the binary image group either objective character in each binary image Error between characteristic value and corresponding default characteristic value;
Threshold determination module, for according to the error of target character in each binary image and from the binary-state threshold Group determines targets threshold, and carries out binary conversion treatment to the target image according to the targets threshold.
Further, also include:
Threshold value acquisition module, for right respectively according to two or more binary-state thresholds in binary-state threshold group Target image is carried out before binary conversion treatment, and initial threshold is obtained using Binarization methods to the target image;
Threshold adjustment module, for being adjusted centered on the initial threshold in setting interval, obtains binaryzation Sets of threshold values, wherein, the binary-state threshold group includes at least two binary-state thresholds.
Further, the threshold adjustment module specifically for:
According to formula:V=T-k × i, is adjusted to the initial threshold in interval [min (k × i), max (k × i)] It is whole, obtain binary-state threshold group;
Wherein, V is binary-state threshold, and T is the initial threshold, and k is zoom factor, and i is integer.
Further, the error determination module includes:
Centre coordinate calculating sub module, for calculating appointing in each binary image in the binary image group respectively The centre coordinate of one target character;
First error determination sub-module, for determine the centre coordinate of the either objective character with it is corresponding expect coordinate it Between difference be the first error;And/or,
Second error determination sub-module, centre coordinate and first object character for calculating the either objective character The distance between centre coordinate, and determine that the difference between the distance and corresponding pre-determined distance is the second error, wherein, it is described First object character is default reference character in the target character.
Further, the centre coordinate calculating sub module specifically for:
Determine the up-and-down boundary coordinate of each binary image in the binary image group respectively according to row projection;
Determine that each binary image is wrapped in the binary image group according to row projection and the up-and-down boundary coordinate The right boundary coordinate of the either objective character contained;
Each two-value in the binary image group is calculated according to the up-and-down boundary coordinate and the right boundary coordinate Change the centre coordinate for the either objective character that image is included.
Further, the centre coordinate calculating sub module is additionally operable to:
Each binary image institute in the binary image group is determined according to row projection and the up-and-down boundary coordinate Comprising either objective character right boundary coordinate after, according to the right boundary coordinate of the either objective character and row throw The whole up-and-down boundary coordinate of tone.
Further, the first error determination sub-module specifically for:
The centre coordinate of target character in each binary image in the binary image group determines to intend respectively Close straight line;
Appoint according to being determined the center abscissa of either objective character in the fitting a straight line and the target character The corresponding expectation center ordinate of one target character;
Determine the vertical seat in center of the corresponding expectation center ordinate of the either objective character and the either objective character Difference between mark is the first error.
Further, the threshold determination module includes:
Error and determination sub-module, for by the corresponding first error sum of each binary image, and/or, institute State the corresponding second error sum of each binary image be defined as in each binary image the error of target character and;
Targets threshold determination sub-module, for according to the error and determine in the binary-state threshold group with minimal error It is targets threshold with corresponding binary-state threshold.
The embodiment of the present invention by according to two or more binary-state thresholds in binary-state threshold group respectively to mesh Logo image is handled, and obtains binary image group, and according to the error of target character in wherein each binary image and come The targets threshold in binary-state threshold group is determined, binary conversion treatment is carried out to target image according to the targets threshold, root is make use of According to error and the advantage of selection target threshold value, solve in the prior art because of the use binaryzation to the image comprising noise merely Binaryzation effect is not good caused by algorithm is handled, so to the binary conversion treatment effect of image it is unstable the problem of, drop The low influence of noise on image binaryzation effect, improves the stability of image binaryzation effect.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet for image binaryzation processing method that the embodiment of the present invention one is provided;
Fig. 2 is a kind of schematic flow sheet for image binaryzation processing method that the embodiment of the present invention two is provided;
Fig. 3 is a kind of schematic flow sheet for image binaryzation processing method that the embodiment of the present invention three is provided;
Fig. 4 is a kind of structural representation for image binaryzation processing unit that the embodiment of the present invention four is provided;
Fig. 5 is the schematic diagram of target image provided in an embodiment of the present invention.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just Part related to the present invention rather than entire infrastructure are illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is a kind of schematic flow sheet for image binaryzation processing method that the embodiment of the present invention one is provided.This method can Situation suitable for carrying out binary conversion treatment to image, this method can be performed by image binaryzation processing unit, the device It can be made up of hardware and/or software, and can typically be integrated in computer and all terminals for including image binaryzation processing function In.Specifically include as follows:
S110, according to two or more binary-state thresholds in binary-state threshold group respectively to target image carry out two Value is handled, and obtains binary image group.
Wherein, binary-state threshold group includes at least two binary-state thresholds, optionally, included by binary-state threshold group All binary-state thresholds can be predetermined threshold value, can also be obtained by Binarization methods, specifically, Binarization methods can be figure As the threshold method in binarization method.
It is preferred that, target image can be the image for including character string.Specifically, the binary conversion treatment of image, is exactly The gray value of pixel on image is set to 0 or 255, that is, whole image showed significantly only have it is black and white Visual effect.Exemplary, the process for carrying out binary conversion treatment using binary-state threshold can be that pixel value is less than into binaryzation The pixel value of all pixels point of threshold value is set to 0 (or 255), and the pixel value of remaining pixel is set to 255 (or 0).
Specifically, each binary image in binary image group correspond respectively in binary-state threshold group each two Value threshold value, i.e., carry out binary conversion treatment to target image according to a binary-state threshold and can obtain a binary image.
S120, determine in binary image group in each binary image the characteristic value of either objective character with it is corresponding pre- If the error between characteristic value.
Wherein, the characteristic value of target character can be the centre coordinate value of target character, or according to target character Centre coordinate value calculate obtained other characteristic information values, such as the distance between character and character value.Optionally, preset Characteristic value can be the Standard Eigenvalue of the template character being empirically derived pre-set.If for example, characteristic value is target The distance between character and target character value, then can be to determine in binary image each between target character and target character Distance value and preset standard distance value between error.Between the characteristic value and corresponding default characteristic value that obtain target character The purpose of error be, the binary conversion treatment effect of each binary image in detection binary image group, so that follow-up Binary-state threshold in step according to corresponding to the treatment effect determines desired effects.
S130, according to the error of target character in each binary image and from binary-state threshold group targets threshold is determined, And binary conversion treatment is carried out to target image according to targets threshold.
Optionally, the error of target character and can be each target character in binary image in each binary image Characteristic value distinguish corresponding error sum.Specifically, the binaryzation corresponding to the binary image of error and minimum may be selected Threshold value is targets threshold, and it is targets threshold that error and binary-state threshold within a preset range, which also may be selected,.Utilize the mesh of acquisition Mark threshold value carries out binary conversion treatment to target image and is advantageous in that, can reach the image after binary conversion treatment desired Treatment effect, and then image processing effect is fixed within expected range, reduce because of noise present on target image Or influence of the stain to treatment effect, improve the stability for the treatment of effect.
The technical scheme of the present embodiment, by according to two or more binary-state thresholds in binary-state threshold group point It is other that target image is handled, binary image group is obtained, and according to the mistake of target character in wherein each binary image Difference and the targets threshold in binary-state threshold group is determined, binary conversion treatment, profit are carried out to target image according to the targets threshold With according to error and the advantage of selection target threshold value, solve in the prior art because of the use to the image comprising noise merely Binaryzation effect is not good caused by Binarization methods are handled, and then asks the binary conversion treatment effect of image is unstable Topic, reduces the influence of noise on image binaryzation effect, improves the stability of image binaryzation effect.
Embodiment two
Fig. 2 is a kind of schematic flow sheet for image binaryzation processing method that the embodiment of the present invention two is provided.The present embodiment Optimized based on above-described embodiment there is provided preferred image binaryzation processing method, be specifically, according to binaryzation Two or more binary-state thresholds carry out being optimized before binary conversion treatment respectively to target image in sets of threshold values. Specifically include as follows:
S210, initial threshold is obtained using Binarization methods to target image.
Exemplary, target image can be the gray-scale map for including some target characters, for example, target image such as Fig. 5 institutes Show, include " 017990 " six target characters.It is preferred that, Binarization methods can be OTSU algorithms, i.e. maximum variance between clusters, Also known as Da-Jin algorithm, its principle is:Original image is divided into the class image of foreground and background two using threshold value, then calculated between two classes Variance, updates threshold value, recalculates inter-class variance, the threshold value when meeting inter-class variance maximum, is required optimal threshold, when When taking optimal threshold, background should be maximum with prospect difference.Optionally, initial threshold for target image use OTSU algorithms institute Obtained optimal threshold.
S220, centered on initial threshold setting interval in be adjusted, obtain binary-state threshold group.
Wherein, binary-state threshold group includes at least two binary-state thresholds.
Optionally, initial threshold is often adjusted in setting interval and can once obtain a binary-state threshold, it is preferred that It can be adjusted centered on initial threshold in setting interval, i.e., gained binary-state threshold is to be set centered on initial threshold It is fixed interval interior symmetrical, so that the binary-state threshold in binary-state threshold group can cover initial threshold in setting area Between all values in fluctuation range, improve the stability of Detection results.
It is preferred that, it is adjusted centered on the initial threshold in setting interval, obtains binary-state threshold group, is wrapped Include:According to formula:V=T-k × i, is adjusted in interval [min (k × i), max (k × i)] to the initial threshold, obtains To binary-state threshold group.Wherein, V is binary-state threshold, and T is the initial threshold, and k is zoom factor, and i is integer.
Specifically, k values are bigger, then the scope adjusted is bigger, preferably can be 10;I can use a series of integer, preferably may be used Take all integers between -2 to 2, i.e. i ∈ { -2, -1,0,1,2 };Interval setting is preferably [- 20,20].Exemplary, with first Centered on beginning threshold value T, T-20, T-10, T, T+10, T+20 this five binary-state thresholds, group are taken respectively in interval [- 20,20] Into binary-state threshold group.
S230, according to two or more binary-state thresholds in binary-state threshold group respectively to target image carry out two Value is handled, and obtains binary image group.
S240, determine in binary image group in each binary image the characteristic value of either objective character with it is corresponding pre- If the error between characteristic value.
S250, according to the error of target character in each binary image and from binary-state threshold group targets threshold is determined, And binary conversion treatment is carried out to target image according to targets threshold.
The technical scheme of the present embodiment, by obtaining initial threshold using Binarization methods to target image, then with initial The multiple binary-state thresholds of acquisition are adjusted centered on threshold value in setting interval, binary-state threshold group are constituted, enabling root According to the error and selection target of target character in the binary image that each binary-state threshold processing is obtained in binary-state threshold group Threshold value, finally makes it possible to carry out binary conversion treatment to target image using targets threshold, improves the steady of threshold test effect It is qualitative, and then improve the stability of image binaryzation effect.
Embodiment three
Fig. 3 is a kind of schematic flow sheet for image binaryzation processing method that the embodiment of the present invention three is provided.The present embodiment Optimized based on the various embodiments described above there is provided preferred image binaryzation processing method, be specifically, pair determination two-value The characteristic value for changing either objective character in each binary image in image sets is entered with the error between corresponding default characteristic value Optimization is gone.Specifically include as follows:
S310, according to two or more binary-state thresholds in binary-state threshold group respectively to target image carry out two Value is handled, and obtains binary image group.
The centre coordinate of either objective character in S320, respectively calculating binary image group in each binary image.
Specifically, the purpose for calculating the centre coordinate of target character is, the accurate position for calculating target character so that energy It is enough that related characteristic value is obtained according to positional information.
It is preferred that, the center that the either objective character in binary image group in each binary image is calculated respectively is sat Mark, including:Determine the up-and-down boundary coordinate of each binary image in binary image group respectively according to row projection;Thrown according to row Shadow and up-and-down boundary coordinate determine the left and right side of the either objective character that each binary image is included in binary image group Boundary's coordinate;Calculate what each binary image in binary image group was included according to up-and-down boundary coordinate and right boundary coordinate The centre coordinate of either objective character.
Wherein, row is projected as the pixel value sum of each row pixel.Exemplary, the pixel included in target character Pixel value be 255, in the case that the pixel value of the pixel that the background in addition to target character is included is 0, from top to bottom Each row pixel in binary image is scanned, when the pixel value sum of row pixel in adjacent rows less than predetermined threshold value by becoming During into not less than predetermined threshold value, it is determined that pixel value sum is not less than that behavior coboundary of predetermined threshold value, the row in two rows The coordinate at place is coboundary coordinate;When the pixel value sum of row pixel in adjacent rows not less than predetermined threshold value by becoming small When predetermined threshold value, it is determined that pixel value sum is not less than where that behavior lower boundary of predetermined threshold value, the row in two rows Coordinate is lower boundary coordinate.
After up-and-down boundary coordinate is determined, the side that the region in up-and-down boundary coordinate range can be projected using row preferably Method, wherein, row are projected as the pixel value sum of each row pixel.Exemplary, the picture of the pixel included in target character Element value is 255, in the case that the pixel value for the pixel that the background in addition to target character is included is 0, is scanned from left to right Each row pixel in binary image, the pixel value sum of row pixel less than predetermined threshold value by becoming not in being arranged when adjacent two During less than predetermined threshold value, it is determined that pixel value sum is classified as the left side of target character not less than that of predetermined threshold value in two row Boundary, the coordinate where the row is the left margin coordinate of target character;The pixel value sum of row pixel is not by being arranged when adjacent two When becoming less than predetermined threshold value less than predetermined threshold value, it is determined that pixel value sum is classified as not less than that of predetermined threshold value in two row Right margin, the coordinate where the row is right margin coordinate.
First it is determined that determining that right boundary is advantageous in that on the basis of up-and-down boundary, it is possible to reduce amount of calculation, meter is improved Calculate speed.
Because the up-and-down boundary coordinate of each target character there may be difference, in order to improve the accurate positioning of target character Property, it is preferred that each binary image is included in binary image group is determined according to row projection and up-and-down boundary coordinate After the right boundary coordinate of either objective character, also include:Projected according to the right boundary coordinate of either objective character and row Adjust up-and-down boundary coordinate.Specifically, after obtaining the right boundary coordinate of each target character, row sciagraphy meter can be used again The up-and-down boundary coordinate corresponding to each target character is calculated, Computing Principle ibid, is repeated no more.
Optionally, calculate after obtaining up-and-down boundary coordinate and right boundary coordinate corresponding to each target character, can The coordinate of the central point of the rectangle determined by up-and-down boundary and right boundary, i.e., each target are calculated using simple geometric knowledge The centre coordinate of character.
S330, the centre coordinate for determining either objective character and the corresponding difference expected between coordinate are the first error.
Wherein, the centre coordinate of target character is actually to calculate obtained centre coordinate, and it can be default to expect coordinate Standard coordinate, or the centre coordinate of all target characters calculates obtained average coordinates in binary image.
It is preferred that, the centre coordinate and the corresponding difference expected between coordinate for determining either objective character are the first error, Including:The centre coordinate of target character in each binary image in binary image group determines fitting a straight line respectively; The corresponding expectation of either objective character is determined according to the center abscissa of either objective character in fitting a straight line and target character Center ordinate;Determine between the corresponding expectation center ordinate of either objective character and the center ordinate of either objective character Difference be the first error.
It is exemplary, in target image as shown in Figure 5, due to target character arrange point-blank, because This, in the binary image group that the target image is obtained after binary conversion treatment, a binary image may correspond to a plan Close straight line, so as to corresponding to the centre coordinate of each target character in binary image each central point determine on The fitting a straight line of centre coordinate.
Optionally, can be by the center of either objective character if fitting a straight line is the straight line for changing with ordinate and changing Ordinate substitutes into fitting a straight line and calculates the expectation center abscissa of the either objective character, and then determines the either objective character Difference between corresponding expectation center abscissa and the center abscissa of the either objective character is the first error.
The distance between S340, the centre coordinate for calculating either objective character and first object character centre coordinate, and It is the second error to determine the difference between distance and corresponding pre-determined distance.
Wherein, first object character is default reference character in target character.
It is preferred that, default reference character can be image first aim character from right to left, and pre-determined distance can be according to In the template image that priori is obtained between the centre coordinate of the centre coordinate of either objective character and first object character Distance.
Exemplary, the center of the centre coordinate and first object character of either objective character can be calculated by range formula The distance between coordinate, in target image as shown in Figure 5, because target character is in horizontally arranged, then can simply lead to Cross between the abscissa of center and make the difference to calculate the distance between two target characters.Special, if target character is exactly the first mesh Marking-up is accorded with, then distance is 0.
S350, according to the error of target character in each binary image and from binary-state threshold group targets threshold is determined, And binary conversion treatment is carried out to the target image according to targets threshold.
It is preferred that, determine target threshold according to the error of target character in each binary image and from binary-state threshold group Value, including:By the corresponding first error sum of each binary image, and/or, corresponding second error of each binary image Sum be defined as in each binary image the error of target character and;According to error and determine binary-state threshold group in minimum Error and corresponding binary-state threshold are targets threshold.
Exemplary, each binary image that target image as shown in Figure 5 is obtained after binary conversion treatment is included 6 target characters, then the corresponding first error sum of each binary image distinguished corresponding first by this 6 target characters Error sum, the corresponding second error sum of each binary image is distinguished corresponding second error by this 6 target characters Sum.Optionally, the error of target character and can be the first error sum in each binary image, or the second mistake Poor sum, preferably the first error sum plus the second error sum overall error and.When some binary image error and Value when being each error and the middle minimum value corresponding to binary image group, then can determine that the minimal error and corresponding two-value The binaryzation effect and the effect that reaches of expectation for changing image are closest, thus can by binary-state threshold group with minimal error and Corresponding binary-state threshold is defined as targets threshold, to improve the stability of binaryzation effect.Furthermore it is also possible to pass through increase The mode of error calculation method, takes the mistake between other characteristic values corresponding to binary image and other corresponding default characteristic values Poor sum be error and, to improve the accuracy of error judgment, and make it that the technical scheme of the present embodiment has scalability, from And the stability of binaryzation effect is further increased, reduce the influence of noise on image binaryzation effect.
The technical scheme of the present embodiment, by calculating the either objective word in binary image group in each binary image The centre coordinate of symbol, and then the first error and the second error are calculated according to the centre coordinate of each target character, finally can be according to meter The error of target character and targets threshold is determined from binary-state threshold group in obtained each binary image, it is using multiple Error and the mode of the corresponding targets threshold of acquisition that error summation is obtained, improve the accuracy of error judgment, so as to enter one Step improves the stability of binaryzation effect, reduces the influence of noise on image binaryzation effect.
Example IV
Fig. 4 is a kind of structural representation for image binaryzation processing unit that the embodiment of the present invention four is provided.The device can Situation suitable for carrying out binary conversion treatment to image, the device can be made up of hardware and/or software, and can typically be integrated in electricity In brain and all terminals comprising image binaryzation processing function.With reference to Fig. 4, image binaryzation processing unit includes:Image Processing module 410, error determination module 420 and threshold determination module 430, each module is specifically described below.
Image processing module 410, for being distinguished according to two or more binary-state thresholds in binary-state threshold group Binary conversion treatment is carried out to target image, binary image group is obtained;
Error determination module 420, for determining in the binary image group either objective word in each binary image Error between the characteristic value of symbol and corresponding default characteristic value;
Threshold determination module 430, for according to the error of target character in each binary image and from the binaryzation Sets of threshold values determines targets threshold, and carries out binary conversion treatment to the target image according to the targets threshold.
Optionally, also include:
Threshold value acquisition module, for right respectively according to two or more binary-state thresholds in binary-state threshold group Target image is carried out before binary conversion treatment, and initial threshold is obtained using Binarization methods to the target image;
Threshold adjustment module, for being adjusted centered on the initial threshold in setting interval, obtains binaryzation Sets of threshold values, wherein, the binary-state threshold group includes at least two binary-state thresholds.
Optionally, the threshold adjustment module specifically for:
According to formula:V=T-k × i, is adjusted to the initial threshold in interval [min (k × i), max (k × i)] It is whole, obtain binary-state threshold group;
Wherein, V is binary-state threshold, and T is the initial threshold, and k is zoom factor, and i is integer.
Optionally, error determination module 420 includes:
Centre coordinate calculating sub module, for calculating appointing in each binary image in the binary image group respectively The centre coordinate of one target character;
First error determination sub-module, for determine the centre coordinate of the either objective character with it is corresponding expect coordinate it Between difference be the first error;And/or,
Second error determination sub-module, centre coordinate and first object character for calculating the either objective character The distance between centre coordinate, and determine that the difference between the distance and corresponding pre-determined distance is the second error, wherein, it is described First object character is default reference character in the target character.
Optionally, the centre coordinate calculating sub module specifically for:
Determine the up-and-down boundary coordinate of each binary image in the binary image group respectively according to row projection;
Determine that each binary image is wrapped in the binary image group according to row projection and the up-and-down boundary coordinate The right boundary coordinate of the either objective character contained;
Each two-value in the binary image group is calculated according to the up-and-down boundary coordinate and the right boundary coordinate Change the centre coordinate for the either objective character that image is included.
Optionally, the centre coordinate calculating sub module is additionally operable to:
Each binary image institute in the binary image group is determined according to row projection and the up-and-down boundary coordinate Comprising either objective character right boundary coordinate after, according to the right boundary coordinate of the either objective character and row throw The whole up-and-down boundary coordinate of tone.
Optionally, the first error determination sub-module specifically for:
The centre coordinate of target character in each binary image in the binary image group determines to intend respectively Close straight line;
Appoint according to being determined the center abscissa of either objective character in the fitting a straight line and the target character The corresponding expectation center ordinate of one target character;
Determine the vertical seat in center of the corresponding expectation center ordinate of the either objective character and the either objective character Difference between mark is the first error.
Optionally, the threshold determination module 430 includes:
Error and determination sub-module, for by the corresponding first error sum of each binary image, and/or, institute State the corresponding second error sum of each binary image be defined as in each binary image the error of target character and;
Targets threshold determination sub-module, for according to the error and determine in the binary-state threshold group with minimal error It is targets threshold with corresponding binary-state threshold.
The said goods can perform the method that any embodiment of the present invention is provided, and possess the corresponding functional module of execution method And beneficial effect.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art it is various it is obvious change, Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also Other more Equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

1. a kind of image binaryzation processing method, it is characterised in that including:
Binary conversion treatment is carried out to target image according to two or more binary-state thresholds in binary-state threshold group respectively, Obtain binary image group;
Determine in the binary image group characteristic value of either objective character and corresponding default spy in each binary image Error between value indicative;
Targets threshold is determined according to the error of target character in each binary image and from the binary-state threshold group, and according to The targets threshold carries out binary conversion treatment to the target image.
2. according to the method described in claim 1, it is characterised in that according to two or more in binary-state threshold group Binary-state threshold is carried out to target image before binary conversion treatment respectively, is also included:
Initial threshold is obtained using Binarization methods to the target image;
It is adjusted centered on the initial threshold in setting interval, obtains binary-state threshold group, wherein, the binaryzation Sets of threshold values includes at least two binary-state thresholds.
3. method according to claim 2, it is characterised in that described interval interior in setting centered on the initial threshold It is adjusted, obtains binary-state threshold group, including:
According to formula:V=T-k × i, is adjusted to the initial threshold in interval [min (k × i), max (k × i)], Obtain binary-state threshold group;
Wherein, V is binary-state threshold, and T is the initial threshold, and k is zoom factor, and i is integer.
4. according to the method described in claim 1, it is characterised in that described to determine each binaryzation in the binary image group Error in image between the characteristic value of either objective character and corresponding default characteristic value, including:
The centre coordinate of the either objective character in the binary image group in each binary image is calculated respectively;
The centre coordinate and the corresponding difference expected between coordinate for determining the either objective character are the first error;And/or,
The distance between the centre coordinate of the either objective character and the centre coordinate of first object character are calculated, and determines institute It is the second error to state the difference between distance and corresponding pre-determined distance, wherein, the first object character is the target character In default reference character.
5. method according to claim 4, it is characterised in that described to calculate respectively each two in the binary image group The centre coordinate of either objective character in value image, including:
Determine the up-and-down boundary coordinate of each binary image in the binary image group respectively according to row projection;
Determine that each binary image in the binary image group is included according to row projection and the up-and-down boundary coordinate The right boundary coordinate of either objective character;
Each binary picture in the binary image group is calculated according to the up-and-down boundary coordinate and the right boundary coordinate The centre coordinate for the either objective character that picture is included.
6. method according to claim 5, it is characterised in that institute is being determined according to row projection and the up-and-down boundary coordinate State in binary image group after the right boundary coordinate for the either objective character that each binary image is included, also include:
The up-and-down boundary coordinate is adjusted according to the right boundary coordinate of the either objective character and row projection.
7. method according to claim 4, it is characterised in that the centre coordinate of the determination either objective character with The corresponding difference expected between coordinate is the first error, including:
The centre coordinate of target character in each binary image in the binary image group determines that fitting is straight respectively Line;
Any mesh is determined according to the center abscissa of either objective character in the fitting a straight line and the target character Marking-up accords with corresponding expectation center ordinate;
Determine the corresponding expectation center ordinate of the either objective character and the either objective character center ordinate it Between difference be the first error.
8. method according to claim 4, it is characterised in that the mistake of target character in each binary image of basis Difference and determine targets threshold from the binary-state threshold group, including:
By the corresponding first error sum of each binary image, and/or, each binary image corresponding second Error sum be defined as in each binary image the error of target character and;
According to the error and determine in the binary-state threshold group with minimal error and corresponding binary-state threshold to be target Threshold value.
9. a kind of image binaryzation processing unit, it is characterised in that including:
Image processing module, for according to two or more binary-state thresholds in binary-state threshold group respectively to target figure As carrying out binary conversion treatment, binary image group is obtained;
Error determination module, the feature for determining either objective character in each binary image in the binary image group Value and the error between corresponding default characteristic value;
Threshold determination module, for according to the error of target character in each binary image and true from the binary-state threshold group Set the goal threshold value, and carries out binary conversion treatment to the target image according to the targets threshold.
10. device according to claim 9, it is characterised in that the error determination module includes:
Centre coordinate calculating sub module, for calculating any mesh in the binary image group in each binary image respectively The centre coordinate of marking-up symbol;
First error determination sub-module, for determining between the centre coordinate of the either objective character and corresponding expectation coordinate Difference is the first error;And/or,
Second error determination sub-module, for calculating the centre coordinate of the either objective character and the center of first object character The distance between coordinate, and determine that the difference between the distance and corresponding pre-determined distance is the second error, wherein, described first Target character is default reference character in the target character.
CN201710186867.4A 2017-03-27 2017-03-27 Image binarization processing method and device Active CN106951902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710186867.4A CN106951902B (en) 2017-03-27 2017-03-27 Image binarization processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710186867.4A CN106951902B (en) 2017-03-27 2017-03-27 Image binarization processing method and device

Publications (2)

Publication Number Publication Date
CN106951902A true CN106951902A (en) 2017-07-14
CN106951902B CN106951902B (en) 2020-10-20

Family

ID=59473084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710186867.4A Active CN106951902B (en) 2017-03-27 2017-03-27 Image binarization processing method and device

Country Status (1)

Country Link
CN (1) CN106951902B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107958469A (en) * 2017-12-28 2018-04-24 北京安云世纪科技有限公司 A kind of scaling method of dual camera, device, system and mobile terminal
CN108629378A (en) * 2018-05-10 2018-10-09 上海鹰瞳医疗科技有限公司 Image-recognizing method and equipment
CN111180048A (en) * 2019-12-30 2020-05-19 上海研境医疗科技有限公司 Tumor component labeling method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059836A (en) * 2007-06-01 2007-10-24 华南理工大学 Human eye positioning and human eye state recognition method
CN101727756A (en) * 2008-10-16 2010-06-09 财团法人工业技术研究院 Mobile image-aided guidance method and mobile image-aided guidance system for vehicles
CN102059978A (en) * 2009-11-16 2011-05-18 财团法人工业技术研究院 Assisted method and system for driving
CN102193918A (en) * 2010-03-01 2011-09-21 汉王科技股份有限公司 Video retrieval method and device
CN103824066A (en) * 2014-03-18 2014-05-28 厦门翼歌软件科技有限公司 Video stream-based license plate recognition method
CN104008384A (en) * 2013-02-26 2014-08-27 山东新北洋信息技术股份有限公司 Character identification method and character identification apparatus
EP2645304A3 (en) * 2012-03-30 2015-03-25 Brother Kogyo Kabushiki Kaisha Image processing device determining binarizing threshold value
CN105354866A (en) * 2015-10-21 2016-02-24 郑州航空工业管理学院 Polygon contour similarity detection method
CN105469027A (en) * 2014-09-30 2016-04-06 柯尼卡美能达美国研究所有限公司 Horizontal and vertical line detection and removal for document images
CN106203251A (en) * 2015-05-29 2016-12-07 柯尼卡美能达美国研究所有限公司 File and picture binary coding method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059836A (en) * 2007-06-01 2007-10-24 华南理工大学 Human eye positioning and human eye state recognition method
CN101727756A (en) * 2008-10-16 2010-06-09 财团法人工业技术研究院 Mobile image-aided guidance method and mobile image-aided guidance system for vehicles
CN102059978A (en) * 2009-11-16 2011-05-18 财团法人工业技术研究院 Assisted method and system for driving
CN102193918A (en) * 2010-03-01 2011-09-21 汉王科技股份有限公司 Video retrieval method and device
EP2645304A3 (en) * 2012-03-30 2015-03-25 Brother Kogyo Kabushiki Kaisha Image processing device determining binarizing threshold value
CN104008384A (en) * 2013-02-26 2014-08-27 山东新北洋信息技术股份有限公司 Character identification method and character identification apparatus
CN103824066A (en) * 2014-03-18 2014-05-28 厦门翼歌软件科技有限公司 Video stream-based license plate recognition method
CN105469027A (en) * 2014-09-30 2016-04-06 柯尼卡美能达美国研究所有限公司 Horizontal and vertical line detection and removal for document images
CN106203251A (en) * 2015-05-29 2016-12-07 柯尼卡美能达美国研究所有限公司 File and picture binary coding method
CN105354866A (en) * 2015-10-21 2016-02-24 郑州航空工业管理学院 Polygon contour similarity detection method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107958469A (en) * 2017-12-28 2018-04-24 北京安云世纪科技有限公司 A kind of scaling method of dual camera, device, system and mobile terminal
CN108629378A (en) * 2018-05-10 2018-10-09 上海鹰瞳医疗科技有限公司 Image-recognizing method and equipment
CN111180048A (en) * 2019-12-30 2020-05-19 上海研境医疗科技有限公司 Tumor component labeling method, device, equipment and storage medium
CN111180048B (en) * 2019-12-30 2024-02-06 上海镜观生物科技有限公司 Tumor component labeling method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN106951902B (en) 2020-10-20

Similar Documents

Publication Publication Date Title
EP3021259B1 (en) Banknote recognition and classification method and system
CN109272016B (en) Target detection method, device, terminal equipment and computer readable storage medium
US8254644B2 (en) Method, apparatus, and program for detecting facial characteristic points
CN106960208A (en) A kind of instrument liquid crystal digital automatic segmentation and the method and system of identification
CN107103683B (en) Paper money identification method and device, electronic equipment and storage medium
CN103268481A (en) Method for extracting text in complex background image
CN107423735B (en) License plate positioning method utilizing horizontal gradient and saturation
CN102693535B (en) Method for detecting light bundling device area in DR image
CN106951902A (en) A kind of image binaryzation processing method and processing device
CN108009522A (en) A kind of Approach for road detection, device and terminal
CN107331031A (en) A kind of recognition methods of note denomination, device, equipment and storage medium
KR20200071853A (en) System and method for detecting and recognizing license plate
CN108197624A (en) The recognition methods of certificate image rectification and device, computer storage media
CN106920318A (en) The discrimination method and device of a kind of bank note
CN106447910B (en) A kind of method and device of paper money recognition
CN104573656B (en) A kind of car plate color determination methods based on connected region information
CN111047614A (en) Feature extraction-based method for extracting target corner of complex scene image
CN106886777B (en) Character boundary determining method and device
CN109961063B (en) Text detection method and device, computer equipment and storage medium
CN114554188A (en) Mobile phone camera detection method and device based on image sensor pixel array
CN108960222B (en) Image binarization method, device, equipment and storage medium
CN108073921B (en) Method and device for identifying banknote information
CN106251468B (en) A kind of paper money discrimination method and apparatus
CN110532947A (en) A kind of method and apparatus for going colour cast to handle for car test table
CN108230535B (en) Facing identification method and device for paper money

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant