Disclosure of Invention
The present disclosure aims to solve one of the above problems, and provides a method and an apparatus for processing an iris image, which can increase the processing accuracy of the iris image by correcting the iris image, extract a region of interest of the iris image, and perform filtering noise reduction on the region of interest, thereby accelerating the processing rate of the iris image to a certain extent.
The method specifically comprises the following steps:
step 1, iris image information of a user is obtained as a first image;
step 2, preprocessing the first image to obtain a second image;
step 3, extracting the region of interest image from the second image to obtain a third image;
and 4, performing filtering processing on the third image, and performing image addition on the third image after the filtering processing and the empty template image with the same size of the second image to obtain a fourth image, wherein the fourth image is an image which can be used for iris recognition.
Further, the preprocessing operation in the step 2 specifically includes the following steps:
step 201, performing binarization processing on the first image to obtain a fifth image;
step 202, extracting edge contours of a fifth image through a Canny operator to obtain a sixth image;
step 203, obtaining the upper, lower, left and right edge points of the outline image of the outermost edge of the sixth image by scanning the sixth image;
step 204, correcting the first image by using the four edge points as reference points to obtain a second image, wherein the correction criterion is as follows: the upper and lower edge points are treated as co-ordinates, and the left and right edge points are treated as co-ordinates.
Further, the region of interest image extraction in the above step 3 specifically includes the following:
step 301, scanning a second image from left to right to obtain a second gray jump point on the left side of the second image;
step 302, scanning the second image from right to left to obtain a second gray jump point on the right side of the second image;
step 303, scanning the second image from top to bottom to obtain a second gray jump point on the upper side of the second image;
step 304, scanning the second image from bottom to top to obtain a second gray jump point at the lower side of the second image;
step 305, respectively taking the second gray jump points on the upper, lower, left and right sides as intersection points to make straight lines in the horizontal and vertical directions, wherein a square area formed by the straight lines is an image of the region of interest;
and 306, performing image segmentation on the second image to extract the region-of-interest image to obtain a third image.
Further, the specific manner of image segmentation in step 306 is by an image segmentation method employing connected domain segmentation.
Further, the filtering processing in the above step 4 specifically performs filtering processing on the third image by using a Gabor filter in the polar coordinate form of five dimensions.
Further, the image addition operation in the above step 4 specifically obtains a fourth image by image-adding the filtered third image and the empty template image of the second image using an addWeighted function of OpenCV.
Also proposed is an iris image processing apparatus, the apparatus comprising:
the image acquisition module is used for acquiring iris image information of a user as a first image;
the image preprocessing module is used for preprocessing the first image to obtain a second image;
the region of interest image extraction module is used for extracting the region of interest image from the second image to obtain a third image;
an image processing module including a filter processing unit and an image adding unit,
the filtering processing unit is used for carrying out filtering processing on the third image;
the image adding unit is used for carrying out image addition on the third image after the filtering processing and the empty template image with the same size of the second image to obtain a fourth image.
Further, the image preprocessing module comprises an image binarization unit, an image edge contour extraction unit, an image edge point extraction unit and an image correction unit,
the image binarization unit is used for performing binarization processing on the first image to obtain a fifth image,
the image edge contour extraction unit is used for extracting edge contour of the fifth image through a Canny operator to obtain a sixth image,
the image edge point extraction unit is used for scanning the sixth image to obtain four edge points of the upper edge point, the lower edge point, the left edge point and the right edge point of the outline image of the outermost edge of the sixth image,
the image correction unit is used for correcting the first image by taking the four edge points as reference points to obtain a second image, and the correction criterion is as follows: the upper and lower edge points are treated as co-ordinates, and the left and right edge points are treated as co-ordinates.
The beneficial effects of the present disclosure are: the application discloses a processing method of an iris image, which can increase the processing accuracy of the iris image by correcting the iris image, extract the region of interest of the iris image, and filter and reduce noise aiming at the region of interest, thereby accelerating the processing speed of the iris image to a certain extent.
Detailed Description
The conception, specific structure, and technical effects produced by the present disclosure will be clearly and completely described below in connection with the embodiments and the drawings to fully understand the objects, aspects, and effects of the present disclosure. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
Fig. 1 is a flowchart illustrating a method of processing an iris image according to the present disclosure, and a method of processing an iris image according to an embodiment of the present disclosure is described below with reference to fig. 1.
The disclosure provides a processing method of iris images, which specifically comprises the following steps:
step 1, iris image information of a user is obtained as a first image;
step 2, preprocessing the first image to obtain a second image;
step 3, extracting the region of interest image from the second image to obtain a third image;
and 4, performing filtering processing on the third image, and performing image addition on the third image after the filtering processing and the empty template image with the same size of the second image to obtain a fourth image, wherein the fourth image is an image which can be used for iris recognition.
As a preferred embodiment of the present application, the pretreatment operation in the above step 2 specifically includes the following:
step 201, performing binarization processing on the first image to obtain a fifth image;
step 202, extracting edge contours of a fifth image through a Canny operator to obtain a sixth image;
step 203, obtaining the upper, lower, left and right edge points of the outline image of the outermost edge of the sixth image by scanning the sixth image;
step 204, correcting the first image by using the four edge points as reference points to obtain a second image, wherein the correction criterion is as follows: the upper and lower edge points are treated as co-ordinates, and the left and right edge points are treated as co-ordinates.
Because the image is often required to be normalized during the training of iris recognition, the image is usually corrected, but the image is often not corrected during the general iris image acquisition process, if the image is directly processed, on one hand, the time for processing the image may be increased, and on the other hand, the image recognition may fail because the image is not corrected. The correction concept of this embodiment is that four feature points of the outline of the iris image (that is, the image of the orbit) are obtained by means of image scanning, the image is aligned up and down and left and right according to the four feature points, and thus the image is corrected.
As a preferred embodiment of the present application, the region of interest image extraction in the above step 3 specifically includes the following:
step 301, scanning a second image from left to right to obtain a second gray jump point on the left side of the second image;
step 302, scanning the second image from right to left to obtain a second gray jump point on the right side of the second image;
step 303, scanning the second image from top to bottom to obtain a second gray jump point on the upper side of the second image;
step 304, scanning the second image from bottom to top to obtain a second gray jump point at the lower side of the second image;
step 305, respectively taking the second gray jump points on the upper, lower, left and right sides as intersection points to make straight lines in the horizontal and vertical directions, wherein a square area formed by the straight lines is an image of the region of interest;
and 306, performing image segmentation on the second image to extract the region-of-interest image to obtain a third image.
In this embodiment, since the region of interest image of the iris image is the pupil image in the orbit, the first gray level jump point should be located in the orbit image, and the second gray level jump point should be located in the pupil, so that the region of interest image can be extracted.
As a preferred embodiment of the present application, the specific manner of image segmentation in step 306 is by an image segmentation method employing connected domain segmentation.
As a preferred embodiment of the present application, the filtering process in the above step 4 specifically performs the filtering process on the third image by using a Gabor filter in the polar coordinate form of five dimensions.
As a preferred embodiment of the present application, the image addition operation in the above step 4 obtains a fourth image by image-adding the filtered third image and the empty template image of the second image using an addWeighted function of OpenCV.
Also proposed is an iris image processing apparatus, the apparatus comprising:
the image acquisition module is used for acquiring iris image information of a user as a first image;
the image preprocessing module is used for preprocessing the first image to obtain a second image;
the region of interest image extraction module is used for extracting the region of interest image from the second image to obtain a third image;
an image processing module including a filter processing unit and an image adding unit,
the filtering processing unit is used for carrying out filtering processing on the third image;
the image adding unit is used for carrying out image addition on the third image after the filtering processing and the empty template image with the same size of the second image to obtain a fourth image.
As a preferred embodiment of the present application, the image preprocessing module includes an image binarization unit, an image edge contour extraction unit, an image edge point extraction unit and an image correction unit,
the image binarization unit is used for performing binarization processing on the first image to obtain a fifth image,
the image edge contour extraction unit is used for extracting edge contour of the fifth image through a Canny operator to obtain a sixth image,
the image edge point extraction unit is used for scanning the sixth image to obtain four edge points of the upper edge point, the lower edge point, the left edge point and the right edge point of the outline image of the outermost edge of the sixth image,
the image correction unit is used for correcting the first image by taking the four edge points as reference points to obtain a second image, and the correction criterion is as follows: the upper and lower edge points are treated as co-ordinates, and the left and right edge points are treated as co-ordinates.
The iris image processing device can be operated in computing equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The device operable by the iris image processing device may include, but is not limited to, a processor and a memory. It will be appreciated by those skilled in the art that the example is merely an example of an iris image processing apparatus, and is not limited to an iris image processing apparatus, and may include more or fewer components than the example, or may combine some components, or different components, e.g., the iris image processing apparatus may further include an input/output device, a network access device, a bus, etc. The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center of the apparatus for operating the processing apparatus for iris images, and connects various parts of the entire apparatus for operating the processing apparatus for iris images using various interfaces and lines.
The memory may be used to store the computer program and/or the module, and the processor may implement various functions of the iris image processing apparatus by running or executing the computer program and/or the module stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
While the present disclosure has been described in considerable detail and with particularity with respect to several described embodiments, it is not intended to be limited to any such detail or embodiments or any particular embodiment, but is to be construed as providing broad interpretation of such claims by reference to the appended claims in view of the prior art so as to effectively encompass the intended scope of the disclosure. Furthermore, the foregoing description of the present disclosure has been presented in terms of embodiments foreseen by the inventor for the purpose of providing a enabling description for enabling the enabling description to be available, notwithstanding that insubstantial changes in the disclosure, not presently foreseen, may nonetheless represent equivalents thereto.