CN106529543A - Method and system for dynamically calculating multi-color-grade binary adaptive threshold - Google Patents

Method and system for dynamically calculating multi-color-grade binary adaptive threshold Download PDF

Info

Publication number
CN106529543A
CN106529543A CN201610943723.4A CN201610943723A CN106529543A CN 106529543 A CN106529543 A CN 106529543A CN 201610943723 A CN201610943723 A CN 201610943723A CN 106529543 A CN106529543 A CN 106529543A
Authority
CN
China
Prior art keywords
level
gray value
polychrome
binaryzation
color
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
CN201610943723.4A
Other languages
Chinese (zh)
Other versions
CN106529543B (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.)
Foshan Guofang Software Technology Co ltd
Xu Qing
Foshan Guofang Identification Technology Co Ltd
Original Assignee
Foshan City China Side Trademark Software Co Ltd
Foshan Country Trademark Services 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 Foshan City China Side Trademark Software Co Ltd, Foshan Country Trademark Services Co Ltd filed Critical Foshan City China Side Trademark Software Co Ltd
Priority to CN201610943723.4A priority Critical patent/CN106529543B/en
Publication of CN106529543A publication Critical patent/CN106529543A/en
Application granted granted Critical
Publication of CN106529543B publication Critical patent/CN106529543B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a system for dynamically calculating a multi-color-grade binary adaptive threshold. Based on the statistical analysis of the relationship between the gray value of an input image and the number of pixels, color grade characteristics of the input image represented by the central gray value are obtained. The boundary gray value of different color grades is taken as the threshold of the similar color grade binary segmentation, so that the multi-color-grade binary adaptive threshold is obtained. With the technical scheme, the input image is subjected to binarization in the complicated condition that multiple gray scale color grades exist, the binarization effect of the multi-color-grade input image is effectively improved, color block characteristic information which completely reflect different color grades of the input image is obtained, and the color block segmentation of the image can be achieved according to the color grade, so that the image characteristic description is enriched, and the demands of image analysis can be widely met.

Description

A kind of method and its system of dynamic calculation polychrome level binaryzation adaptive threshold
Technical field
The present invention relates to a kind of image binaryzation processing method, more particularly to a kind of dynamic calculation polychrome level binaryzation The method and its system of adaptive threshold.
Background technology
Image binaryzation is exactly that the gray value of the pixel on image is set to 0 or 255, that is, by whole image is in Reveal obvious black and white effect.The binaryzation of image is conducive to the further process of image, makes image become simple, and data Amount reduces, and can highlight the profile of target interested.Traditional binarization method such as/kittler algorithms, are a kind of quick Global thresholding, or average-histogram method, is characterized in that overall binaryzation.For the image of various gray levels is difficult to show not With the profile of the target of grayscale image, the central idea of traditional binarization method is to calculate the gradient gray scale of entire image Meansigma methodss, with this meansigma methods as threshold value, can apply in the pretty good environment of picture quality.But at the continuous image of batch In reason, when there are the complex situations such as the image of polychrome level gray color level in the face of various images, using produced by single threshold value Binaryzation can not completely reflect the feature of image.Though traditional binarization method has for global and local, they assess The whether suitable standard of threshold value or foundation are the meansigma methodss of gray scale.And using single average gray as the evaluation criteria of threshold value Have following defect and drawback:
1st, the meansigma methodss of gray scale only reflect the brightness of image or the average depth degree of color, but differ surely directly reflect for User image object pixel interested and its contour feature for being constituted.
2nd, impact must be produced on the binary conversion treatment of the pixel of other gray values using the meansigma methodss of arbitrary gray scale, is made The omission of imaging vegetarian refreshments characteristic information.
3rd, existing image binaryzation processing method, when the gray level for image occur is more, traditional image binaryzation Processing method is difficult to find out by user image object pixel interested and its contour feature for constituting.
Such as patent CN105118067A, entitled:A kind of image partition method based on Gaussian smoothing filter, it is open following Technical characteristic(Referring in full):Step 1, count histogrammic first trough average T0 of N number of infrared image;With gray level it is Rectangular histogram abscissa, the number of times that each gray level occurs count the gray scale of each infrared image as histogrammic vertical coordinate Rectangular histogram, finds the gray value Troughi of first trough of grey level histogram, and the gray value to all first troughs It is averaged and is designated as T0;T0=ΣTroughi/N;Step 2, calculating adaptivenon-uniform sampling threshold θ;2-1 passes through first trough average T0 Calculate weighting function Fwtd=α (T1-T0);Wherein T1 is assembly average of the gray value higher than T0, specifically:, α is to finely tune the factor, 0.9 < α < 1.1;2-2 scans all gray levels, obtains and meets inter-class variance maximum Segmentation threshold θ σ during change;2-3 calculates adaptivenon-uniform sampling threshold θ=θ σ+Fwtd;Step 3, use adapt to segmentation threshold θ pair Image to be split carries out binary conversion treatment;3-1 scans all pixels point, if the gray level of pixel is more than θ, gray level is put For 1, now pixel of the pixel for foreground target suspicious region;If the gray level of pixel is less than or equal to θ, gray scale Level is set to 0, and now the pixel is background pixel point, and result now is designated as RSegmentation;It is step 4, right RSegmentation carries out floor projection integration and upright projection integral analysis, filters the less focus interference of area.The patent Only disclose the image binaryzation method based on single threshold value, it is impossible to solve the defect and drawback of single threshold value presence.
And for example patent CN104952060A, entitled:A kind of infrared pedestrian's area-of-interest adaptivenon-uniform sampling extracting method, Including following technical characteristic(Referring in full):Step 4, to take be Global thresholding, only complete using one in binarization The method of office's threshold value T, the gray value of each pixel of image is compared by it with T, if being more than T, is taken as foreground;It is no Then, it is taken as background colour;Step 5, using the most center point Ps of respective pixel number in L grey level range as initial classes mean μ 1 (1),μ2(2), …,μl(l);Step 6, in ith iteration, investigate each pixel, calculate its average with each gray level Between spacing, i.e., it with cluster centre apart from D, each pixel is assigned into the average class nearest away from which, i.e. D | xp- μ l (i) |= Min D | xp- μ j (i) |, (j=1,2 ... l) }, D is that two pixel grey scale value differences are less than determining deviation;Xp (p=0,1 ..., 255) For the gray value of pixel;Then for the collection of pixels of class j is assigned to after ith iteration;Step 7, for j=1,2 ... l, calculate it is new Cluster centre, updates class average:μ j ( i + 1 ) = 1 / N j Σ x ∈Q j (i) x p, formula In, Nj be in number of pixels;Step 8, all pixels are investigated one by one, if j=1,2 ... K have then algorithmic statement, knot Beam;Otherwise return to step 6 continues next iteration;After step 9, above cluster process terminate, each pixel of segmentation result is with poly- Class center gray value is used as such final gray scale.The patent cannot also solve the input picture of polychrome level to be carried out at image binaryzation The omission problem of pixel characteristic information during reason.
Therefore, prior art has yet to be improved and developed.
The content of the invention
It is an object of the invention to provide the method and its system of a kind of dynamic calculation polychrome level binaryzation adaptive threshold, When aiming to solve the problem that the input picture of polychrome level carries out image binaryzation process, it is difficult to overcome pixel feature using traditional method The omission problem of information, when the gray level for image occur is more, traditional image binaryzation processing method is difficult to find out to make The defect of user's image object pixel interested and its contour feature for being constituted.
Technical scheme is as follows:A kind of method of dynamic calculation polychrome level binaryzation adaptive threshold, wherein, institute Polychrome level is stated for three or three with level of painting, following steps are specifically included:
Step S110:Extract the gray value of input image pixels point and obtain the center of each same or like color level of input picture Gray value;
Step S120:According to the center gray value of acquired color level and press the ash of the border between the not homochromy level of preset formula dynamic calculation Threshold value of the angle value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, comprise the following steps:
Step S210:Extract the gray value of input image pixels point and the gray value that pixel in background colour level is most concentrated is carried out Light color process, i.e., to pixel gray value in background colour level be not 255 or be not maximum input image pixels point gray value Do inverse process;
Step S220:The gray value of analysis input image pixels point and the relation of pixel quantity, obtain input picture each identical Or the center gray value of close color level;
Step S230:According to the center gray value of acquired color level and press the ash of the border between the not homochromy level of preset formula dynamic calculation Threshold value of the angle value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, described same or like color Level refers to the same or like pixel point set of the attribute of the gray value of input image pixels point;Described same or like color level Center gray value refer to gray value that pixel quantity in the same or like scope of the attribute of gray value at most or is most concentrated.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, described polychrome level binaryzation is The gray value that the gray value of all pixels point on input picture is set to background colour level is set to 255 by finger, its allochromatic colour level Gray value is set to the center gray value of the color level or the color level image segmentation is out set to 0 afterwards.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, it is described to obtain each phase of input picture The center gray value of same or close color level, specifically includes following steps:
Step S221:Each gray value pixel number in the input image is counted, the pass of gray value and pixel quantity is analyzed System;
Step S222:Find out crest gray value;
Step S223:Whether the crest gray value acquired in checking step S222 falls into the interval range of default gray scale length and is The default trough pixel number of maximum crest gray value, will fall into crest gray value maximum in the range of default gray scale length of interval And the pixel number of the crest gray value is considered as center gray value more than the crest gray value of default trough pixel number;
Step S224:Center gray value corresponding to per level number of the same colour is recorded into into data set.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, default gray scale length refers to basis Application demand and the same or like interval range parameter of gray value that pre-sets, preset gray scale length interval comprising the color level The gray value length of minimum gradation value to maximum gradation value;Default trough pixel number is referred to according to application demand and is pre-set The range parameter of pixel number that should concentrate of same gray value.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, the default gray scale length takes Value between 10 to 125, preset the value of trough pixel number between input image pixels point sum 0.1% to 10% it Between.
The method of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, described dynamic calculation obtains many The preset formula of color level binaryzation adaptive threshold includes:
Tn=An·core +(B n·core -A n·core )/2
Wherein, TnRepresent the self-adaption binaryzation threshold value of n-th color level in addition to background colour level, An·coreRepresent in addition to background colour level The center gray value of n-th color level, B n·coreRepresent the upper level center gray value of n-th color level in addition to background colour level.
A kind of system of the method for the dynamic calculation polychrome level binaryzation adaptive threshold using as described in above-mentioned any one, Wherein, including:
Gray value module is extracted, for extracting the gray value of input image pixels point;
Se Ji centers gray value module is obtained, for the relation by statistical analysiss input picture gray value and pixel quantity, Obtain the center gray value of each same or like color level of input picture;
Calculate and obtain polychrome level binaryzation adaptive threshold module, polychrome level binaryzation is obtained for pressing preset formula dynamic calculation Adaptive threshold.
The system of described dynamic calculation polychrome level binaryzation adaptive threshold, wherein, including:
Gray value module is extracted, for extracting the gray value of input image pixels point;
Inverse processing module, and be not the input image pixels of 255 or maximum to the gray value that pixel on sideline is most concentrated Point gray value does inverse process;
Se Ji centers gray value module is obtained, for the relation by statistical analysiss input picture gray value and pixel quantity, Obtain the center gray value of each same or like color level of input picture;
Calculate and obtain polychrome level binaryzation adaptive threshold module, polychrome level binaryzation is obtained for pressing preset formula dynamic calculation Adaptive threshold.
Beneficial effects of the present invention:The present invention is by providing a kind of side of dynamic calculation polychrome level binaryzation adaptive threshold Method and its system, by counting each gray value pixel number in the input image, analyze gray value with pixel quantity Relation, finds out crest gray value, will fall into crest gray value maximum in the range of default gray scale length of interval and the crest gray scale The pixel number of value is considered as center gray value more than the crest gray value of default trough pixel number, then by acquired color level Heart gray value simultaneously presses the boundary gray value between the not homochromy level of preset formula dynamic calculation as the threshold of phase advancing coloud nearside level binarization segmentation Value, so as to obtain the binaryzation adaptive threshold of polychrome level.Using the binaryzation adaptive threshold of polychrome level of the present invention, Being capable of effective polychrome level(I.e. three or three with level of painting)Input picture carry out image binaryzation process when, using traditional Method is difficult to the omission problem for overcoming pixel characteristic information, is difficult to overcome using the binarization method produced by single threshold value The omission problem of pixel characteristic information, when the gray level for image occur is more, remain to effectively to find out for user it is interested Image object pixel and its contour feature for being constituted, improve polychrome level input picture binary conversion treatment effect.
Description of the drawings
Fig. 1 is a kind of schematic flow sheet one of the method for dynamic calculation polychrome level binaryzation adaptive threshold in the present invention.
Fig. 2 is a kind of schematic flow sheet two of the method for dynamic calculation polychrome level binaryzation adaptive threshold in the present invention.
Fig. 3 a are to provide exemplary image artwork 1 at random.
Fig. 3 b are to provide exemplary image artwork 2 at random.
Fig. 3 c are to provide exemplary image artwork 3 at random.
Fig. 4 is the gray value statistical table of Fig. 3 a example images pixels.
Fig. 5 is the relation statistical table of Fig. 3 a example images gray values and pixel quantity.
Fig. 6 is the relation cartogram of Fig. 3 a example images gray values and pixel quantity.
Fig. 7 is the combination polychrome level binary picture of Fig. 3 a example images.
Fig. 8 a to Fig. 8 d are the segmentation polychrome level binary pictures of Fig. 3 a example images.
Fig. 9 is the combination polychrome level binary picture of Fig. 3 b example images.
Figure 10 a to Figure 10 b are the segmentation polychrome level binary pictures of Fig. 3 b example images.
Figure 11 is a kind of structural representation one of the system of dynamic calculation polychrome level binaryzation adaptive threshold in the present invention.
Figure 12 is a kind of structural representation two of the system of dynamic calculation polychrome level binaryzation adaptive threshold in the present invention.
Specific embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings The present invention is further described.
As shown in figure 1, a kind of method of dynamic calculation polychrome level binaryzation adaptive threshold, specifically includes following steps:
Step S110:Extract the gray value of input image pixels point and obtain the center of each same or like color level of input picture Gray value;
Step S120:According to the center gray value of acquired color level and press the ash of the border between the not homochromy level of preset formula dynamic calculation Threshold value of the angle value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
As shown in Fig. 2 for some need to do the image of inverse process, a kind of dynamic calculation polychrome level binaryzation self adaptation The method of threshold value is comprised the following steps:
Step S210:Extract the gray value of input image pixels point and the gray value that pixel in background colour level is most concentrated is carried out Light color process, i.e., to pixel gray value in background colour level be not 255 or be not maximum input image pixels point gray value Do inverse process;
Step S220:The gray value of analysis input image pixels point and the relation of pixel quantity, obtain input picture each identical Or the center gray value of close color level;
Step S230:According to the center gray value of acquired color level and press the ash of the border between the not homochromy level of preset formula dynamic calculation Threshold value of the angle value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
Above steps is specifically described below based on specific embodiment:
The first step, extracts the gray value of input image pixels point.
In actual applications, by computer equipment, the mobile phone for having camera function, photographing unit, photographic head or other have shooting Or the input picture that the equipment of storage image is obtained, can be used for the process object of the embodiment of the present invention.
Fig. 3 a and Fig. 3 b provides some images at random.The artwork of these images is with the different gray scales of three or more than three Color level, can be used as the process object of the embodiment of the present invention, i.e. input picture.Each input picture all has the feature of gray scale, ash The scope of angle value is 0~255, represents brightness from depth to shallow, and the color in correspondence image is that, from black to white, each pixel value is One kind in 256 kinds of gray scales between black and white.The each pixel of input picture is extracted with known technology Gray value.
Fig. 4 is the gray value statistical table of Fig. 3 a example images local pixel points.
Second step, carries out light process to the gray value that pixel in background colour level is most concentrated.
In actual applications, light color can be carried out to the gray value that pixel in background colour level is most concentrated according to application demand Process, i.e., be not 255 to pixel gray value in background colour level or be not that the input image pixels point gray value of maximum does instead Color process;To pixel gray value in background colour level can also not be 255 or be not maximum input image pixels point gray scale Value does not do inverse process.In actual applications, in order to realize the standardization of background colour level, generally by the back of the body of input picture Scenery unification is set as white or most light, naturally it is also possible to which background colour is set as black or most dark.
It is not 255 to pixel gray value in background colour level or is not that the input image pixels point gray value of maximum does instead Color process method be:
The gray value of preimage vegetarian refreshments result of calculation as follows is entered into line replacement:
Gray value after inverse(Or the gray value being replaced into)=255- former ash angle value
Jing after inverse process, remain the background colour of input picture white or most light.
3rd step, analyzes the gray value of input image pixels point and the relation of pixel quantity, obtains each phase of input picture The center gray value of same or close color level.
The most basic unit key element of composition image is pixel, and each pixel can be considered as a unit spot, also known as pixel Point.There is between pixel and pixel line segment relation, the line of limited pixel is exactly pixel dotted line in particular directions Section.The image that the set of pixel line segment is constituted.
Each pixel all has the attribute of gray value, and same or like color level is typically identical by gray scale value attribute Or close pixel point set is constituted.The most gray value of pixel quantity in the same or like scope of attribute is claimed by we For the center gray value of the same or like color level(Center gray value refers to the ash that the color level can be most represented in certain level of the same colour The gray value of degree feature, in a certain specific region of the same or like scope of attribute for referring generally to gray value, pixel quantity is most Or the gray value most concentrated), the same or like interval range of gray value is referred to as gray scale length(Gray scale length is referred to a certain Se Jizhongyi centers gray value is basic point, does not change the depth excursion of the gray value of same or like attribute, including the phase The gray-value variation length of the minimum gradation value to maximum gradation value of same or close color level).
By statistical analysiss input picture gray value and the relation of pixel quantity, Se Ji centers gray value can be obtained, Comprise the following steps that:
Step S221, counts each gray value pixel number in the input image, analyzes the pass of gray value and pixel quantity System.
The pixel number of each gray value of statistics input picture, produces the relation number of each gray value and pixel quantity According to.Fig. 5 is the relation statistical table of Fig. 3 a example images gray values and pixel quantity.Fig. 6 is Fig. 3 a example images gray scales The relation cartogram of value and pixel quantity.
Step S222, finds out crest gray value.
The pixel number of more each gray value and neighbor grayscale value is checked, the pixel number than neighbor grayscale value all many Gray value be considered as crest gray value, otherwise, be not crest gray value.If the pixel number of left neighbor grayscale value is adjacent with the right side The pixel number of gray value is equal and pixel number of than secondary neighbor grayscale value is all more, and this adjacent 2 points or multiple spot are collectively treated as Crest gray value, otherwise, is not crest gray value.
Step S223, during the crest gray value for falling into the scope of default gray scale length and default trough pixel number is considered as Heart gray value.
Default gray scale length refers to the same or like interval range ginseng of the gray value pre-set according to application demand Number, comprising natural grade minimum gradation value to the gray value length between natural grade maximum gradation value, presets the value of gray scale length Between 10 to 125;Or with natural grade center gray value as basic point, general natural grade minimum gradation value natural grade center ash Angle value -5, value in the range of natural grade maximum gradation value+5(If natural grade center gray value is 70, then natural grade is minimum grey Angle value 65, natural grade maximum gradation value 75).
Default trough pixel number refers to the pixel that the same gray value pre-set according to application demand should be concentrated In advance the range parameter of points, preset the trough pixel number value typically in the range of 10% less than the total pixel number of image, i.e., If trough pixel number<The total pixel number * of image 10%.It is default whether the crest gray value acquired in checking step S222 falls into The scope of gray scale length and default trough pixel number, by default gray scale length and more than the ripple of default trough pixel number Peak gray value is considered as center gray value.
Center gray value corresponding to per level number of the same colour is recorded into data set by step S224.
To be numbered after size sequence of the acquired center gray value by gray value, each numbering represents a color Level, the center gray value corresponding to per level number of the same colour is recorded as array.
It is ± 10 that table 1 lists Fig. 3 a example images and falls into default gray scale length and default trough pixel number scope is Center gray value corresponding to 3% color level number:
Color level number Center gray value
1 255
2 222
3 128
4 64
5 0
Table 1
4th step, according to the center gray value of acquired color level and presses the boundary intensity between the not homochromy level of preset formula dynamic calculation It is worth the threshold value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
Specifically, traditional image binaryzation substantially just refers to the binaryzation of single image, will be all on input picture The gray value of pixel is set to 0 or 255, that is, whole input picture is presented obvious black and white effect.Traditional figure As binaryzation cannot be solved when input picture occur and there are the complex situations such as the image of multi-stage grey scale color level using single threshold Binaryzation effect produced by value can not completely reflect a difficult problem for the feature of image.And adopt polychrome level binaryzation adaptive threshold The binaryzation of assorted level is carried out respectively can, the whole figure of effectively solving can not be complete using the binaryzation effect produced by single threshold value A difficult problem for the feature of reflection image.
The key for determining polychrome level binaryzation adaptive threshold is the segmentation for finding out background colour level respectively with other polychrome levels Threshold value, i.e., when the gray value of the background colour level on input picture is set to 255, and its allochromatic colour level gray value is then set to the color Level center gray value is 0 or the color level image segmentation is out set to 0 afterwards, that is, whole input picture is presented substantially The distinct effect of color level segmentation.
Generally, center of maximum gray value(I.e.:255 gray value or closest to 255 gray value)For background colour The center gray value of level.
Background colour level can be calculated using following preset formula with the segmentation threshold of other many color lumps or gray level respectively and be obtained Take:
Tn=An·core +(B n·core -A n·core )/2
Wherein, TnRepresent the self-adaption binaryzation threshold value of n-th color level in addition to background colour level, An·coreRepresent in addition to background colour level The center gray value of n-th color level, B n·coreRepresent the upper level center gray value of n-th color level in addition to background colour level.
By taking Fig. 3 a example images as an example, to according to each color lump number for having been obtained in step S220(Or color level number)Institute is right The center gray value answered substitutes into formula 1 and is calculated, and obtains the self-adaption binaryzation threshold value in addition to background colour level:
Self-adaption binaryzation threshold calculations in Fig. 3 a example images in addition to background colour level are as follows:
The self-adaption binaryzation threshold value of the 1st color level:
T1=222+(255-222)/2=239;
The self-adaption binaryzation threshold value of the 2nd color level:
T2=128+(222-128)/2=175;
The self-adaption binaryzation threshold value of the 3rd color level:
T3=64+(128-64)/2=96;
The self-adaption binaryzation threshold value of the 4th color level:
T4=0+(64-0)/2=32.
Fig. 7 is the combination polychrome level binary picture of Fig. 3 a example images.
Fig. 8 a to Fig. 8 d are the segmentation polychrome level binary pictures of Fig. 3 a example images.
Fig. 9 is the combination polychrome level binary picture of Fig. 3 b example images.
Figure 10 a to Figure 10 b are the segmentation polychrome level binary pictures of Fig. 3 b example images.
In an embodiment of the present invention, according to acquired polychrome level adaptation binary-state threshold, outstanding level can be produced The multistage color lump figure of the input picture of the distinct effect of segmentation, during for image outline line feature extraction, effectively increases profile special What reference ceased puies forward quasi- rate.
A kind of system of the method using dynamic calculation polychrome level binaryzation adaptive threshold as described above, including:
Gray value module is extracted, for extracting the gray value of input image pixels point;
Se Ji centers gray value module is obtained, for the relation by statistical analysiss input picture gray value and pixel quantity, Obtain the center gray value of each same or like color level of input picture;
Calculate and obtain polychrome level binaryzation adaptive threshold module, polychrome level binaryzation is obtained for pressing preset formula dynamic calculation Adaptive threshold.
Figure 11 is a kind of system structure diagram one of dynamic calculation polychrome level binaryzation adaptive threshold.
When some images need inverse to process, a kind of system bag of dynamic calculation polychrome level binaryzation adaptive threshold Include:
Gray value module is extracted, for extracting the gray value of input image pixels point;
Inverse processing module, and be not the input image pixels of 255 or maximum to the gray value that pixel on sideline is most concentrated Point gray value does inverse process;
Se Ji centers gray value module is obtained, for the relation by statistical analysiss input picture gray value and pixel quantity, Obtain the center gray value of each same or like color level of input picture;
Calculate and obtain polychrome level binaryzation adaptive threshold module, polychrome level binaryzation is obtained for pressing preset formula dynamic calculation Adaptive threshold.
Figure 12 is a kind of system structure diagram two of dynamic calculation polychrome level binaryzation adaptive threshold.
Embodiment described above is illustrated by one by one to input picture gray value and the statistics of the relation of pixel quantity Analysis, obtains the color level feature with center gray value as the form of expression for input picture, with the boundary intensity of not homochromy level It is worth the threshold value as phase advancing coloud nearside level binarization segmentation, so as to obtain the binaryzation adaptive threshold of polychrome level.
Using the polychrome level binaryzation adaptive threshold method and its system of the present invention, can there is ash more to input picture The complex situations such as the image of degree color level carry out the process of binaryzation, effectively improve the binary conversion treatment effect of polychrome level input picture Really, and the color lump characteristic information of the not homochromy level of complete reflection input picture is obtained, overcomes the input picture of multi-grey level to carry out figure During as binary conversion treatment, it is difficult to find out by user image object pixel interested and its constitute using traditional method Not homochromy level color lump characteristic information defect.Using the present invention polychrome level binaryzation adaptive threshold method and its be System, additionally it is possible to realize that image is carried out the partition of color lump by color level, the description of rich image feature is easy to broadly meet image point The needs of analysis.
It should be appreciated that above example only expresses the several embodiments of the present invention, its description it is more concrete and Therefore in detail, but the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that to those of ordinary skill in the art For, without departing from the inventive concept of the premise, some deformations, derivation can also be made, is improved or is converted, it is all these The protection domain of claims of the present invention should all be belonged to.

Claims (10)

1. a kind of method of dynamic calculation polychrome level binaryzation adaptive threshold, it is characterised in that the polychrome level be three or Three, with level of painting, specifically include following steps:
Step S110:Extract the gray value of input image pixels point and obtain the center of each same or like color level of input picture Gray value;
Step S120:According to the center gray value of acquired color level and press the ash of the border between the not homochromy level of preset formula dynamic calculation Threshold value of the angle value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
2. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 1, it is characterised in that include Following steps:
Step S210:Extract the gray value of input image pixels point and the gray value that pixel in background colour level is most concentrated is carried out Light color process, i.e., to pixel gray value in background colour level be not 255 or be not maximum input image pixels point gray value Do inverse process;
Step S220:The gray value of analysis input image pixels point and the relation of pixel quantity, obtain input picture each identical Or the center gray value of close color level;
Step S230:According to the center gray value of acquired color level and press the ash of the border between the not homochromy level of preset formula dynamic calculation Threshold value of the angle value as phase advancing coloud nearside level binarization segmentation, to obtain polychrome level binaryzation adaptive threshold.
3. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 2, it is characterised in that described Same or like color level refer to the same or like pixel point set of the attribute of the gray value of input image pixels point;Described The center gray value of same or like color level refers in the same or like scope of the attribute of gray value pixel quantity at most or most The gray value of concentration.
4. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 2, it is characterised in that described Polychrome level binaryzation refer to by the gray value of all pixels point on input picture be set to background colour level gray value arrange For 255, the gray value of its allochromatic colour level is set to the center gray value of the color level or is out set to the color level image segmentation afterwards 0。
5. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 2, it is characterised in that described The center gray value of each same or like color level of input picture is obtained, following steps are specifically included:
Step S221:Each gray value pixel number in the input image is counted, the pass of gray value and pixel quantity is analyzed System;
Step S222:Find out crest gray value;
Step S223:Whether the crest gray value acquired in checking step S222 falls into the interval range of default gray scale length and is The default trough pixel number of maximum crest gray value, will fall into crest gray value maximum in the range of default gray scale length of interval And the pixel number of the crest gray value is considered as center gray value more than the crest gray value of default trough pixel number;
Step S224:Center gray value corresponding to per level number of the same colour is recorded into into data set.
6. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 5, it is characterised in that default Gray scale length refers to the same or like interval range parameter of the gray value pre-set according to application demand, presets gray scale long Gray value length of the degree comprising the color level interval minimum gradation value to maximum gradation value;Default trough pixel number refers to that basis should The range parameter of the pixel number that the same gray value pre-set with demand should be concentrated.
7. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 6, it is characterised in that described Between 10 to 125, the value for presetting trough pixel number is total between input image pixels point for the value of default gray scale length Between several 0.1% to 10%.
8. the method for dynamic calculation polychrome level binaryzation adaptive threshold according to claim 2, it is characterised in that described Dynamic calculation obtain polychrome level binaryzation adaptive threshold preset formula include:
Tn=An·core +(B n·core -A n·core )/2
Wherein, TnRepresent the self-adaption binaryzation threshold value of n-th color level in addition to background colour level, An·coreRepresent in addition to background colour level The center gray value of n-th color level, B n·coreRepresent the upper level center gray value of n-th color level in addition to background colour level.
9. a kind of method of the dynamic calculation polychrome level binaryzation adaptive threshold using as described in any one of claim 1-8 System, it is characterised in that include:
Gray value module is extracted, for extracting the gray value of input image pixels point;
Se Ji centers gray value module is obtained, for the relation by statistical analysiss input picture gray value and pixel quantity, Obtain the center gray value of each same or like color level of input picture;
Calculate and obtain polychrome level binaryzation adaptive threshold module, polychrome level binaryzation is obtained for pressing preset formula dynamic calculation Adaptive threshold.
10. the system of dynamic calculation polychrome level binaryzation adaptive threshold according to claim 9, it is characterised in that bag Include:
Gray value module is extracted, for extracting the gray value of input image pixels point;
Inverse processing module, and be not the input image pixels of 255 or maximum to the gray value that pixel on sideline is most concentrated Point gray value does inverse process;
Se Ji centers gray value module is obtained, for the relation by statistical analysiss input picture gray value and pixel quantity, Obtain the center gray value of each same or like color level of input picture;
Calculate and obtain polychrome level binaryzation adaptive threshold module, polychrome level binaryzation is obtained for pressing preset formula dynamic calculation Adaptive threshold.
CN201610943723.4A 2016-11-02 2016-11-02 A kind of dynamic calculates the method and its system of polychrome grade binaryzation adaptive threshold Active CN106529543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610943723.4A CN106529543B (en) 2016-11-02 2016-11-02 A kind of dynamic calculates the method and its system of polychrome grade binaryzation adaptive threshold

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610943723.4A CN106529543B (en) 2016-11-02 2016-11-02 A kind of dynamic calculates the method and its system of polychrome grade binaryzation adaptive threshold

Publications (2)

Publication Number Publication Date
CN106529543A true CN106529543A (en) 2017-03-22
CN106529543B CN106529543B (en) 2018-09-11

Family

ID=58293351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610943723.4A Active CN106529543B (en) 2016-11-02 2016-11-02 A kind of dynamic calculates the method and its system of polychrome grade binaryzation adaptive threshold

Country Status (1)

Country Link
CN (1) CN106529543B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107564015A (en) * 2017-08-24 2018-01-09 佛山市国方商标软件有限公司 A kind of segmentation and labeling method and device based on polychrome level image connectivity domain
CN107705314A (en) * 2017-11-01 2018-02-16 齐鲁工业大学 A kind of more subject image dividing methods based on intensity profile
CN110490847A (en) * 2019-07-31 2019-11-22 浙江大学山东工业技术研究院 The LED chip quality determining method of view-based access control model
CN110991437A (en) * 2019-11-28 2020-04-10 北京嘉楠捷思信息技术有限公司 Character recognition method and device, and training method and device of character recognition model
CN111275049A (en) * 2020-01-19 2020-06-12 佛山市国方识别科技有限公司 Method and device for acquiring character image skeleton feature descriptors
CN112215781A (en) * 2020-10-29 2021-01-12 杭州金衡和信息科技有限公司 Improved local binarization method
CN112288754A (en) * 2020-11-09 2021-01-29 珠海市润鼎智能科技有限公司 Real-time binarization threshold value selection method for high-speed image

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0499875A1 (en) * 1991-02-19 1992-08-26 Dainippon Screen Mfg. Co., Ltd. Method of and apparatus for obtaining binary image
CN1797428A (en) * 2004-12-23 2006-07-05 佳能株式会社 Method and device for self-adaptive binary state of text, and storage medium
CN101042735A (en) * 2006-03-23 2007-09-26 株式会社理光 Image binarization method and device
CN101114341A (en) * 2007-01-17 2008-01-30 永凯软件技术(上海)有限公司 Preprocess method for engineering drawing vectorization recognition system
CN101170641A (en) * 2007-12-05 2008-04-30 北京航空航天大学 A method for image edge detection based on threshold sectioning
CN101329733A (en) * 2007-06-21 2008-12-24 上海北控智能科技有限公司 Image binaryzation method
CN101398894A (en) * 2008-06-17 2009-04-01 浙江师范大学 Automobile license plate automatic recognition method and implementing device thereof
CN101621615A (en) * 2009-07-24 2010-01-06 南京邮电大学 Self-adaptive background modeling and moving target detecting method
CN104050472A (en) * 2014-06-12 2014-09-17 浙江工业大学 Self-adaptation global threshold method for gray level image binaryzation

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0499875A1 (en) * 1991-02-19 1992-08-26 Dainippon Screen Mfg. Co., Ltd. Method of and apparatus for obtaining binary image
CN1797428A (en) * 2004-12-23 2006-07-05 佳能株式会社 Method and device for self-adaptive binary state of text, and storage medium
CN101042735A (en) * 2006-03-23 2007-09-26 株式会社理光 Image binarization method and device
CN101114341A (en) * 2007-01-17 2008-01-30 永凯软件技术(上海)有限公司 Preprocess method for engineering drawing vectorization recognition system
CN101329733A (en) * 2007-06-21 2008-12-24 上海北控智能科技有限公司 Image binaryzation method
CN101170641A (en) * 2007-12-05 2008-04-30 北京航空航天大学 A method for image edge detection based on threshold sectioning
CN101398894A (en) * 2008-06-17 2009-04-01 浙江师范大学 Automobile license plate automatic recognition method and implementing device thereof
CN101621615A (en) * 2009-07-24 2010-01-06 南京邮电大学 Self-adaptive background modeling and moving target detecting method
CN104050472A (en) * 2014-06-12 2014-09-17 浙江工业大学 Self-adaptation global threshold method for gray level image binaryzation

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107564015A (en) * 2017-08-24 2018-01-09 佛山市国方商标软件有限公司 A kind of segmentation and labeling method and device based on polychrome level image connectivity domain
CN107705314A (en) * 2017-11-01 2018-02-16 齐鲁工业大学 A kind of more subject image dividing methods based on intensity profile
CN107705314B (en) * 2017-11-01 2020-07-21 齐鲁工业大学 Multi-object image segmentation method based on gray level distribution
CN110490847A (en) * 2019-07-31 2019-11-22 浙江大学山东工业技术研究院 The LED chip quality determining method of view-based access control model
CN110490847B (en) * 2019-07-31 2022-05-06 浙江大学山东工业技术研究院 LED chip quality detection method based on vision
CN110991437A (en) * 2019-11-28 2020-04-10 北京嘉楠捷思信息技术有限公司 Character recognition method and device, and training method and device of character recognition model
CN110991437B (en) * 2019-11-28 2023-11-14 嘉楠明芯(北京)科技有限公司 Character recognition method and device, training method and device for character recognition model
CN111275049B (en) * 2020-01-19 2023-07-21 佛山市国方识别科技有限公司 Method and device for acquiring text image skeleton feature descriptors
CN111275049A (en) * 2020-01-19 2020-06-12 佛山市国方识别科技有限公司 Method and device for acquiring character image skeleton feature descriptors
CN112215781A (en) * 2020-10-29 2021-01-12 杭州金衡和信息科技有限公司 Improved local binarization method
CN112215781B (en) * 2020-10-29 2022-07-12 杭州金衡和信息科技有限公司 Improved local binarization method
CN112288754A (en) * 2020-11-09 2021-01-29 珠海市润鼎智能科技有限公司 Real-time binarization threshold value selection method for high-speed image
CN112288754B (en) * 2020-11-09 2023-12-05 珠海市润鼎智能科技有限公司 Real-time binarization threshold selection method for high-speed image

Also Published As

Publication number Publication date
CN106529543B (en) 2018-09-11

Similar Documents

Publication Publication Date Title
CN106529543A (en) Method and system for dynamically calculating multi-color-grade binary adaptive threshold
CN101042735B (en) Image binarization method and device
DE60132315T2 (en) IMPROVED PROCESS FOR IMAGE BINARIZATION
US8358846B2 (en) Scanning images for pornography
CN104408429A (en) Method and device for extracting representative frame of video
CN109636824A (en) A kind of multiple target method of counting based on image recognition technology
JP2008148298A (en) Method and apparatus for identifying regions of different content in image, and computer readable medium for embodying computer program for identifying regions of different content in image
CN106709928A (en) Fast noise-containing image two-dimensional maximum between-class variance threshold value method
CN107358245B (en) Method for detecting image collaborative salient region
CN109215010A (en) A kind of method and robot face identification system of picture quality judgement
CN102306307B (en) Positioning method of fixed point noise in color microscopic image sequence
CN108510499A (en) A kind of carrying out image threshold segmentation method and device based on fuzzy set and Otsu
CN104504662A (en) Homomorphic filtering based image processing method and system
CN106358029A (en) Video image processing method and device
CN110827312A (en) Learning method based on cooperative visual attention neural network
CN105139417A (en) Method for real-time multi-target tracking under video surveillance
CN108961209B (en) Pedestrian image quality evaluation method, electronic device and computer readable medium
CN108830857A (en) A kind of adaptive Chinese character rubbings image binaryzation partitioning algorithm
CN106127763A (en) One has extensive adaptive image binaryzation method
CN108711160A (en) A kind of Target Segmentation method based on HSI enhancement models
CN108305270A (en) A kind of storage grain worm number system and method based on mobile phone photograph
CN108665436A (en) A kind of multi-focus image fusing method and system based on gray average reference
WO2020130799A1 (en) A system and method for licence plate detection
CN106127765A (en) Image binaryzation system based on self-adapting window and smooth threshold method
CN112396016B (en) Face recognition system based on big data technology

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 528000 room 2002, block A, 33 Jihua five road, Chancheng District, Foshan, Guangdong.

Applicant after: Xu Qing

Applicant after: Foshan country trademark services Co., Ltd.

Applicant after: Foshan national trademark Identification Technology Co., Ltd.

Address before: 528000 room 2002, block A, 33 Jihua five road, Chancheng District, Foshan, Guangdong.

Applicant before: Xu Qing

Applicant before: Foshan country trademark services Co., Ltd.

Applicant before: Foshan City, China side trademark Software Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 528000 room 2002, block A, 33 Jihua five road, Chancheng District, Foshan, Guangdong.

Patentee after: Xu Qing

Patentee after: Foshan Guofang Identification Technology Co.,Ltd.

Patentee after: Foshan Guofang Software Technology Co.,Ltd.

Address before: 528000 room 2002, block A, 33 Jihua five road, Chancheng District, Foshan, Guangdong.

Patentee before: Xu Qing

Patentee before: FOSHAN GUOFANG TRADEMARK SERVICE Co.,Ltd.

Patentee before: FOSHAN GUOFANG TRADEMARK IDENTIFICATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder