A kind of adaptive fingerprint image method of adjustment
Technical field
The present invention relates to fingerprint image process field, more particularly to a kind of adaptive fingerprint image method of adjustment.
Background technology
With the popularization that fingerprint recognition is applied, high performance fingerprint recognition system needs accurate and quickly adapts to various answer
With environment and the characteristic information that takes the fingerprint.But existing most Acquisition Instruments are caused in fingerprint-collecting process due to various environmental factors
In would generally introduce noise, cause fingerprint background unclean, noise can seriously affect later image processing, minutiae extraction
Deng so as to influence fingerprint application effect.In order to improve the accuracy of Finger print characteristic abstract, generally when dispatching from the factory, detected by AGC
The inconsistency of sensor surface image block, by calculating suitable parameter after digital algorithm calibration one by one, uploads to MCU progress
Storage, transfers use again after the power is turned on every time.The prior art needs to do single background correction, and speed is slow, influences volume production speed, and
Situation of dispatching from the factory is excessively preferable, it is impossible to adapts to the particularity of user environment.After dispatching from the factory, parameter constant, so the prior art is not
The situation for causing finger Drought-wet change big because of Four seasons change can be matched well.
The content of the invention
In order to overcome problems of the prior art, this patent provides a kind of adaptive fingerprint image method of adjustment,
Including:
Before the not upper finger of S1, user, the histogram information of existing empty background image is first preserved, obtains the straight of background just judgement
Square figure number threshold value and image characteristic point information.
The characteristic point is the maximum point and minimum point of pixel value number;The setting side of the histogram number threshold value
Method is the position where the Near The Extreme Point deviation ± 20% in number.
After S2, the upper finger of user, statistics with histogram is carried out to fingerprint image, and piecemeal processing is carried out to fingerprint image.
It is described to fingerprint image carry out piecemeal processing method be:
A1, the image block block that fingerprint image is divided into the size such as N number ofi(i=1,2,3 ... N), to blockiInterior point
Carry out wheel and seek minimum Data-Statistics, count the maximum and minimum value of pixel gray value;The N is selected according to fingerprint image size
Take.
Described take turns seeks the methods of minimum Data-Statistics and is:Assuming that blockiIn pixel gray value for c, b, a, d, h, g, f,
E, wherein a<b<c<d<e<f<g<h;Compare two-by-two, before less be placed on;C first and b compare, b<C, so b and c is exchanged
Position;C is compared with a, a<C, so a and c exchanges position;A is again compared with b, a<B, a and b exchange position;And so on, finally
All values are arranged according to order from small to large, count the maximum and minimum value of pixel gray value.
A2, the situation in view of sensor array error or abnormal point, the maximum and minimum value counted are cast out
Do not have to.
After A3, removal maximum and minimum value, in image block blockiThe remaining fingerprint image picture of (i=1,2,3 ... N)
In element value, new maximum DATA_max and minimum value DATA_min are chosen;DATA_max and DATA_min is just sentenced with background
Disconnected threshold value is compared, and chooses the image block block for meeting particular decision conditionj(j≦N);The particular decision condition is:
DATA_max>MAX2, or DATA_max<MAX1, or DATA_min>MIN1, or DATA_min<MIN2.
A4, the image block block to meeting particular decision conditionj(j≤N) carries out gain compensation so that maximum DATA_
Max and minimum value DATA_min meet prescribed limit, MAX1<DATA_max<MAX2, and MIN2<DATA_min<MIN1.
A5, calculate and complete all image blocks, ensures all image block blockiThe value of (i=1,2,3 ... N) is described
In prescribed limit.
Described MIN1, MIN2, MAX1, MAX2 are the histogram number threshold value that background just judges, wherein MIN1, MIN2 is most
Small value number threshold value, MAX1, MAX2 are maximum number threshold value, meet MAX1<MAX2, MIN2<MIN1.
S3, after handling obtained finger print information, substitute into characteristic point information, whole fingerprint image smoothly transported
Calculate.
The smoothing operation includes nearby being filtered characteristic point processing mutation value corresponding with valley line is made up;It is described flat
The value that the result of sliding processing includes the result of the filtering process of crestal line and valley line makes up.The method of the filtering process includes:
The common processing method such as value filtering, medium filtering, gaussian filtering.
The result of smoothing processing, be stored into RAM by S4 according to the form of image block, judges finger type after upper finger.
It is described judge finger type method be:According to statistics with histogram go out as a result, to find out pixel value the largest number of
Point position M, is judged with given threshold;When pixel gray value M is more than dry finger threshold value N1, then it is judged as dry finger;Work as picture
Vegetarian refreshments gray value M is less than wet finger threshold value N2, then is judged as wet finger;When M is less than N1, and M is more than N2, then is normal finger;
The dry finger threshold value N1 and wet finger threshold value N2 are preset according to dry and wet finger characteristic, and N1>N2.The finger type bag
Include:Dry finger, wet finger and normal finger.
S5, after having judged finger type, according to the finger type of judgement, classify fingerprint image, completes data system
Meter.
A kind of adaptive fingerprint image method of adjustment that this patent provides, without correction of dispatching from the factory, can accomplish real-time matching,
Sensor surface can effectively be solved has situations such as foreign matter, finger is not clean.Optimized parameter is selected for each finger, and parameter can be with
Change with user's finger because of Four seasons change and finger dry and wet degree.After the adaptive fingerprint method of adjustment of this patent
Fingerprint image, background is uniform, and fingerprint image effect is apparent.
Brief description of the drawings
Fig. 1 is the particular flow sheet of the embodiment of the present invention;
Fig. 2 is the uneven fingerprint image of background that the embodiment of the present invention collects;
Fig. 3 is the histogram for the uneven fingerprint image of background that the embodiment of the present invention collects;
Fig. 4 is that the wheel of the embodiment of the present invention seeks the method schematic diagram of minimum Data-Statistics;
Fig. 5 is the method schematic diagram for judging finger type of the embodiment of the present invention, and figure (a) is dry finger histogram, is schemed (b)
For wet finger histogram, figure (c) is normal finger histogram;
Fig. 6 is the front and rear comparison diagram of the adaptive fingerprint method of adjustment of the use of the embodiment of the present invention, and figure (a) is unused
Fingerprint image design sketch, figure (b) be use after fingerprint image design sketch.
Embodiment
In order to be better understood from the present invention, with reference to instantiation, and referring to the drawings, the present invention is made further detailed
Explanation.
As shown in Figure 1, a kind of adaptive fingerprint image method of adjustment, including:
Before the not upper finger of step 1, user, the histogram information of existing empty background image is first preserved, background is obtained and just judges
Histogram number threshold value and image characteristic point information.By taking background is uneven as an example, the adaptive fingerprint of this patent is not used
During method of adjustment, the uneven fingerprint image of background collected is as shown in Fig. 2, its histogram distribution is as shown in Figure 3.
Characteristic point is the maximum point and minimum point of pixel value number;The method to set up of histogram number threshold value is a
Position where several Near The Extreme Point deviations ± 20%.In the present embodiment, it is threshold value-the 20% of number extreme point A
MIN2 ,+20% is threshold value MIN1;- the 20% of number extreme point D is threshold value MAX1, and+20% is threshold value MAX2.
In Fig. 3, Gray Histogram value interval range is big, after statistics preserve background just judge threshold value MIN1, MIN2,
The positional information of characteristic point in MAX1, MAX2, and figure, for the adjustment parameter after upper finger.In the present embodiment, characteristic point A,
D is number maximum point, and B, C are number minimum point.
After step 2, the upper finger of user, statistics with histogram is carried out to fingerprint image, and piecemeal processing is carried out to fingerprint image.
To fingerprint image carry out piecemeal processing method be:
A1, the image block block that fingerprint image is divided into the size such as N number ofi(i=1,2,3 ... N), N is according to fingerprint image
Size is chosen.To blockiInterior point carries out wheel and seeks minimum Data-Statistics, counts the maximum and minimum value of pixel gray value.
As shown in figure 4, the method that wheel seeks minimum Data-Statistics is:Assuming that blockiIn pixel gray value be c, b, a, d, h, g, f, e,
Wherein a<b<c<d<e<f<g<h.Compare two-by-two, before less be placed on.C first and b compare, b<C, so b and c exchanges position
Put;C is compared with a, a<C, so a and c exchanges position;A is again compared with b, a<B, a and b exchange position.And so on, final institute
Some values are arranged according to order from small to large, count the maximum and minimum value of pixel gray value.
A2, the situation in view of sensor array error or abnormal point, the maximum and minimum value counted are cast out
Do not have to.
After A3, removal maximum and minimum value, in image block blockiThe remaining fingerprint image picture of (i=1,2,3 ... N)
In element value, new maximum DATA_max and minimum value DATA_min are chosen.DATA_max and DATA_min is just sentenced with background
Disconnected threshold value is compared, and chooses the image block block for meeting particular decision conditionj(j≦N).The particular decision condition is:
DATA_max>MAX2, or DATA_max<MAX1, or DATA_min>MIN1, or DATA_min<MIN2.
A4, the image block block to meeting particular decision conditionj(j≤N) carries out gain compensation so that maximum DATA_
Max and minimum value DATA_min meet prescribed limit, MAX1<DATA_max<MAX2, and MIN2<DATA_min<MIN1.
A5, calculate and complete all image blocks, ensures all image block blockiThe value of (i=1,2,3 ... N) is providing
In the range of.
Wherein, MIN1, MIN2, MAX1, MAX2 are the histogram number threshold value that background just judges, MIN1, MIN2 are minimum
It is worth number threshold value, MAX1, MAX2 are maximum number threshold value, meet MAX1<MAX2, MIN2<MIN1.
Step 3, because fingerprint is non-discrete, there is certain continuity, after handling obtained finger print information, generation
Enter characteristic point information, smoothing operation is carried out to whole fingerprint image.Characteristic point information is A, B, C, D tetra- in Fig. 3 in the present embodiment
The information of a point.Crestal line near characteristic point is undergone mutation, so need nearby to be filtered processing to characteristic point, and it is corresponding
Make up the corresponding mutation value of valley line.The method of filtering process includes:The common place such as mean filter, medium filtering, gaussian filtering
Reason method.
Step 4, the form storage by value made up to the result of the filtering process of crestal line, valley line etc. according to image block block
It is stored in RAM, judges finger type after upper finger.Finger type includes:Dry finger, wet finger and normal finger.
As shown in figure 5, the method for judging finger type is:According to statistics with histogram go out as a result, finding out pixel value number
Most point position M, is judged with given threshold.When pixel gray value M is more than dry finger threshold value N1, then it is judged as dry hand
Refer to;When pixel gray value M is less than wet finger threshold value N2, then it is judged as wet finger;When M is less than N1, and M is more than N2, then for just
Normal finger.Dry finger threshold value N1 and wet finger threshold value N2 are preset according to dry and wet finger characteristic, and N1>N2.
Step 5, after having judged finger type, according to the finger type of judgement, classify fingerprint image, completes data
Statistics.Fig. 6 is the front and rear comparison diagram using adaptive fingerprint method of adjustment, and figure (a) is untapped fingerprint image design sketch,
It is the fingerprint image design sketch after use to scheme (b).As can be seen that the fingerprint image back of the body of adaptive fingerprint method of adjustment is not used
Scape is uneven, and image is from left to right successively from secretly brightening;It is equal using the fingerprint image after adaptive fingerprint method of adjustment, background
Even, fingerprint image effect is apparent.
The detailed description and the accompanying drawings of the embodiment of the present invention are only intended to the explanation present invention, rather than limitation by claim and
The scope of the present invention that its equivalent defines.