Content of the invention
The embodiment of the present invention provides a kind of Method of Fingerprint Image Compression and device.The memory space of fingerprint image can be solved
Inadequate problem.
First aspect present invention provides a kind of Method of Fingerprint Image Compression, including:
The first fingerprint image is obtained, the gray value of each pixel is by N positions bit data table in first fingerprint image
Show, the N is the integer more than or equal to 1;
Binary conversion treatment is carried out to first fingerprint image obtains the second fingerprint image, every in second fingerprint image
The gray value of individual pixel is represented by the N positions identical bit data 1 or bit data 0;
By identical bit data in N positions described in second fingerprint image 1 or bit data 0 boil down to, 1 bit number
According to obtaining the 3rd fingerprint image.
Wherein, described carry out binary conversion treatment to first fingerprint image and obtain the second fingerprint image including:
Judge the gray value of each pixel in multiple pixels in first fingerprint image whether more than predetermined threshold value;
If in the plurality of pixel, the gray value of target pixel points is more than the predetermined threshold value, using N positions phase
With bit data 1 represent the gray value of the target pixel points, if in the plurality of pixel target pixel points gray value
No more than described predetermined threshold value, then represent the gray value of the target pixel points using the N positions identical bit data 0.
Wherein, described by 0 boil down to 1 of identical bit data in N positions described in second fingerprint image 1 or bit data
After position bit data obtains the 3rd fingerprint image, also include:
N positions bit data after by compression represents the gray value of each pixel in the 3rd fingerprint image.
Wherein, after the first fingerprint image of the acquisition, also include:
First fingerprint image is normalized.
Wherein, after the first fingerprint image of the acquisition, also include:
The background image of first fingerprint image is removed, and to removing first fingerprint image of the background image
Carry out enhancement process.
Second aspect present invention provides a kind of fingerprint image compression device, including:
Image collection module, for obtaining the first fingerprint image, the gray scale of each pixel in first fingerprint image
Value is represented that by N positions bit data the N is the integer more than or equal to 1;
Image processing module, obtains the second fingerprint image, institute for carrying out binary conversion treatment to first fingerprint image
The gray value for stating each pixel in the second fingerprint image is represented by the N positions identical bit data 1 or bit data 0;
Data compressing module, for by identical bit data in N positions described in second fingerprint image 1 or bit data
0 bit data of boil down to 1 obtains the 3rd fingerprint image.
Wherein, described image processing module specifically for:
Judge the gray value of each pixel in multiple pixels in first fingerprint image whether more than predetermined threshold value;
If in the plurality of pixel, the gray value of target pixel points is more than the predetermined threshold value, using N positions phase
With bit data 1 represent the gray value of the target pixel points, if in the plurality of pixel target pixel points gray value
No more than described predetermined threshold value, then represent the gray value of the target pixel points using the N positions identical bit data 0.
Wherein, the data compressing module specifically for:
N positions bit data after by compression represents the gray value of each pixel in the 3rd fingerprint image.
Wherein, described image processing module, is additionally operable to be normalized first fingerprint image.
Wherein, described image processing module, is additionally operable to the background image for removing first fingerprint image, and to removing institute
First fingerprint image for stating background image carries out enhancement process.
Wherein, described device includes interface circuit, memorizer and processor, wherein, stores batch processing in memorizer
Code, and processor is for calling the program code stored in memorizer, for executing following operation:
The first fingerprint image is obtained, the gray value of each pixel is by N positions bit data table in first fingerprint image
Show, the N is the integer more than or equal to 1;
Binary conversion treatment is carried out to first fingerprint image obtains the second fingerprint image, every in second fingerprint image
The gray value of individual pixel is represented by the N positions identical bit data 1 or bit data 0;
By identical bit data in N positions described in second fingerprint image 1 or bit data 0 boil down to, 1 bit number
According to obtaining the 3rd fingerprint image.
Implement the embodiment of the present invention, obtain the first fingerprint image first, each pixel in first fingerprint image
Gray value is represented that by N positions bit data the N is the integer more than or equal to 1;Then two-value is carried out to first fingerprint image
Change is processed and obtains the second fingerprint image, and in second fingerprint image, the gray value of each pixel is by N positions identical ratio
Special data 1 or bit data 0 are represented;Finally by identical bit data in N positions described in second fingerprint image 1 or bit number
The 3rd fingerprint image is obtained according to 0 boil down to, 1 bit data, the storage of finger print data is reduced by the compression to fingerprint image
Space.
Specific embodiment
Accompanying drawing in below in conjunction with the embodiment of the present invention, to the embodiment of the present invention in technical scheme carry out clear, complete
Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.It is based on this
Embodiment in bright, the every other enforcement obtained under the premise of creative work is not made by those of ordinary skill in the art
Example, belongs to the scope of protection of the invention.
Fig. 1 is refer to, Fig. 1 is that a kind of flow process of the first embodiment of Method of Fingerprint Image Compression proposed by the present invention is illustrated
Figure.As illustrated, the method in the embodiment of the present invention includes:
S101, obtains the first fingerprint image, and in first fingerprint image, the gray value of each pixel is by N positions bit number
According to expression, the N is the integer more than or equal to 1.
In implementing, fingerprint acquisition device can be adopted to obtain the first fingerprint image, as shown in Fig. 2 Fig. 2 is the present invention
A kind of structural representation of the gray value of first fingerprint image that embodiment is provided, the first fingerprint image are 160*160 pixel values
The image of size, each grid represent that a pixel, the gray value of each pixel are indicated using 8 bit datas.
As shown in Fig. 2 the gray value of first pixel is 11011010 in the first fingerprint image, the gray value of second pixel point is
00011010.
S102, carries out binary conversion treatment and obtains the second fingerprint image, second fingerprint image to first fingerprint image
As in, the gray value of each pixel is represented by the N positions identical bit data 1 or bit data 0.
In implementing, it can be determined that described in first fingerprint image in multiple pixels each pixel gray scale
Whether value is more than predetermined threshold value;If the gray value of target pixel points is made more than the predetermined threshold value in the plurality of pixel
The gray value that the target pixel points are represented with the N positions identical bit data 1, if object pixel in the plurality of pixel
The gray value of point is not more than the predetermined threshold value, then represent the target pixel points using the N positions identical bit data 0
Gray value.It should be noted that the first fingerprint image is after binary conversion treatment, the gray value of each pixel be only possible to for
0 or 255, predetermined threshold value can be 128.
For example, as shown in figure 3, Fig. 3 is a kind of structure of the gray value of second fingerprint image provided in an embodiment of the present invention
Schematic diagram.The gray value of first pixel in above-mentioned first fingerprint image is 218, and the gray value 218 is more than 128, therefore
The 8 of first pixel bit datas can be all set to 1, the gray value of first pixel is 255, second picture
The gray value of vegetarian refreshments is 26, and therefore 8 bit datas of second pixel point all can be set by the gray value 28 less than 128
0 is set to, the gray value of second pixel point is 0, and each pixel carries out binary conversion treatment to other successively, each pixel
After gray value is through binary conversion treatment, 8 bit datas 1 or 8 bit datas 0 are generated.
S103, by 1 ratio of identical bit data in N positions described in second fingerprint image 1 or 0 boil down to of bit data
Special data obtain the 3rd fingerprint image.
In implementing, as shown in figure 3,8 bit datas all 1 of the gray value of first pixel, therefore may be used
With 8 bit datas, 1 boil down to, 1 bit data 1 by first pixel, as shown in figure 4, first grid represent the
One pixel is represented using 1 bit data 1;As shown in figure 3,8 bit datas of the gray value of second pixel point are complete
Portion is 0, therefore can be by 8 bit datas, 0 boil down to, 1 bit data 0 of second pixel point, as shown in figure 4, the 5th
The second pixel o'clock that grid is represented represented using 1 bit data 0, successively the ash to pixel that other each grids are represented
Angle value is compressed process, and then the first eight grid each grid only has 1 bit data, a total of 8 bit datas respectively.
Optionally, can by compression after N positions bit data represent each pixel in the 3rd fingerprint image
Gray value.As shown in figure 4, a total of 8 bit datas of the first eight grid, therefore can regard 8 bit datas as one
The gray value of pixel, the gray value are 10010111, successively backward in the same manner to other numbers per eight grids
According to being processed, the intensity value ranges of each pixel in the 3rd fingerprint image for therefore finally giving 0~255, the 3rd
The pixel value size boil down to 160*20 of fingerprint image, have compressed 8 times.
In embodiments of the present invention, the first fingerprint image is obtained first, each pixel in first fingerprint image
Gray value is represented that by N positions bit data the N is the integer more than or equal to 1;Then two-value is carried out to first fingerprint image
Change is processed and obtains the second fingerprint image, and in second fingerprint image, the gray value of each pixel is by N positions identical ratio
Special data 1 or bit data 0 are represented;Finally by identical bit data in N positions described in second fingerprint image 1 or bit number
The 3rd fingerprint image is obtained according to 0 boil down to, 1 bit data, the storage of finger print data is reduced by the compression to fingerprint image
Space.
Fig. 5 is refer to, Fig. 5 is that a kind of flow process of the second embodiment of Method of Fingerprint Image Compression proposed by the present invention is illustrated
Figure.As illustrated, the method in the embodiment of the present invention includes:
S501, obtains the first fingerprint image, and in first fingerprint image, the gray value of each pixel is by N positions bit number
According to expression, the N is the integer more than or equal to 1.
In implementing, fingerprint acquisition device can be adopted to obtain the first fingerprint image, as shown in Fig. 2 Fig. 2 is the present invention
A kind of structural representation of the gray value of first fingerprint image that embodiment is provided, the first fingerprint image are 160*160 pixel values
The image of size, each grid represent that a pixel, the gray value of each pixel are indicated using 8 bit datas.
As shown in Fig. 2 the gray value of first pixel is 11011010 in the first fingerprint image, the gray value of second pixel point is
00011010.
S502, is normalized to first fingerprint image.
In implementing, the first fingerprint image (can be found one using the not bending moment of image by a series of conversion
Group parameter can eliminate the impact that other transforming function transformation functions are converted to image), pending original image is converted into accordingly
Sole criterion form (the canonical form image to translation, rotation, scaling equiaffine conversion have invariant feature).
S503, removes the background image of first fingerprint image, and refers to removing described the first of the background image
Print image carries out enhancement process.
In implementing, can to imaging before the first fingerprint image to carry out image corresponding with the first fingerprint image after imaging
Point and the demarcation of finger-print region;First fingerprint image is split, obtains background sub-collective drawing and corresponding fingerprint sub-collective drawing;Right
The corresponding fingerprint subgraph of low frequency background subregion in background sub-collective drawing carries out self adaptation fingerprint enhancing;And to background sub-collective drawing in
The corresponding fingerprint subgraph of edge subregion strengthened;Low frequency subregion is strengthened result and is merged with edge subregion enhancing result, is obtained
Enhanced first fingerprint image for removing the background image of final fingerprint.
S504, carries out binary conversion treatment and obtains the second fingerprint image, second fingerprint image to first fingerprint image
As in, the gray value of each pixel is represented by the N positions identical bit data 1 or bit data 0.
In implementing, it can be determined that described in first fingerprint image in multiple pixels each pixel gray scale
Whether value is more than predetermined threshold value;If the gray value of target pixel points is made more than the predetermined threshold value in the plurality of pixel
The gray value that the target pixel points are represented with the N positions identical bit data 1, if object pixel in the plurality of pixel
The gray value of point is not more than the predetermined threshold value, then represent the target pixel points using the N positions identical bit data 0
Gray value.It should be noted that the first fingerprint image is after binary conversion treatment, the gray value of each pixel be only possible to for
0 or 255, predetermined threshold value can be 128.
For example, as shown in figure 3, Fig. 3 is a kind of structure of the gray value of second fingerprint image provided in an embodiment of the present invention
Schematic diagram.The gray value of first pixel in above-mentioned first fingerprint image is 218, and the gray value 218 is more than 128, therefore
The 8 of first pixel bit datas can be all set to 1, the gray value of first pixel is 255, second picture
The gray value of vegetarian refreshments is 26, and therefore 8 bit datas of second pixel point all can be set by the gray value 28 less than 128
0 is set to, the gray value of second pixel point is 0, and each pixel carries out binary conversion treatment to other successively, each pixel
After gray value is through binary conversion treatment, 8 bit datas 1 or 8 bit datas 0 are generated.
S505, by 1 ratio of identical bit data in N positions described in second fingerprint image 1 or 0 boil down to of bit data
Special data obtain the 3rd fingerprint image.
In implementing, as shown in figure 3,8 bit datas all 1 of the gray value of first pixel, therefore may be used
With 8 bit datas, 1 boil down to, 1 bit data 1 by first pixel, as shown in figure 4, first grid represent the
One pixel is represented using 1 bit data 1;As shown in figure 3,8 bit datas of the gray value of second pixel point are complete
Portion is 0, therefore can be by 8 bit datas, 0 boil down to, 1 bit data 0 of second pixel point, as shown in figure 4, the 5th
The second pixel o'clock that grid is represented represented using 1 bit data 0, successively the ash to pixel that other each grids are represented
Angle value is compressed process, and then the first eight grid each grid only has 1 bit data, a total of 8 bit datas respectively.
Optionally, can by compression after N positions bit data represent each pixel in the 3rd fingerprint image
Gray value.As shown in figure 4, a total of 8 bit datas of the first eight grid, therefore can regard 8 bit datas as one
The gray value of pixel, the gray value are 10010111, successively backward in the same manner to other numbers per eight grids
According to being processed, the intensity value ranges of each pixel in the 3rd fingerprint image for therefore finally giving 0~255, the 3rd
The pixel value size boil down to 160*20 of fingerprint image, have compressed 8 times.
In embodiments of the present invention, the first fingerprint image is obtained first, each pixel in first fingerprint image
Gray value is represented that by N positions bit data the N is the integer more than or equal to 1;Then two-value is carried out to first fingerprint image
Change is processed and obtains the second fingerprint image, and in second fingerprint image, the gray value of each pixel is by N positions identical ratio
Special data 1 or bit data 0 are represented;Finally by identical bit data in N positions described in second fingerprint image 1 or bit number
The 3rd fingerprint image is obtained according to 0 boil down to, 1 bit data, the storage of finger print data is reduced by the compression to fingerprint image
Space.
Fig. 6 is refer to, Fig. 6 is a kind of structural representation of fingerprint image compression device that the embodiment of the present invention is proposed.Such as
Shown in figure, the device in the embodiment of the present invention includes:
Image collection module 601, for obtaining the first fingerprint image, the ash of each pixel in first fingerprint image
Angle value is represented that by N positions bit data the N is the integer more than or equal to 1.
In implementing, fingerprint acquisition device can be adopted to obtain the first fingerprint image, as shown in Fig. 2 Fig. 2 is the present invention
A kind of structural representation of the gray value of first fingerprint image that embodiment is provided, the first fingerprint image are 160*160 pixel values
The image of size, each grid represent that a pixel, the gray value of each pixel are indicated using 8 bit datas.
As shown in Fig. 2 the gray value of first pixel is 11011010 in the first fingerprint image, the gray value of second pixel point is
00011010.
Image processing module 602, obtains the second fingerprint image for carrying out binary conversion treatment to first fingerprint image,
In second fingerprint image, the gray value of each pixel is represented by the N positions identical bit data 1 or bit data 0.
In implementing, it can be determined that described in first fingerprint image in multiple pixels each pixel gray scale
Whether value is more than predetermined threshold value;If the gray value of target pixel points is made more than the predetermined threshold value in the plurality of pixel
The gray value that the target pixel points are represented with the N positions identical bit data 1, if object pixel in the plurality of pixel
The gray value of point is not more than the predetermined threshold value, then represent the target pixel points using the N positions identical bit data 0
Gray value.It should be noted that the first fingerprint image is after binary conversion treatment, the gray value of each pixel be only possible to for
0 or 255, predetermined threshold value can be 128.
For example, as shown in figure 3, Fig. 3 is a kind of structure of the gray value of second fingerprint image provided in an embodiment of the present invention
Schematic diagram.The gray value of first pixel in above-mentioned first fingerprint image is 218, and the gray value 218 is more than 128, therefore
The 8 of first pixel bit datas can be all set to 1, the gray value of first pixel is 255, second picture
The gray value of vegetarian refreshments is 26, and therefore 8 bit datas of second pixel point all can be set by the gray value 28 less than 128
0 is set to, the gray value of second pixel point is 0, and each pixel carries out binary conversion treatment to other successively, each pixel
After gray value is through binary conversion treatment, 8 bit datas 1 or 8 bit datas 0 are generated.
Data compressing module 603, for by identical bit data in N positions described in second fingerprint image 1 or bit
Data 0 boil down to, 1 bit data obtains the 3rd fingerprint image.
In implementing, as shown in figure 3,8 bit datas all 1 of the gray value of first pixel, therefore may be used
With 8 bit datas, 1 boil down to, 1 bit data 1 by first pixel, as shown in figure 4, first grid represent the
One pixel is represented using 1 bit data 1;As shown in figure 3,8 bit datas of the gray value of second pixel point are complete
Portion is 0, therefore can be by 8 bit datas, 0 boil down to, 1 bit data 0 of second pixel point, as shown in figure 4, the 5th
The second pixel o'clock that grid is represented represented using 1 bit data 0, successively the ash to pixel that other each grids are represented
Angle value is compressed process, and then the first eight grid each grid only has 1 bit data, a total of 8 bit datas respectively.
Optionally, can by compression after N positions bit data represent each pixel in the 3rd fingerprint image
Gray value.As shown in figure 4, a total of 8 bit datas of the first eight grid, therefore can regard 8 bit datas as one
The gray value of pixel, the gray value are 10010111, successively backward in the same manner to other numbers per eight grids
According to being processed, the intensity value ranges of each pixel in the 3rd fingerprint image for therefore finally giving 0~255, the 3rd
The pixel value size boil down to 160*20 of fingerprint image, have compressed 8 times.
Optionally, image processing module 602, are additionally operable to be normalized first fingerprint image.
In implementing, the first fingerprint image (can be found one using the not bending moment of image by a series of conversion
Group parameter can eliminate the impact that other transforming function transformation functions are converted to image), pending original image is converted into accordingly
Sole criterion form (the canonical form image to translation, rotation, scaling equiaffine conversion have invariant feature).
Optionally, image processing module 602, are additionally operable to the background image for removing first fingerprint image, and to removing
First fingerprint image of the background image carries out enhancement process.
In implementing, can to imaging before the first fingerprint image to carry out image corresponding with the first fingerprint image after imaging
Point and the demarcation of finger-print region;First fingerprint image is split, obtains background sub-collective drawing and corresponding fingerprint sub-collective drawing;Right
The corresponding fingerprint subgraph of low frequency background subregion in background sub-collective drawing carries out self adaptation fingerprint enhancing;And to background sub-collective drawing in
The corresponding fingerprint subgraph of edge subregion strengthened;Low frequency subregion is strengthened result and is merged with edge subregion enhancing result, is obtained
Enhanced first fingerprint image for removing the background image of final fingerprint.
In embodiments of the present invention, the first fingerprint image is obtained first, each pixel in first fingerprint image
Gray value is represented that by N positions bit data the N is the integer more than or equal to 1;Then two-value is carried out to first fingerprint image
Change is processed and obtains the second fingerprint image, and in second fingerprint image, the gray value of each pixel is by N positions identical ratio
Special data 1 or bit data 0 are represented;Finally by identical bit data in N positions described in second fingerprint image 1 or bit number
The 3rd fingerprint image is obtained according to 0 boil down to, 1 bit data, the storage of finger print data is reduced by the compression to fingerprint image
Space.
Fig. 7 is refer to, Fig. 7 is a kind of structural representation of photographic head sharing means that the embodiment of the present invention is proposed.As schemed
Shown, the device can include:At least one processor 701, such as CPU, at least one communication interface 702, at least one deposits
Reservoir 703, at least one bus 704.Wherein, bus 704 is used for realizing the connection communication between these components.Wherein, this
In bright embodiment, the communication interface 702 of device is wired sending port, or wireless device, for example include antenna assembly,
For carrying out the communication of signaling or data with other node devices.Memorizer 703 can be high-speed RAM memorizer, or
Non-labile memorizer (non-volatile memory), for example, at least one disk memory.Memorizer 703 is optional
Can also be at least one storage device for being located remotely from aforementioned processor 701.Batch processing code is stored in memorizer 703,
And processor 701 is used for calling the program code stored in memorizer, for executing following operation:
The first fingerprint image is obtained, the gray value of each pixel is by N positions bit data table in first fingerprint image
Show, the N is the integer more than or equal to 1;
Binary conversion treatment is carried out to first fingerprint image obtains the second fingerprint image, every in second fingerprint image
The gray value of individual pixel is represented by the N positions identical bit data 1 or bit data 0;
By identical bit data in N positions described in second fingerprint image 1 or bit data 0 boil down to, 1 bit number
According to obtaining the 3rd fingerprint image.
Wherein, processor 701 is additionally operable to execute following operating procedure:
Judge the gray value of each pixel in multiple pixels described in first fingerprint image whether more than default
Threshold value;
If in the plurality of pixel, the gray value of target pixel points is more than the predetermined threshold value, using N positions phase
With bit data 1 represent the gray value of the target pixel points, if in the plurality of pixel target pixel points gray value
No more than described predetermined threshold value, then represent the gray value of the target pixel points using the N positions identical bit data 0.
Wherein, processor 701 is additionally operable to execute following operating procedure:
N positions bit data after by compression represents the gray value of each pixel in the 3rd fingerprint image.
Wherein, processor 701 is additionally operable to execute following operating procedure:
First fingerprint image is normalized.
Wherein, processor 701 is additionally operable to execute following operating procedure:
The background image of first fingerprint image is removed, and to removing first fingerprint image of the background image
Carry out enhancement process.
It should be noted that for each embodiment of the method aforesaid, in order to be briefly described, therefore which is all expressed as one it is
The combination of actions of row, but those skilled in the art should know, and the present invention is not limited by described sequence of movement, because
It is that certain some step can be carried out using other orders or simultaneously according to the present invention.Secondly, those skilled in the art also should
Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this
Bright necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, is not described in certain embodiment
Part, may refer to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
Completed with instructing the hardware of correlation by program, the program can be stored in a computer-readable recording medium, storage
Medium can include:Flash disk, read only memory (English:Read-Only Memory, referred to as:ROM), random access device (English
Text:Random Access Memory, referred to as:RAM), disk or CD etc..
The above content download method provided by the embodiment of the present invention and relevant device, system are described in detail,
Specific case used herein is set forth to the principle of the present invention and embodiment, and the explanation of above example is simply used
The method of the present invention and its core concept is understood in help;Simultaneously for one of ordinary skill in the art, according to the present invention's
Thought, will change in specific embodiments and applications, and in sum, this specification content should not be construed as
Limitation of the present invention.