A method and system for removing noise from eye images

By performing grayscale judgment on eye images and adaptive median filtering and wavelet denoising algorithm processing, the impact of multiple noise pollution on image feature extraction and identification classification is solved, and effective filtering of salt and pepper noise and Gaussian noise is achieved, and image quality is improved.

CN113012058BActive Publication Date: 2025-05-02HENAN BAIYINXING PRINTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110153407.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-04
Publication Date
2025-05-02
Estimated Expiration
2041-02-04

AI Technical Summary

Technical Problem

The prior art is difficult to effectively remove the impact of multiple noise pollution on image feature extraction and identification classification.

Method used

An eye image noise removal method is provided. By graying the eye image to be processed and determining whether there is salt and pepper noise in pixel points, the adaptive median filtering algorithm and wavelet denoising algorithm are used for filtering.

Benefits of technology

This method not only retains important feature information of the original image, but also filters salt and pepper noise and Gaussian noise to improve image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113012058B_ABST
    Figure CN113012058B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for removing noise from an eye image, comprising selecting an eye image to be processed; graying the eye image to be processed and converting it into a grayscale image; judging whether there is salt and pepper noise in the pixel points to be processed in the grayscale image; and processing the grayscale image according to the judgment result. The present invention uses an adaptive median filtering algorithm and a wavelet denoising algorithm for further filtering, which not only retains important feature information of the original image but also has a good filtering effect on salt and pepper noise and Gaussian noise. The present invention is applicable to the field of image detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a method and system for removing noise from eye images. Background Art

[0002] A large number of experimental studies have shown that noise has a direct impact on image feature extraction, recognition and classification. Therefore, it is usually necessary to perform preprocessing such as smoothing on the collected images. However, in real life, images are usually contaminated by more than one type of noise, and how to effectively remove multiple types of noise has become an urgent problem to be solved. Summary of the invention

[0003] To solve the above problems, the present disclosure provides a technical solution of a method and system for removing noise from an eye image. According to one aspect of the present disclosure, a method for removing noise from an eye image is provided, and the method comprises the following steps:

[0004] S100, selecting an eye image to be processed;

[0005] S200, graying the eye image to be processed and converting it into a grayscale image;

[0006] S300, determining whether there is salt and pepper noise at a pixel point to be processed in the grayscale image;

[0007] S400, processing the grayscale image according to the judgment result.

[0008] Specifically, the eye image to be processed is grayed out and converted into a grayscale image using MATLAB software.

[0009] Specifically, the size of the grayscale image is M×N, where M and N are the length and width of the pixel matrix of the grayscale image, and M and N are integers greater than or equal to 1.

[0010] Specifically, in S300, the step of determining whether there is salt and pepper noise in the pixel to be processed in the grayscale image is as follows: setting a filter window to filter the grayscale image, wherein the size of the filter window is a square whose initial side length is equal to 3; calculating the grayscale value of the pixel to be processed in the grayscale image, and if the grayscale value of the pixel to be processed is 0 or 255, determining that the pixel to be processed is salt and pepper noise, that is, there is salt and pepper noise in the pixel to be processed in the grayscale image; if the grayscale value of the pixel to be processed is not 0 or 255, determining that the pixel to be processed is not salt and pepper noise, that is, there is no salt and pepper noise in the pixel to be processed in the grayscale image.

[0011] Specifically, in S400, according to the judgment result, the step of processing the grayscale image to obtain the final image is:

[0012] S410, if there is salt and pepper noise in the pixel to be processed in the grayscale image, use an adaptive median filtering algorithm to perform median filtering on the grayscale image in the spatial domain, and then go to S430;

[0013] S420, if there is no salt and pepper noise at the pixel point to be processed in the grayscale image, keep the original value of the pixel value of the pixel point to be processed in the grayscale image and output it, then go to S430;

[0014] S430, transforming the grayscale image after the median filtering outputted from S410 or the grayscale image outputted from S420 into the wavelet domain, and filtering using a wavelet denoising algorithm.

[0015] Specifically, in S430, the grayscale image after the median filtering output by S410 or the grayscale image output by S420 is transformed into the wavelet domain, and the method of filtering using the wavelet denoising algorithm is as follows: the grayscale image after the median filtering output by S410 or the grayscale image output by S420 is multi-scale decomposed, the wavelet basis is db8, the number of decomposition layers is 3, high-frequency coefficients and low-frequency coefficients are obtained at each scale, the upper threshold and the lower threshold are set, the wavelet coefficients below the lower threshold are set to 0, the other wavelet coefficients are quantized by the corresponding threshold function, and the wavelet coefficients after the processing are reconstructed; the threshold function used for the reconstruction processing is:

[0016]

[0017] Among them, w i,j is the jth wavelet coefficient of the i-th layer, sgh() is the sign function, u is the coefficient, λ i,j is the threshold value;

[0018]

[0019] Here

[0020]

[0021]

[0022]

[0023] Among them, m, t are coefficients greater than zero, σ is the standard deviation of Gaussian noise, and N is the signal length.

[0024] The present invention also provides an eye image noise removal system, the system comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program in the following system units:

[0025] An acquisition unit, used for selecting an eye image to be processed;

[0026] A grayscale unit, used for graying the eye image to be processed and converting it into a grayscale image;

[0027] A judging unit, used for judging whether there is salt and pepper noise at a pixel point to be processed in the grayscale image;

[0028] The processing unit is used to process the grayscale image according to the judgment result.

[0029] The beneficial effects of the present disclosure are as follows: the present invention provides a method and system for removing noise from eye images, which uses an adaptive median filtering algorithm and a wavelet denoising algorithm for further filtering, which not only retains the important feature information of the original image but also has a good filtering effect on salt and pepper noise and Gaussian noise. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and other features of the present disclosure will become more apparent by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present disclosure represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:

[0031] Figure 1 Shown is a flow chart of a method for removing noise from an eye image;

[0032] Figure 2 Shown is a structural diagram of an eye image noise removal system. DETAILED DESCRIPTION

[0033] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present disclosure, so as to fully understand the purpose, scheme and effect of the present disclosure. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0034] like Figure 1 The flowchart of a method for removing noise from an eye image according to the present disclosure is shown below. Figure 1 A method for removing eye image noise according to an embodiment of the present disclosure is described below.

[0035] The present disclosure provides a method for removing eye image noise, the method comprising the following steps:

[0036] S100, selecting an eye image to be processed;

[0037] S200, graying the eye image to be processed and converting it into a grayscale image;

[0038] S300, determining whether there is salt and pepper noise at a pixel point to be processed in the grayscale image;

[0039] S400, processing the grayscale image according to the judgment result.

[0040] Specifically, the eye image to be processed is grayed out and converted into a grayscale image using MATLAB software.

[0041] Specifically, the size of the grayscale image is M×N, where M and N are the length and width of the pixel matrix of the grayscale image, and M and N are integers greater than or equal to 1.

[0042] Specifically, in S300, the step of determining whether there is salt and pepper noise in the pixel to be processed in the grayscale image is as follows: setting a filter window to filter the grayscale image, wherein the size of the filter window is a square whose initial side length is equal to 3; calculating the grayscale value of the pixel to be processed in the grayscale image, and if the grayscale value of the pixel to be processed is 0 or 255, determining that the pixel to be processed is salt and pepper noise, that is, there is salt and pepper noise in the pixel to be processed in the grayscale image; if the grayscale value of the pixel to be processed is not 0 or 255, determining that the pixel to be processed is not salt and pepper noise, that is, there is no salt and pepper noise in the pixel to be processed in the grayscale image.

[0043] Specifically, in S400, according to the judgment result, the step of processing the grayscale image to obtain the final image is:

[0044] S410, if there is salt and pepper noise in the pixel to be processed in the grayscale image, use an adaptive median filtering algorithm to perform median filtering on the grayscale image in the spatial domain, and then go to S430;

[0045] S420, if there is no salt and pepper noise at the pixel point to be processed in the grayscale image, keep the original value of the pixel value of the pixel point to be processed in the grayscale image and output it, then go to S430;

[0046] S430, transforming the grayscale image after the median filtering outputted from S410 or the grayscale image outputted from S420 into the wavelet domain, and filtering using a wavelet denoising algorithm.

[0047] Specifically, in S430, the grayscale image after the median filtering output by S410 or the grayscale image output by S420 is transformed into the wavelet domain, and the method of filtering using the wavelet denoising algorithm is as follows: the grayscale image after the median filtering output by S410 or the grayscale image output by S420 is multi-scale decomposed, the wavelet basis is db8, the number of decomposition layers is 3, high-frequency coefficients and low-frequency coefficients are obtained at each scale, the upper threshold and the lower threshold are set, the wavelet coefficients below the lower threshold are set to 0, the other wavelet coefficients are quantized by the corresponding threshold function, and the wavelet coefficients after the processing are reconstructed; the threshold function used for the reconstruction processing is:

[0048]

[0049] Among them, w i,j is the jth wavelet coefficient of the i-th layer, sgh() is the sign function, u is the coefficient, λ i,j is the threshold value;

[0050]

[0051] Here

[0052]

[0053]

[0054]

[0055] Among them, m, t are coefficients greater than zero, σ is the standard deviation of Gaussian noise, and N is the signal length.

[0056] An embodiment of the present disclosure provides an eye image noise removal system, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to run in the following system units:

[0057] An acquisition unit, used for selecting an eye image to be processed;

[0058] A grayscale unit, used for graying the eye image to be processed and converting it into a grayscale image;

[0059] A judging unit, used for judging whether there is salt and pepper noise at a pixel point to be processed in the grayscale image;

[0060] The processing unit is used to process the grayscale image according to the judgment result.

[0061] The eye image noise removal system can be run in computing devices such as desktop computers, notebooks, PDAs, and cloud servers. The eye image noise removal system can be operated on systems including, but not limited to, processors and memories. Those skilled in the art will appreciate that the example is merely an example of an eye image noise removal system and does not constitute a limitation on an eye image noise removal system. It can include more or fewer components than the example, or a combination of certain components, or different components. For example, the eye image noise removal system can also include input and output devices, network access devices, buses, and the like.

[0062] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the eye image noise removal system, and uses various interfaces and lines to connect the various parts of the entire eye image noise removal system.

[0063] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the eye image noise removal system by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0064] Although the description of the present disclosure has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims by reference to the appended claims in view of the prior art, thereby effectively covering the intended scope of the present disclosure. In addition, the above description of the present disclosure is based on the embodiments foreseeable by the inventors, and its purpose is to provide a useful description, and those non-substantial changes to the present disclosure that have not yet been foreseen may still represent equivalent changes to the present disclosure.

Claims

1. A method for removing noise from an eye image, characterized in that: The method comprises the following steps: S100, selecting an eye image to be processed; S200, graying the eye image to be processed and converting it into a grayscale image; S300, determining whether there is salt and pepper noise at a pixel point to be processed in the grayscale image; S400, processing the grayscale image according to the judgment result; In S400, according to the judgment result, the step of processing the grayscale image to obtain the final image is: S410, if there is salt and pepper noise in the pixel to be processed in the grayscale image, use an adaptive median filtering algorithm to perform median filtering on the grayscale image in the spatial domain, and then go to S430; S420, if there is no salt and pepper noise at the pixel point to be processed in the grayscale image, keep the original pixel value of the pixel point to be processed in the grayscale image and output it, then go to S430; S430, transforming the grayscale image after the median filtering outputted from S410 or the grayscale image outputted from S420 into the wavelet domain, and filtering using a wavelet denoising algorithm; In S430, the grayscale image after the median filtering output by S410 or the grayscale image output by S420 is transformed into the wavelet domain, and the method of filtering by using the wavelet denoising algorithm is as follows: the grayscale image after the median filtering output by S410 or the grayscale image output by S420 is multi-scale decomposed, the wavelet basis is db8, the number of decomposition layers is 3, high-frequency coefficients and low-frequency coefficients are obtained at each scale, the upper threshold and the lower threshold are set, the wavelet coefficients below the lower threshold are set to 0, the other wavelet coefficients are quantized by the corresponding threshold function, and the wavelet coefficients after the processing are reconstructed; the threshold function used for the reconstruction processing is: ; in, is the jth wavelet coefficient of the i-th layer, sgh() is the sign function, u is the coefficient, is the threshold value; , Here , , , Among them, m, t are coefficients greater than zero, is the standard deviation of Gaussian noise, and N is the signal length.

2. The method for removing eye image noise according to claim 1, characterized in that: The grayscale image The size is M×N, where M and N are the length and width of the pixel matrix of the grayscale image, and M and N are integers greater than or equal to 1.

3. The method for removing eye image noise according to claim 1, characterized in that: In S300, it is determined that The steps to determine whether there is salt and pepper noise at the pixel to be processed in the grayscale image are as follows: A filtering window is set to filter the grayscale image, and the size of the filtering window is a square with an initial side length equal to 3; the grayscale value of the pixel to be processed in the grayscale image is calculated, and if the grayscale value of the pixel to be processed is 0 or 255, it is judged that the pixel to be processed is salt and pepper noise, that is, the pixel to be processed in the grayscale image has salt and pepper noise; if the grayscale value of the pixel to be processed is not 0 or 255, it is judged that the pixel to be processed is not salt and pepper noise, that is, the pixel to be processed in the grayscale image does not have salt and pepper noise.

4. A system for removing noise from an eye image, the system comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to run in the following system units: An acquisition unit, used for selecting an eye image to be processed; A grayscale unit, used for graying the eye image to be processed and converting it into a grayscale image; A judging unit, used to judge whether there is salt and pepper noise at a pixel point to be processed in the grayscale image; A processing unit, used for processing the grayscale image according to the judgment result; According to the judgment result, the steps of processing the grayscale image to obtain the final image are: S410, if there is salt and pepper noise in the pixel to be processed in the grayscale image, use an adaptive median filtering algorithm to perform median filtering on the grayscale image in the spatial domain, and then go to S430; S420, if there is no salt and pepper noise at the pixel point to be processed in the grayscale image, keep the original pixel value of the pixel point to be processed in the grayscale image and output it, then go to S430; S430, transforming the grayscale image after the median filtering outputted from S410 or the grayscale image outputted from S420 into the wavelet domain, and filtering using a wavelet denoising algorithm; The grayscale image after median filtering output by S410 or the grayscale image output by S420 is transformed into the wavelet domain, and the method of filtering by wavelet denoising algorithm is as follows: the grayscale image after median filtering output by S410 or the grayscale image output by S420 is subjected to multi-scale decomposition, the wavelet basis is db8, the number of decomposition layers is 3, high-frequency coefficients and low-frequency coefficients are obtained at each scale, the upper threshold and the lower threshold are set, the wavelet coefficients below the lower threshold are set to 0, the other wavelet coefficients are quantized by the corresponding threshold function, and the wavelet coefficients after the processing are reconstructed; the threshold function used for the reconstruction processing is: ; in, is the jth wavelet coefficient of the i-th layer, sgh() is the sign function, u is the coefficient, is the threshold value; , Here , , , Among them, m, t are coefficients greater than zero, is the standard deviation of Gaussian noise, and N is the signal length.

Citation Information

Patent Citations

  • Image wavelet de-noising method based on median filter

    CN101425176A

  • Image processing method of improved algorithm based on median filtering

    CN112215764A