CN114612655B - Vein recognition algorithm transplanting method and device - Google Patents
Vein recognition algorithm transplanting method and device Download PDFInfo
- Publication number
- CN114612655B CN114612655B CN202210504041.9A CN202210504041A CN114612655B CN 114612655 B CN114612655 B CN 114612655B CN 202210504041 A CN202210504041 A CN 202210504041A CN 114612655 B CN114612655 B CN 114612655B
- Authority
- CN
- China
- Prior art keywords
- vein
- image
- recognition algorithm
- feature
- vein recognition
- 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.)
- Active
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/0059—Measuring for diagnostic purposes; Identification of persons using light, e.g. diagnosis by transillumination, diascopy, fluorescence
- A61B5/0075—Measuring for diagnostic purposes; Identification of persons using light, e.g. diagnosis by transillumination, diascopy, fluorescence by spectroscopy, i.e. measuring spectra, e.g. Raman spectroscopy, infrared absorption spectroscopy
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/48—Other medical applications
- A61B5/4887—Locating particular structures in or on the body
- A61B5/489—Blood vessels
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4007—Interpolation-based scaling, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration by the use of local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20028—Bilateral filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30101—Blood vessel; Artery; Vein; Vascular
Abstract
The invention discloses a vein recognition algorithm transplanting method and a device, belonging to the technical field of vein recognition and processing, and the method comprises the following steps: 1) constructing a vein image preprocessing algorithm to be transplanted; 2) constructing a vein recognition algorithm model to be transplanted; 3) the method comprises the steps of generating a dynamic link library based on a vein image preprocessing algorithm and a vein recognition algorithm model, compiling the dynamic link library into a library file, compiling based on the library file and a logic code in the vein recognition algorithm to generate an executable program, and importing the executable program into vein equipment. The method has the advantages that the dynamic link library is used in the transplanting process, so that the system space is saved, and the condition that when the application program uses the static link library, each application program needs to link the library code as an independent copy to the executable mirror image is avoided; the constructed algorithm can enhance the contrast of each part of the original image and lays a good foundation for subsequent matching identification; the preprocessing algorithm and the vein recognition algorithm model occupy less system memory and have good portability.
Description
Technical Field
The invention relates to the technical field of vein recognition and processing, in particular to a vein recognition algorithm transplanting method and a vein recognition algorithm transplanting device.
Background
Vein recognition is a new infrared biological recognition technology, which is to use an infrared camera to shoot the distribution diagram of veins in vivo (back of the hand, back of the finger, abdomen of the finger, palm and wrist) according to the characteristic that hemoglobin in the blood of veins in the human body absorbs near infrared or radiates far infrared rays of the human body.
Before the vein identification device is used, an algorithm needs to be implanted into the vein identification device for identifying the running of a program, and a method for transplanting the algorithm is, for example, an algorithm transplanting system based on an embedded platform and an algorithm transplanting method thereof disclosed in chinese patent CN108614703B, wherein the algorithm transplanting system includes an acquisition and evaluation unit for acquiring an evaluation algorithm; an algorithm flow adjusting unit for adjusting the algorithm flow; a multi-core allocation unit, which is used for allocating multi-core to the algorithm process for processing; the framework integration unit is used for carrying out framework integration on the algorithm process subjected to multi-core processing; and the recording unit is used for recording the algorithm into the embedded platform, so that the algorithm designed based on the PC end is transplanted to the embedded platform.
However, when the conventional algorithm migration method is adopted, when an application uses a statically linked library, each application needs to link the library code as an independent copy into an executable image, which results in huge memory and finally reduced operation speed in the identification process.
Disclosure of Invention
The invention aims to provide a vein recognition algorithm transplanting method and a vein recognition algorithm transplanting device, and aims to solve the problems that in the prior art, the recognition success rate is reduced due to unobvious enhancement of a gray level area of a vein, and the operation speed is low and the equipment cost is high due to large system memory occupation of a vein image preprocessing algorithm and a vein recognition algorithm model.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
the invention relates to a vein recognition algorithm transplanting method, which comprises the following steps:
1) constructing a vein image preprocessing algorithm to be transplanted;
2) constructing a vein recognition algorithm model to be transplanted;
3) the method comprises the steps of generating a dynamic link library based on a vein image preprocessing algorithm and a vein recognition algorithm model, compiling the dynamic link library into a library file, compiling based on the library file and a logic code in the vein recognition algorithm to generate an executable program, and importing the executable program into vein equipment.
Preferably, the step 3) specifically comprises the following steps:
3.1) generating a dynamic link library based on a vein image preprocessing algorithm to be transplanted and a vein recognition algorithm model to be transplanted;
3.2) compiling the dynamic link library into a library file by using a cross compiler;
3.3) compiling the compiled library file and the logic code in the vein recognition algorithm by using a cross compiler to generate an executable program;
3.4) importing the executable program into vein equipment for execution, and debugging the vein equipment until a target effect is achieved;
and 3.5) putting the debugged executable program into a root file system, setting the system to start and execute, manufacturing the file system into a mirror image, and burning the mirror image into the vein equipment by using a burning tool of a corresponding chip.
Preferably, the step 1) is to construct a vein image preprocessing algorithm to be transplanted based on a gray scale non-uniform correction method combining regional linear transformation and gaussian homomorphic filtering, the constructed vein image preprocessing algorithm is used for processing the vein image into a format meeting the input requirement of a vein recognition algorithm model, and the calculation step of the vein image preprocessing algorithm comprises:
1.1) carrying out scale normalization processing on the vein image;
1.2) carrying out image enhancement processing on the vein image subjected to the normalization processing.
Preferably, in the step 1.1), the vein image is scaled by using an interpolation algorithm to further realize normalization processing;
in the step 1.2), the image enhancement processing is performed by using a gray scale non-uniformity correction method combining regional linear transformation and multi-scale homomorphic filtering, and the image enhancement processing specifically comprises the following steps:
1.2.1) setting the normalized vein image asf(x,y),xAndyrespectively are the row coordinate and the column coordinate of the vein image matrix, and the interesting gray scale range of the image is[a,b],aAndbrespectively taking the minimum gray value and the maximum gray value of the interested gray range interval of the vein image, carrying out regional linear transformation processing on the image after the scale normalization processing according to formulas (1) - (3), and expanding the interested gray range of the image to [ 2 ]c,d] ,cAnddrespectively carrying out minimum gray value and maximum gray value after expansion on the vein image interesting gray range interval to obtain the vein image after regional linear transformationg(x,y):
1.2.2) on the basis of the illumination-reflection model, on the processed vein imageCarrying out logarithmic transformation to obtain a vein image after logarithmic transformation:
in the formula (I), the compound is shown in the specification,is composed ofThe fourier transform of (a) the signal,uandvrespectively obtaining variables of a row coordinate and a column coordinate x and y of the vein image matrix through Fourier transform;
1.2.5) based onPerforming inverse Fourier transform to obtain an image after frequency domain conversion to spatial domain:
1.2.7) carrying out weighted summation on output results of homomorphic filtering of a plurality of scales to obtain a final image:
In the formula (I), the compound is shown in the specification,N3-5 of the multi-scale number,for the different single-scale images, the images,is an image after the linear transformation of the region,is thatThe value range of the weight of (2) is more than 0 and less than 1,the weight of each single-scale image is required to satisfy the following conditions:
preferably, the vein recognition algorithm model to be transplanted constructed in the step 2) is used for outputting a recognition result by using the processed vein image;
the vein identification calculation step of the constructed vein identification algorithm model to be transplanted comprises the following steps:
2.1) carrying out feature extraction on the preprocessed vein image;
2.2) carrying out feature comparison on the vein images after feature extraction.
Preferably, the specific step of performing feature extraction on the preprocessed vein image in the step 2.1) includes:
2.1.1) traversing the entire preprocessed vein imagef(x,y) Splitting the image according to the pixel points to obtain four split imagesF 1 (x,y)、F 2 (x,y)、F 3 (x,y)、F 4 (x,y);
2.1.2) filtering the four split images by using bilateral filtering respectively;
2.1.3) respectively extracting the terrain characteristic lines of the four filtered vein images;
2.1.4) carrying out feature coding on the four topographic feature line images to obtain four vein feature images, and fusing the four vein features into a large feature image for subsequent comparison.
Preferably, in the step 2.1.3), the extracting of the feature lines of the terrain is to calculate first and second derivative values of each grid point by using concave-convex characteristics of the earth surface where the feature points are located and expressed in different directions through a 3 × 3 moving window, judge the type of the feature points according to the positive and negative of the derivatives, determine the feature points if the derivatives are positive, determine valley points if the derivatives are negative, connect all the ridge points to form ridge lines, and connect all the valley points to form valley lines, which are the feature lines of the terrain;
the feature coding of the topographic feature line image in the step 2.1.4) is to perform feature coding by using a positive and negative combination relation of a second derivative related to an elevation Z in an X direction and a Y direction, and the coding mode is as follows:
if the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
In the formula (I), the compound is shown in the specification,are respectively shown inxDirection andyin direction with respect to elevationZThe second derivative of (a).
Preferably, the specific step of 2.2) performing feature comparison on the vein image after feature extraction includes:
2.2.1) carrying out similarity sequencing on the features to be matched, wherein the sequencing comprises the following specific steps:
2.2.1.1) if the number of the features to be matched is 1, skipping the step 2.2.1), directly entering the step 2.2.2), and if the number of the matched features is more than 1, entering the step 2.2.1.2);
2.2.1.2) scaling the image matrix to be matched and the template characteristics to one fourth of the original image by a bilinear interpolation method;
2.2.1.3) calculating a structural similarity coefficient of the image feature matrix after scaling to express vein image similarity:
in the formula (I), the compound is shown in the specification,in order to calculate the value of the similarity,andtwo vein feature matrixes are respectively represented,andrespectively representing feature matricesAndthe average value of the gray levels of (a),andrespectively representing feature matricesAndthe standard deviation of the gray scale of (a),representing two feature matricesAndthe covariance of (a) of (b),andrespectively are constants with the value range of more than 0 and less than or equal to 0.1;
2.2.1.4) sorting the features to be matched according to the size of the similarity value;
2.2.2) selecting top rankednAnd finally, accurately comparing the characteristics to be matched with the template characteristics, and specifically comprising the following steps:
2.2.2.1) carrying out sliding window similarity calculation on the characteristics to be matched and the template characteristics, wherein the calculation formula is as follows:
in the formula:in order to calculate the comparison value after the calculation,in order to be the step size,for the maximum number of rows of the window,for the number of rows of the window,for the maximum number of columns of the window,for the number of window columns,is the step size in the direction of the window row,for the step size in the column direction of the window,for the features to be matched, the matching is carried out,is a row-column coordinate system, and is characterized in that,similarity calculation table for the feature to be matched and the template feature, similarity calculation table for the feature to be matched and the template featureExpressed as:
wherein the content of the first and second substances,calculating tables for similarityModel parameter of (2), similarity calculation tableNeed to satisfy;
2.2.2.2) respectively rotating the vein features to be matched by 0 degree, plus or minus 2 degrees and plus or minus 4 degrees and then matching the vein features with the template features one by one to obtain a plurality of matching values, and selecting the minimum value from the plurality of matching values as a final matching result of the two features to be matched;
2.2.2.3) calculating the results of the vein images between and in classes according to the sliding window statistical calculation formula to obtain a data curve, determining a threshold value according to the curve, and judging whether the vein images belong to the same class or different classes according to the threshold value.
Preferably, the vein image preprocessing algorithm to be transplanted and the vein recognition algorithm model to be transplanted, which are constructed in the steps 1) and 2), are uploaded to a cloud, and the vein image preprocessing algorithm and the vein recognition algorithm model are extracted from the cloud in the step 3).
The invention also relates to a vein recognition algorithm transplantation device, which comprises:
the image preprocessing algorithm building module is used for building a vein image preprocessing algorithm to be transplanted;
the vein recognition algorithm model building module is used for building a vein recognition algorithm model to be transplanted;
and the transplantation module is used for generating a dynamic link library based on the vein image preprocessing algorithm and the vein recognition algorithm model, compiling the dynamic link library into a library file, compiling and generating an executable program based on the library file and a logic code in the vein recognition algorithm, and importing the executable program into the vein equipment.
Compared with the prior art, the technical scheme provided by the invention has the following beneficial effects:
1. the vein recognition algorithm transplanting method generates a dynamic link library based on vein image preprocessing algorithm and vein recognition algorithm model transplanting, compiles the dynamic link library, compiles a logic code to generate an executable program, introduces the executable program into vein equipment, uses the dynamic link library, can save system space, can share a single dynamic link library by a plurality of application programs, and avoids that each application program links the library code as an independent copy into an executable mirror image when the application program uses the static link library.
2. The vein recognition algorithm transplanting method further guides the executable program into the vein equipment to be executed in the transplanting process of the vein image preprocessing algorithm and the vein recognition algorithm model, the vein equipment is debugged until the target effect is achieved, the debugged executable program is placed into the root file system, the system is set to start execution, the file system is made into a mirror image, the mirror image is burned into the vein equipment by using the burning tool of the corresponding chip, the executable program can be prevented from being directly placed into the vein equipment to be debugged, and the operation is simpler.
3. The vein image preprocessing algorithm in the vein recognition algorithm transplanting method is constructed based on a gray scale non-uniform correction method combining regional linear transformation and Gaussian homomorphic filtering, the method can enhance the contrast of each part of an original image, namely enhance the gray scale region of veins in an input image, relatively inhibit the non-vein gray scale regions, can enhance the preprocessing of the vein image, and can lay a good foundation for subsequent matching recognition.
4. The preprocessing algorithm and the vein recognition algorithm model used by the vein recognition algorithm transplanting method have the characteristics of small system memory occupation, no hardware platform, high landing speed and high transportability; can transplant to the volume after algorithm and the model conversion in the high in the clouds less, in the lower vein equipment of cost, can realize extensive volume production fast, also help improving vein recognition device's arithmetic speed.
Drawings
FIG. 1 is a flow chart of a vein recognition algorithm transplantation method;
fig. 2 is a structural framework diagram of a vein recognition algorithm transplantation device.
Detailed Description
For further understanding of the present invention, the present invention will be described in detail with reference to examples, which are provided for illustration of the present invention but are not intended to limit the scope of the present invention.
Example 1
Referring to fig. 1, the vein recognition algorithm transplantation method according to the present invention includes the following steps:
1) the vein image preprocessing algorithm to be transplanted is constructed based on a gray scale non-uniform correction method combining regional linear transformation and Gaussian homomorphic filtering, the vein image preprocessing algorithm is used for processing a vein image into a format meeting the input requirement of a vein recognition algorithm model, and the specific flow comprises the following steps:
1.1) utilizing an interpolation algorithm to zoom the vein image so as to realize normalization processing;
1.2) carrying out image enhancement processing on the vein image subjected to the normalization processing by utilizing a gray scale non-uniformity correction method combining regional linear transformation and multi-scale homomorphic filtering, namely, the method comprises the following steps:
1.2.1) setting the normalized vein image asf(x,y) The gray scale range of interest of the image is [ 2 ]a,b]Performing linear regional transformation processing on the image after the scale normalization processing according to the formulas (1) to (3), and expanding the interesting gray scale range of the image to [ 2 ]c,d]Obtaining vein image after linear regional transformationg(x,y):
After processing, because the gray levels of the transformed vein images between the interval [0, a ] and the interval [ b, L ] are compressed, the noise interference is weakened, the gray level range of the vein images shot by near infrared is 0 to 255, including the interested gray level range of the images and the noise gray level range, namely the noise gray level range is compressed as much as possible, and the interested gray level range is expanded; in the embodiment, the primary noise processing is carried out through the regional linear transformation, the noise range is compressed, and the influence on the processing result caused by the synchronous enhancement of the noise when the gray level of the region of interest is enhanced in the later period is avoided;
1.2.2) on the basis of the illumination-reflection model, on the processed vein imageCarrying out logarithmic transformation to obtain a vein image after logarithmic transformation:
in the formula (I), the compound is shown in the specification,is composed ofThe fourier transform of (d).
1.2.5) based onPerforming inverse Fourier transform to obtain an image after frequency domain conversion to spatial domain:
1.2.7) carrying out weighted summation on output results of homomorphic filtering of a plurality of scales to obtain a final image:
In the formula (I), the compound is shown in the specification,Nis a multi-scale number, generally takes 3 to 5,for the different single-scale images, the images,is an image after the linear transformation of the region,is thatThe value range of the weight of (2) is more than 0 and less than 1,for each single-scale imageWeight, and need to satisfy:
2) the method comprises the following steps of constructing a vein recognition algorithm model to be transplanted, wherein the vein recognition algorithm model is used for outputting a recognition result by utilizing a processed vein image, and the specific steps comprise:
2.1) carrying out feature extraction on the preprocessed vein image, namely, the method comprises the following steps:
2.1.1) traversing the entire preprocessed vein imagef(x,y) Splitting the image according to the pixel points to obtain four split imagesF 1 (x,y)、F 2 (x,y)、F 3 (x,y)、F 4 (x,y) The size of the split image is one fourth of that of the original image;
2.1.2) the four split images are respectively subjected to filtering processing by using bilateral filtering, and the vein image is split and then subjected to filtering processing, so that the size of the processed image can be reduced, and the operation efficiency is improved;
2.1.3) extracting terrain feature lines of the four filtered vein images respectively, namely, calculating first and second derivative values of each grid point by using concave-convex characteristics of the earth surface where the feature points are located and shown in different directions through a 3 x 3 moving window, judging the type of the feature points according to the positive and negative properties of the derivatives, judging ridge points if the derivatives are positive values, judging valley points if the derivatives are negative values, connecting all the ridge points to form ridge lines, and connecting all the valley points to form valley lines to form terrain feature lines;
in the embodiment, the terrain features are extracted by adopting a raster data image processing technology, regular grid DEM (digital elevation model) data is raster data, the elevation value corresponds to an image gray value, the DEM grid data can be regarded as a gray image, a vein gray image is regarded as DEM grid data, the image gray value corresponds to the elevation value, and subsequent operation is performed according to the theory.
2.1.4) carrying out feature coding on the four topographic feature line images to obtain four vein feature images, namely carrying out feature coding by utilizing the positive and negative combination relation of second-order derivatives related to the elevation Z in the X direction and the Y direction, wherein the coding mode is as follows:
if the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
In the formula (I), the compound is shown in the specification,、are respectively shown inxSecond derivatives in direction and y-direction with respect to elevation Z;
fusing the four vein features into a large feature image for subsequent comparison;
2.2) comparing the features of the vein image (namely the large feature image) after feature extraction, specifically comprising the following steps:
2.2.1) carrying out similarity sequencing on the features to be matched, wherein the sequencing comprises the following specific steps:
2.2.1.1) if the number of the features to be matched is 1, skipping the step 2.2.1), directly entering the step 2.2.2), and if the number of the matched features is more than 1, entering the step 2.2.1.2);
2.2.1.2) scaling the image matrix to be matched and the template characteristics to one fourth of the original image by a bilinear interpolation method;
2.2.1.3) calculating a structural similarity coefficient of the image feature matrix after scaling to express vein image similarity:
in the formula (I), the compound is shown in the specification,in order to calculate the value of the similarity,andtwo vein feature matrixes are respectively represented,andindividual watchDisplay characteristic matrixAndthe average value of the gray levels of (a),andrespectively representing feature matricesAndthe standard deviation of the gray scale of (a),representing two feature matricesAndthe covariance of (a) of (b),andrespectively are constants with the value range of more than 0 and less than or equal to 0.1;
taking an NxN window (N is generally 3, 5 and 7) from the feature matrix during each calculation, then continuously sliding the window for calculation, and finally taking an average value as a global similarity value;
2.2.1.4) sorting the features to be matched according to the size of the similarity value;
2.2.2) selecting top rankednFinal accurate comparison between the features to be matched and the template features, (0)<n<10, n is an integer), the concrete steps are as follows:
2.2.2.1) carrying out sliding window similarity calculation on the characteristics to be matched and the template characteristics, wherein the calculation formula is as follows:
in the formula:in order to calculate the comparison value after the calculation,in order to be the step size,for the maximum number of rows of the window,for the number of rows of the window,for the maximum number of columns of the window,for the number of window columns,is the step size in the direction of the window row,is the step size in the column direction of the window,for the features to be matched, the matching is carried out,the coordinates of the rows and the columns,similarity calculation table for the feature to be matched and the template feature, similarity calculation table for the feature to be matched and the template featureExpressed as:
wherein, the first and the second end of the pipe are connected with each other,calculating tables for similarityThe model parameters can be correspondingly set according to different vein image libraries, and a similarity calculation tableNeed to satisfy;
2.2.2.2) respectively rotating the vein features to be matched by 0 degree, plus or minus 2 degrees and plus or minus 4 degrees and then matching the vein features with the template features one by one to obtain a plurality of matching values, and selecting the minimum value from the plurality of matching values as a final matching result of the two features to be matched;
2.2.2.3) calculating the results of the vein images between and in classes according to the sliding window statistical calculation formula to obtain a data curve, determining a threshold value according to the curve, and judging whether the vein images belong to the same class or different classes according to the threshold value.
3) Transplanting a vein image pre-processing algorithm and a vein recognition algorithm model to a vein device, the vein device comprising: camera, light filter, reflector, infrared lamp plate, touch sensor touch, central processing unit CPU, its concrete step is:
3.1) under a windows system, generating a dynamic link library by a pretreatment algorithm to be transplanted and a vein recognition algorithm model under a release mode;
3.2) compiling the dynamic link library by using a cross compiler to generate a so library file under the linux system;
3.3) compiling the logic code in the so library file and the vein recognition algorithm to generate an executable program by using a cross compiler mips-linux-gnu-gcc; wherein the logic code is other programs in the vein recognition algorithm, such as programs for controlling the switch of equipment, prompting a user to place a finger and the like;
3.4) using the tool set lrzsz to introduce the executable program into the vein equipment through the serial port for execution, and debugging the vein equipment until the target effect is achieved;
3.5) putting the debugged executable program into a root file system, then setting the system to start execution, then making the file system into a mirror image, and burning the mirror image into vein equipment by using a burning tool of a corresponding chip;
the dynamic link library is used, the system space can be saved, a plurality of application programs can share the single dynamic link library, and the situation that when the application programs use the static link library, each application program needs to link the library codes into the executable mirror image as independent copies is avoided. The executable program is debugged in the equipment firstly and then put into the root file system, so that the problem that the operation is complex because the executable program is directly put into the vein equipment for debugging can be avoided.
The vein device executes the program after being powered on, and can perform a registration and verification process.
Example 2
Referring to fig. 2, the present invention also relates to a vein recognition algorithm transplantation device, which includes:
the image preprocessing algorithm building module builds a vein image preprocessing algorithm to be transplanted based on a gray scale non-uniform correction method combining regional linear transformation and Gaussian homomorphic filtering, and the vein image preprocessing algorithm is used for processing a vein image into a format meeting the input requirement of a vein recognition algorithm model; the image preprocessing algorithm building module is used for realizing the function of the step 1) in the embodiment 1;
the vein recognition algorithm model building module is used for building a vein recognition algorithm model to be transplanted, and the vein recognition algorithm model is used for outputting a recognition result by utilizing the processed vein image; the vein recognition algorithm model construction module is used for realizing the function of the step 2) of the embodiment 1;
the transplantation module is used for transplanting the vein image preprocessing algorithm and the vein recognition algorithm model to vein equipment; the transplanting module is used for realizing the function of the step 3) of the embodiment 1.
Obviously, the vein recognition algorithm transplantation device of the present embodiment can completely implement the vein recognition algorithm transplantation method described in embodiment 1.
The present invention has been described in detail with reference to the embodiments, but the description is only for the preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. All equivalent changes and modifications made within the scope of the present invention shall fall within the scope of the present invention.
Claims (6)
1. A vein recognition algorithm transplanting method is characterized in that: which comprises the following steps:
1) the method comprises the following steps of constructing a vein image preprocessing algorithm to be transplanted based on a gray scale non-uniformity correction method combining regional linear transformation and Gaussian homomorphic filtering, wherein the constructed vein image preprocessing algorithm is used for processing a vein image into a format meeting the input requirement of a vein recognition algorithm model, and the calculation step of the vein image preprocessing algorithm comprises the following steps:
1.1) carrying out scale normalization processing on the vein image;
1.2) carrying out image enhancement processing by utilizing a gray scale non-uniformity correction method combining regional linear transformation and multi-scale homomorphic filtering, wherein the image enhancement processing comprises the following specific steps:
1.2.1) setting the normalized vein image asf(x,y),xAndyrespectively is the row coordinate and the column coordinate of the vein image matrix, and the interesting gray scale range of the vein image is [ 2 ]a,b],aAndbrespectively a minimum gray value and a maximum gray value of a gray scale range of interest of the vein image, performing regional linear transformation processing on the image subjected to the scale normalization processing according to formulas (1) - (3), and expanding the gray scale range of interest of the vein image to [ 2 ]c,d] ,cAnddrespectively carrying out minimum gray value and maximum gray value after expansion on the vein image interesting gray range interval to obtain the vein image after regional linear transformationg(x,y):
1.2.2) on the basis of the illumination-reflection model, on the processed vein imageCarrying out logarithmic transformation to obtain a vein image after logarithmic transformation:
in the formula (I), the compound is shown in the specification,is composed ofThe fourier transform of (a) the signal,uandvrespectively obtaining variables of a row coordinate and a column coordinate x and y of the vein image matrix through Fourier transform;
1.2.5) based onPerforming inverse Fourier transform to obtain an image after frequency domain conversion to spatial domain:
1.2.7) entering the output results of homomorphic filtering of multiple scalesLine weighted summation to obtain the final image:
In the formula (I), the compound is shown in the specification,N3-5 of the multi-scale number,for the different single-scale images, the images,is an image after the linear transformation of the region,is thatThe value range of the weight of (2) is more than 0 and less than 1,the weight of each single-scale image is required to satisfy the following conditions:
2) the vein recognition method comprises the following steps of constructing a vein recognition algorithm model to be transplanted, outputting a recognition result by utilizing a processed vein image, and calculating the vein recognition of the constructed vein recognition algorithm model to be transplanted, wherein the vein recognition calculation step comprises the following steps:
2.1) carrying out feature extraction on the preprocessed vein image, wherein the specific steps comprise:
2.1.1) traversing the entire preprocessed vein imagef(x,y) Splitting the image according to the pixel points to obtain four split imagesImage of (2)F 1 (x,y)、F 2 (x,y)、F 3 (x,y)、F 4 (x,y);
2.1.2) filtering the four split images by using bilateral filtering respectively;
2.1.3) respectively extracting the terrain characteristic lines of the four filtered vein images;
2.1.4) carrying out feature coding on the four topographic feature line images to obtain four vein feature images, and fusing the four vein features into a large feature image for subsequent comparison;
2.2) comparing the characteristics of the vein images after the characteristic extraction;
3) the method comprises the steps of generating a dynamic link library based on a vein image preprocessing algorithm and a vein recognition algorithm model, compiling the dynamic link library into a library file, compiling based on the library file and a logic code in the vein recognition algorithm to generate an executable program, and importing the executable program into vein equipment.
2. The vein recognition algorithm transplantation method of claim 1, wherein: the step 3) specifically comprises the following steps:
3.1) generating a dynamic link library based on a vein image preprocessing algorithm to be transplanted and a vein recognition algorithm model to be transplanted;
3.2) compiling the dynamic link library into a library file by using a cross compiler;
3.3) compiling the compiled library file and the logic code in the vein recognition algorithm by using a cross compiler to generate an executable program;
3.4) importing the executable program into the vein equipment for execution, and debugging the vein equipment until the target effect is achieved;
and 3.5) putting the debugged executable program into a root file system, setting the system to start and execute, manufacturing the file system into a mirror image, and burning the mirror image into the vein equipment by using a burning tool of a corresponding chip.
3. The vein recognition algorithm transplantation method of claim 1, wherein: in the step 2.1.3), extracting the terrain feature line is to calculate first and second derivative values of each grid point by using concave-convex characteristics of the earth surface where the feature points are located and showing in different directions through a 3 x 3 moving window, judge the type of the feature points according to the positive and negative of the derivatives, judge the feature points as ridge points if the derivatives are positive, judge valley points if the derivatives are negative, connect all ridge points to form ridge lines, connect all valley points to form valley lines, and obtain the terrain feature line;
the feature coding of the topographic feature line image in the step 2.1.4) is to perform feature coding by using a positive and negative combination relation of a second derivative related to an elevation Z in an X direction and a Y direction, and the coding mode is as follows:
if the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
If the following conditions are satisfied:
4. The vein recognition algorithm transplantation method of claim 1, wherein: the 2.2) the specific steps of comparing the features of the vein image after feature extraction comprise:
2.2.1) carrying out similarity sequencing on the features to be matched, wherein the sequencing comprises the following specific steps:
2.2.1.1) if the number of the features to be matched is 1, skipping the step 2.2.1), and directly entering the step 2.2.2), and if the number of the matched features is more than 1, entering the step 2.2.1.2);
2.2.1.2) scaling the image matrix to be matched and the template characteristics to one fourth of the original image by a bilinear interpolation method;
2.2.1.3) calculating a structural similarity coefficient of the image feature matrix after scaling to express vein image similarity:
in the formula (I), the compound is shown in the specification,in order to calculate the value of the similarity,andtwo vein feature matrixes are respectively represented,andrespectively representing feature matricesAndthe average value of the gray levels of (a),andrespectively representing feature matricesAndthe standard deviation of the gray scale of (a),representing two feature matricesAndthe covariance of (a) of (b),andrespectively are constants with the value range of more than 0 and less than or equal to 0.1;
2.2.1.4) sorting the features to be matched according to the size of the similarity value;
2.2.2) selecting top rankednAnd finally, accurately comparing the characteristics to be matched with the template characteristics, and specifically comprising the following steps:
2.2.2.1) carrying out sliding window similarity calculation on the characteristics to be matched and the template characteristics, wherein the calculation formula is as follows:
in the formula:in order to calculate the comparison value after the calculation,in order to be the step size,for the maximum number of rows of the window,for the number of rows of the window,for the maximum number of columns of the window,the number of columns of the window is,is the step size in the direction of the window row,for the step size in the column direction of the window,for the features to be matched, the matching is carried out,is a row-column coordinate system, and is characterized in that,similarity calculation table for the feature to be matched and the template feature, similarity calculation table for the feature to be matched and the template featureExpressed as:
wherein the content of the first and second substances,calculating tables for similarityModel parameter of (2), similarity calculation tableNeed to satisfy;
2.2.2.2) respectively rotating the vein features to be matched by 0 degree, plus or minus 2 degrees and plus or minus 4 degrees and then matching the vein features with the template features one by one to obtain a plurality of matching values, and selecting the minimum value from the plurality of matching values as a final matching result of the two features to be matched;
2.2.2.3) calculating the results of the vein images between and in classes according to the sliding window statistical calculation formula to obtain a data curve, determining a threshold value according to the curve, and judging whether the vein images belong to the same class or different classes according to the threshold value.
5. The vein recognition algorithm transplantation method of claim 1, wherein: uploading the vein image preprocessing algorithm to be transplanted and the vein recognition algorithm model to be transplanted, which are constructed in the steps 1) and 2), to a cloud, and extracting the vein image preprocessing algorithm and the vein recognition algorithm model from the cloud in the step 3).
6. A vein recognition algorithm transplantation device using the vein recognition algorithm transplantation method according to claim 1, characterized in that: it includes:
the image preprocessing algorithm building module is used for building a vein image preprocessing algorithm to be transplanted;
the vein recognition algorithm model building module is used for building a vein recognition algorithm model to be transplanted;
and the transplantation module is used for generating a dynamic link library based on the vein image preprocessing algorithm and the vein recognition algorithm model, compiling the dynamic link library into a library file, compiling and generating an executable program based on the library file and a logic code in the vein recognition algorithm, and importing the executable program into the vein equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210504041.9A CN114612655B (en) | 2022-05-10 | 2022-05-10 | Vein recognition algorithm transplanting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210504041.9A CN114612655B (en) | 2022-05-10 | 2022-05-10 | Vein recognition algorithm transplanting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114612655A CN114612655A (en) | 2022-06-10 |
CN114612655B true CN114612655B (en) | 2022-08-02 |
Family
ID=81869554
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210504041.9A Active CN114612655B (en) | 2022-05-10 | 2022-05-10 | Vein recognition algorithm transplanting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114612655B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111639560B (en) * | 2020-05-15 | 2023-05-30 | 圣点世纪科技股份有限公司 | Finger vein feature extraction method and device based on dynamic fusion of vein skeleton line and topographic concave-convex characteristics |
CN115311685B (en) * | 2022-08-05 | 2023-05-02 | 杭州电子科技大学 | Millimeter wave image detection result judging method based on average structural similarity |
CN115578760B (en) * | 2022-11-15 | 2023-05-30 | 山东圣点世纪科技有限公司 | Control system and control method based on topographic relief vein recognition |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9289160B2 (en) * | 2013-04-11 | 2016-03-22 | Yaroslav Ryabov | Portable biometric identification device using a dorsal hand vein pattern |
CN107016341A (en) * | 2017-03-03 | 2017-08-04 | 西安交通大学 | A kind of embedded real-time face recognition methods |
CN108122213B (en) * | 2017-12-25 | 2019-02-12 | 北京航空航天大学 | A kind of soft image Enhancement Method based on YCrCb |
-
2022
- 2022-05-10 CN CN202210504041.9A patent/CN114612655B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114612655A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114612655B (en) | Vein recognition algorithm transplanting method and device | |
CN107194937A (en) | Tongue image partition method under a kind of open environment | |
CN107481273B (en) | Rapid image matching method for autonomous navigation of spacecraft | |
CN109191424B (en) | Breast mass detection and classification system and computer-readable storage medium | |
CN106204482B (en) | Based on the mixed noise minimizing technology that weighting is sparse | |
CN109146000B (en) | Method and device for improving convolutional neural network based on freezing weight | |
CN109002763B (en) | Method and device for simulating human face aging based on homologous continuity | |
CN109753996B (en) | Hyperspectral image classification method based on three-dimensional lightweight depth network | |
CN108681689B (en) | Frame rate enhanced gait recognition method and device based on generation of confrontation network | |
CN104217406A (en) | SAR image noise reduction method based on shear wave coefficient processing | |
Gonçalves et al. | Carcass image segmentation using CNN-based methods | |
CN107292855B (en) | Image denoising method combining self-adaptive non-local sample and low rank | |
Jenifa et al. | Classification of cotton leaf disease using multi-support vector machine | |
CN113160392B (en) | Optical building target three-dimensional reconstruction method based on deep neural network | |
CN114037891A (en) | High-resolution remote sensing image building extraction method and device based on U-shaped attention control network | |
CN111091580B (en) | Stumpage image segmentation method based on improved ResNet-UNet network | |
CN111027570B (en) | Image multi-scale feature extraction method based on cellular neural network | |
CN111666813A (en) | Subcutaneous sweat gland extraction method based on three-dimensional convolutional neural network of non-local information | |
CN112380967B (en) | Spatial artificial target spectrum unmixing method and system based on image information | |
CN115546157A (en) | Method, device and storage medium for evaluating radiation quality of satellite image | |
CN115346091A (en) | Method and device for generating Mura defect image data set | |
CN114897884A (en) | No-reference screen content image quality evaluation method based on multi-scale edge feature fusion | |
CN110517326B (en) | Colorimetric sensor array optimization method based on weight dragonfly algorithm | |
CN113034475A (en) | Finger OCT (optical coherence tomography) volume data denoising method based on lightweight three-dimensional convolutional neural network | |
CN113096746A (en) | LightGBM-based salt lake lithium concentration inversion method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |