Image filtering method, apparatus and device
By using multiple masks of different sizes to filter the image, and then fusing and weighting the results based on the quality evaluation, the problem of poor image filtering quality is solved, and higher quality image filtering effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AGRICULTURAL BANK OF CHINA
- Filing Date
- 2022-11-30
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, image filtering methods are limited by fixed-size masks, resulting in poor image quality after filtering and an inability to effectively remove noise and preserve details.
The initial image is filtered using multiple masks of different sizes. The quality evaluation results are then used for fusion processing to determine the weight values of each intermediate image. Finally, a weighted sum is calculated to obtain the fused filtered image.
It improves the quality of filtered images, effectively removes noise and preserves details, avoids the problem of poor filtering results caused by single-size masks, and improves the accuracy and comprehensiveness of image quality.
Smart Images

Figure CN115797209B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to an image filtering method, apparatus, and device. Background Technology
[0002] Currently, images are widely used in various fields of production and daily life as a carrier of information. However, during actual image transmission, image quality is often affected by noise and interference, leading to inaccurate image information observed by users.
[0003] In related technologies, when performing image filtering, a fixed-size mask is usually selected to filter the acquired image. This results in the filtering result being limited by the fixed-size mask, which can easily lead to poor image quality after filtering.
[0004] Therefore, there is an urgent need for an image filtering method to improve the quality of image filtering. Summary of the Invention
[0005] This application provides an image filtering method, apparatus, and device to solve the problem of poor image quality after filtering in related technologies.
[0006] In a first aspect, this application provides an image filtering method, comprising:
[0007] Obtain the initial image and multiple masks of different sizes;
[0008] For each mask, the initial image is filtered according to the mask to obtain the intermediate image corresponding to the mask;
[0009] For each mask, the quality evaluation result corresponding to the intermediate image is determined; the quality evaluation result includes multiple evaluation parameters, each evaluation parameter corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices.
[0010] Based on the quality evaluation results corresponding to each intermediate image, the intermediate images are fused to obtain the fused filtered image corresponding to the initial image.
[0011] In one possible implementation, based on the quality evaluation results corresponding to each intermediate image, the intermediate images are fused to obtain the fused filtered image corresponding to the initial image, including:
[0012] Based on the quality evaluation results corresponding to each intermediate image, determine the weight value corresponding to each intermediate image.
[0013] Based on the weight value corresponding to each intermediate image, the intermediate images corresponding to each mask are weighted and summed to obtain the fused filtered image.
[0014] In one possible implementation, a weight value corresponding to each intermediate image is determined based on the quality evaluation result corresponding to each intermediate image, including:
[0015] The evaluation parameters corresponding to each intermediate image under the same evaluation index are normalized to obtain the normalized result under the evaluation index.
[0016] The maximum and minimum values of the normalized results under different evaluation metrics corresponding to the intermediate image are determined to be the first value and the second value corresponding to the intermediate image, respectively.
[0017] Based on the first value and the second value corresponding to each intermediate image, determine the weight value that corresponds to each intermediate image.
[0018] In one possible implementation, a weight value corresponding to each intermediate image is determined based on the first value and the second value corresponding to each intermediate image, including:
[0019] Based on the first value and the second value corresponding to each intermediate image, the confidence information of the intermediate image corresponding to each mask is determined. The confidence information is used to characterize the confidence in the intermediate image, the rejection of the intermediate image, and the uncertainty of the intermediate image.
[0020] The trust information of the intermediate images corresponding to each mask is fused to obtain the fused trust information.
[0021] Based on the fused trust information, a weight value corresponding to each intermediate image is determined.
[0022] In one possible implementation, a weight value corresponding to each intermediate image is determined based on the first value and the second value corresponding to each intermediate image, including:
[0023] Based on the first and second values corresponding to each intermediate image, first quality function information and second quality function information are determined. The first quality function information is confidence information obtained based on a pessimistic approach; the second quality function information is confidence information obtained based on an optimistic approach.
[0024] The first mass function information and the second mass function information are fused to obtain the fused mass function information.
[0025] Based on the fused quality function information, a weight value corresponding to each intermediate image is determined.
[0026] In one possible implementation, the initial image and multiple masks of different sizes are obtained, including:
[0027] Obtain an initial image and the corresponding filtering requirement information, the filtering requirement information including filtering accuracy and filtering duration;
[0028] Based on the filtering requirements, determine the number of masks and the size of each mask.
[0029] In one possible implementation, the evaluation metrics include: energy gradient function metrics, frequency domain metrics, and entropy metrics.
[0030] Secondly, this application provides an image filtering device, comprising:
[0031] The acquisition unit is used to acquire the initial image and multiple masks of different sizes;
[0032] A processing unit is configured to perform filtering processing on the initial image according to the mask for each mask, so as to obtain an intermediate image corresponding to the mask;
[0033] The first determining unit is used to determine the quality evaluation result corresponding to the intermediate image for each mask; the quality evaluation result includes multiple evaluation parameters, each evaluation parameter corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices.
[0034] The second determining unit is used to perform fusion processing on each intermediate image based on the quality evaluation results corresponding to each intermediate image, so as to obtain the fused filtered image corresponding to the initial image.
[0035] In one possible implementation, the second determining unit includes:
[0036] The first determining module is used to determine the weight value corresponding to each intermediate image based on the quality evaluation results corresponding to each intermediate image.
[0037] The processing module is used to perform weighted summation on the intermediate images corresponding to each mask according to the weight value that corresponds to each intermediate image, so as to obtain the fused filtered image.
[0038] In one possible implementation, the processing module is specifically used for:
[0039] The evaluation parameters corresponding to each intermediate image under the same evaluation index are normalized to obtain the normalized result under the evaluation index.
[0040] The maximum and minimum values of the normalized results under different evaluation metrics corresponding to the intermediate image are determined to be the first value and the second value corresponding to the intermediate image, respectively.
[0041] Based on the first value and the second value corresponding to each intermediate image, determine the weight value that corresponds to each intermediate image.
[0042] In one possible implementation, the processing module is specifically used for:
[0043] Based on the first value and the second value corresponding to each intermediate image, the confidence information of the intermediate image corresponding to each mask is determined. The confidence information is used to characterize the confidence in the intermediate image, the rejection of the intermediate image, and the uncertainty of the intermediate image.
[0044] The trust information of the intermediate images corresponding to each mask is fused to obtain the fused trust information.
[0045] Based on the fused trust information, a weight value corresponding to each intermediate image is determined.
[0046] In one possible implementation, the processing module is specifically used for:
[0047] Based on the first and second values corresponding to each intermediate image, first quality function information and second quality function information are determined. The first quality function information is confidence information obtained based on a pessimistic approach; the second quality function information is confidence information obtained based on an optimistic approach.
[0048] The first mass function information and the second mass function information are fused to obtain the fused mass function information.
[0049] Based on the fused quality function information, a weight value corresponding to each intermediate image is determined.
[0050] In one possible implementation, the acquisition unit includes:
[0051] The first acquisition module is used to acquire an initial image and the filtering requirement information corresponding to the initial image, wherein the filtering requirement information includes filtering accuracy and filtering duration.
[0052] The second determining module is used to determine the number of masks and the size of each mask based on the filtering requirement information.
[0053] In one possible implementation, the evaluation metrics include: energy gradient function metrics, frequency domain metrics, and entropy metrics.
[0054] Thirdly, this application provides an electronic device, including: a memory and a processor;
[0055] Memory; memory for storing instructions executable by the processor;
[0056] The processor is configured to execute the method as described in any of the first aspects according to the executable instructions.
[0057] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.
[0058] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the method described in any one of the first aspects.
[0059] This application provides an image filtering method, apparatus, and device. The image filtering method includes: acquiring an initial image and multiple masks of different sizes; for each mask, filtering the initial image according to the mask to obtain an intermediate image corresponding to the mask; for each intermediate image corresponding to the mask, determining a quality evaluation result corresponding to the intermediate image; the quality evaluation result includes multiple evaluation parameters, each evaluation parameter corresponding to an evaluation index, and different evaluation parameters corresponding to different evaluation indices; and fusing each intermediate image according to the quality evaluation result corresponding to each intermediate image to obtain a fused filtered image corresponding to the initial image. This application determines the filtered image corresponding to the initial image based on acquiring intermediate images corresponding to masks of multiple different sizes of the initial image and the quality evaluation results corresponding to each intermediate image, avoiding the problem of poor image filtering quality caused by using only a single-size mask for image filtering in related technologies. Furthermore, in this embodiment, the quality evaluation of the intermediate images is performed from multiple different dimensions of evaluation indices, which is beneficial to further improve the quality of the subsequently obtained filtered image. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0061] Figure 1 A flowchart illustrating an image filtering method provided in an embodiment of this application;
[0062] Figure 2 A scenario diagram provided for an embodiment of this application;
[0063] Figure 3 A flowchart illustrating the second image filtering method provided in this application embodiment;
[0064] Figure 4 This is a schematic diagram of the structure of an image filtering device provided in an embodiment of this application;
[0065] Figure 5 This is a schematic diagram of the structure of the second image filtering device provided in the embodiments of this application;
[0066] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0067] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0068] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0069] Currently, images, as a carrier of information transmission, have been widely used in various fields, such as aerospace, biomedicine, culture and art, and security monitoring.
[0070] In practical applications, image transmission is often affected by noise and interference, resulting in poor image quality and making it difficult for humans to obtain accurate information from the image. Related technologies typically perform filtering and denoising on the acquired image after it is received to remove noise interference. Traditional image filtering methods usually select a fixed-size mask to filter different acquired images. However, due to the limitation of mask size, when the mask size is large, the clarity of the filtered image is often poor, and details in the image cannot be preserved. Conversely, when the mask size is small, noise interference in the image may not be completely filtered out.
[0071] The image filtering method, apparatus, and equipment provided in this application are used to solve the above-mentioned technical problems.
[0072] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0073] Figure 1 This is a flowchart illustrating an image filtering method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps:
[0074] S101. Obtain the initial image and multiple masks of different sizes.
[0075] For example, the initial image in this embodiment can be understood as an image that needs to be filtered. In practical applications, multiple masks of different sizes can be multiple masks with pre-set sizes and numbers, or multiple masks of different sizes determined according to the size of the initial image. In this embodiment, there are no specific limitations on the total number of multiple masks or the size corresponding to each mask.
[0076] S102. For each mask, filter the initial image according to the mask to obtain the intermediate image corresponding to the mask.
[0077] For example, in this embodiment, after obtaining multiple masks of different sizes, image filtering processing is performed on the initial image based on the multiple masks of different sizes, thereby obtaining the image filtering result corresponding to each size of mask, i.e., the intermediate image mentioned above. That is to say, each image filtering process involves selecting a mask from multiple masks of different sizes, and performing image filtering processing on the initial image based on the selected mask, thereby obtaining the intermediate image corresponding to the mask of that size.
[0078] It should be noted that this embodiment does not impose specific restrictions on the filtering method used. Multiple masks of different sizes can use the same or different filtering methods. For example, when three masks are selected, one mask can be filtered using mean filtering, and the other two masks can be filtered using median filtering; or all three masks can be filtered using median filtering.
[0079] S103. For each mask, determine the quality evaluation result corresponding to the intermediate image. The quality evaluation result includes multiple evaluation parameters, each of which corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices.
[0080] For example, in this embodiment, after obtaining the intermediate image corresponding to each of the multiple masks, a quality evaluation process is performed on each intermediate image to obtain the quality evaluation result corresponding to that intermediate image. Furthermore, in this embodiment, when performing quality evaluation on the intermediate image, the intermediate image is evaluated from multiple different evaluation index levels. That is, the quality evaluation result corresponding to each intermediate image includes evaluation parameters that correspond one-to-one with each of the multiple evaluation indexes. This allows for quality evaluation of the filtered intermediate image from different dimensions, ensuring the comprehensiveness and accuracy of the quality evaluation results.
[0081] It should be noted that this embodiment does not impose specific restrictions on the image quality evaluation method, and the principle of image no-reference quality evaluation in related technologies can be referred to.
[0082] S104. Based on the quality evaluation results corresponding to each intermediate image, perform fusion processing on each intermediate image to obtain the fused filtered image corresponding to the initial image.
[0083] For example, in this embodiment, after obtaining the intermediate image corresponding to each of the multiple masks and the quality evaluation result corresponding to each intermediate image, the intermediate images can be fused according to the quality evaluation result and the intermediate images to determine the fused filtered image corresponding to the initial image.
[0084] For example, in one possible implementation, after obtaining the quality evaluation results corresponding to each intermediate image, the intermediate images can be filtered according to the quality evaluation results of each intermediate image. For example, intermediate images corresponding to quality evaluation results that do not meet preset conditions can be removed. Then, the remaining intermediate images are processed by image fusion, and the fused image is used as the filtered image. Here, this embodiment does not impose specific restrictions on the image fusion method.
[0085] In this embodiment, the filtered image corresponding to the initial image is determined based on the intermediate images corresponding to masks of multiple different sizes obtained from the initial image and the quality evaluation results of each intermediate image. This avoids the problem of poor image filtering quality caused by using only a single-size mask for image filtering in related technologies. Furthermore, in this embodiment, the intermediate images are processed under multiple evaluation indicators of different dimensions, which is beneficial to further improve the quality of the subsequently obtained filtered image.
[0086] like Figure 2 As shown, Figure 2This is a schematic diagram of a scenario provided by an embodiment of this application. The diagram includes an initial image and multiple masks of different sizes (represented as mask 1, mask 2, ..., mask n in the diagram). After obtaining the initial image, each mask can be used to obtain a filtered intermediate image (represented as intermediate image 1, intermediate image 2, ..., intermediate image n in the diagram). Then, multiple evaluation parameters corresponding to each intermediate image are determined (m evaluation parameters for each intermediate image in the diagram), and the final filtering result, i.e., the fused filtered image, is obtained by combining the intermediate images and their corresponding evaluation parameters.
[0087] Figure 3 A flowchart illustrating the second image filtering method provided in this application embodiment is shown below. Figure 3 As shown, the method includes the following steps:
[0088] S301. Obtain the initial image and the corresponding filtering requirements information, including the filtering accuracy and filtering duration.
[0089] For example, in this embodiment, when acquiring multiple masks of different sizes, the filtering requirements can be determined based on the filtering requirements of the initial image. The filtering requirements corresponding to the initial image can include the required image filtering accuracy and the required image filtering duration for this image filtering process.
[0090] S302. Based on the filtering requirements, determine the number of masks and the size of each mask.
[0091] For example, after obtaining the filtering information corresponding to the initial image, the number of masks selected for this image filtering and the mask size corresponding to each mask can be further determined based on the filtering requirement information. For instance, when the image filtering requirement is for high image filtering accuracy but not for filtering duration, a larger number of masks can be selected, such as masks of sizes 3*3, 5*5, 7*7, 9*9, and 11*11. If the filtering duration requirement is high, a smaller number of mask sizes can be selected, such as masks of sizes 3*3, 5*5, and 7*7.
[0092] It is understood that in this embodiment, multiple masks of different sizes can be adaptively adjusted and determined according to different filtering requirements, thereby ensuring that the filtered image and filtering time obtained by filtering the initial image meet the filtering requirements, and thus improving user satisfaction.
[0093] S303. For each mask, filter the initial image according to the mask to obtain the intermediate image corresponding to the mask.
[0094] For example, the specific principle of step S303 can be found in step S102, and will not be repeated here.
[0095] S304. For each mask, determine the quality evaluation result corresponding to the intermediate image. The quality evaluation result includes multiple evaluation parameters, each of which corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices.
[0096] In one example, the evaluation metrics include: energy gradient function metric, frequency domain metric, and entropy metric.
[0097] For example, in this embodiment, when determining the quality evaluation result corresponding to each intermediate image, a no-reference-image quality evaluation index processing method can be used to perform intermediate image quality evaluation processing. Furthermore, the evaluation index selected in this embodiment may include: energy gradient function index, entropy index, and frequency domain index. The evaluation parameters of the energy gradient function index can be obtained based on the following formula:
[0098]
[0099] Here, EOG is used to characterize the evaluation parameter value corresponding to the energy gradient function index. M and N are used to characterize the size of the image, that is, the number of pixels in the horizontal axis and the number of pixels in the vertical axis. (x,y) is used to characterize the position of a pixel in the image. f(x,y) is used to characterize the pixel value of the pixel located at position (x,y) in the image.
[0100] Furthermore, in this embodiment, the frequency domain index can be characterized using the Discrete Fourier Index. The Discrete Fourier Index can be calculated using the following formula:
[0101]
[0102] Here, DFT is used to characterize the evaluation parameter values corresponding to the Discrete Fourier index. (u,v) represents the coordinates of a pixel in the image in the frequency domain. P(u,v) represents the square of the spectrum of the pixel located at position (u,v) in the frequency domain.
[0103] Furthermore, the entropy index can be calculated using the following formula:
[0104]
[0105] Entropy is used to characterize the evaluation parameter value corresponding to the entropy index. Where P(g) = n g / MN represents the probability of grayscale value g appearing in the image, n g is the number of pixels with a grayscale value of g, MN is the total number of pixels; b is the base of the logarithmic function.
[0106] It is understood that in this embodiment, the quality of the intermediate image is evaluated from the aspects of image gradient, frequency domain characteristics, and image pixel distribution, so that the quality evaluation results corresponding to the intermediate image are more accurate and comprehensive, which is conducive to improving the accuracy of the final image filtering results.
[0107] S305. Based on the quality evaluation results corresponding to each intermediate image, determine the weight value corresponding to each intermediate image.
[0108] For example, in this embodiment, after obtaining the quality evaluation result corresponding to each intermediate image, the weight value corresponding to each intermediate image can be determined based on the quality evaluation result corresponding to each image.
[0109] In one example, when determining the weight value corresponding to each intermediate image, the multi-attribute decision-making method provided in related technologies can be used. This method treats the multiple evaluation parameters contained in the quality evaluation result as multiple attributes, the intermediate images as the categories to be decided, and the weight corresponding to each intermediate image is determined based on the multiple evaluation parameters corresponding to each intermediate image.
[0110] In one example, step S305 includes the following steps:
[0111] The first step of step S305 is to normalize the evaluation parameters corresponding to each intermediate image under the same evaluation index to obtain the normalized result under the evaluation index.
[0112] The second step of step S305: Determine the maximum and minimum values of the normalized results under different evaluation indicators corresponding to the intermediate image as the first and second values corresponding to the intermediate image, respectively.
[0113] The third step of step S305: Determine the weight value corresponding to each intermediate image based on the first value and the second value corresponding to each intermediate image.
[0114] For example, in this embodiment, when determining the weight value corresponding to each intermediate image, since the quality evaluation result corresponding to the intermediate image includes evaluation parameters corresponding to multiple different evaluation indicators, it is necessary to first perform normalization processing on the evaluation parameters corresponding to multiple different intermediate images corresponding to the same evaluation indicator when determining the weight value corresponding to each intermediate image.
[0115] For example, when the evaluation metrics include the aforementioned EOG, DFT, and Entropy metrics, and the sizes of the corresponding multiple masks are a*a, b*b, and c*c, the quality evaluation results corresponding to each intermediate image can be represented by the following matrix C:
[0116]
[0117] in, Evaluation parameter values used to characterize the intermediate image obtained from a mask of size a*a under the EOG index; The evaluation parameter values are used to characterize the intermediate image obtained based on the a*a size mask under the DFT index. That is, in the above matrix, the value of each row represents the quality evaluation result of the intermediate image corresponding to each size mask. The evaluation index corresponding to each value in the same column is the same. When performing the normalization process in the first step of step S305, that is, normalization processing is performed on the values of each column in the above matrix C, thereby normalizing the values of the evaluation parameters corresponding to different evaluation indices to the same scale (i.e., the value range is [0,1]).
[0118] After normalization, for each intermediate image, the maximum and minimum values of the normalization results corresponding to different evaluation metrics are selected as the maximum and minimum values for that intermediate image.
[0119] The weight value corresponding to each intermediate image is determined based on the maximum and minimum values corresponding to each intermediate image.
[0120] It is understood that, in this embodiment, in order to avoid the different dimensions of the evaluation parameters corresponding to multiple evaluation indicators for the same intermediate image, a normalization method is adopted to normalize the evaluation parameters corresponding to different evaluation indicators, thereby ensuring the accuracy of the obtained weight values.
[0121] In one example, when performing the third step of step S305, the following steps may be included: determining the confidence information of the intermediate image corresponding to each mask based on the first value and the second value corresponding to each intermediate image, wherein the confidence information is used to characterize the confidence in the intermediate image, the rejection of the intermediate image, and the uncertainty of the intermediate image; performing a fusion process on the confidence information of the intermediate image corresponding to each mask to obtain fused confidence information; and determining the weight value corresponding to each intermediate image one by one based on the fused confidence information.
[0122] For example, in this embodiment, when determining the weight value of each intermediate image based on the maximum and minimum values corresponding to each intermediate image, the weight value of each intermediate image can be further determined according to the COWA-ER (Cautious Ordered Weighted Averaging with Evidential Reasoning) algorithm or the FCOWA-ER (Fuzzy Cautious Ordered Weighted Averaging with Evidential Reasoning) algorithm provided in related technologies. Furthermore, in practical applications, when it is determined that there is a lot of noise in the initial image, an algorithm with high noise resistance, such as FCOWA-ER, can be selected to determine the weight value.
[0123] In this embodiment, the process of determining the weight values of each intermediate image is illustrated using the COWA-ER algorithm as an example:
[0124] First, the confidence information of each intermediate image can be determined based on the maximum and minimum values corresponding to each intermediate image. The confidence information corresponding to the intermediate image can be used to characterize the confidence, rejection (i.e., distrust) and uncertainty of the intermediate image corresponding to the mask of that size.
[0125] For example, in practical applications, suppose the matrix formed by the maximum and minimum values corresponding to each intermediate image is as follows:
[0126]
[0127] in, This can be understood as the minimum value among the normalized results of the intermediate image corresponding to the mask of size a*a. This can be understood as the maximum value in the normalized result of the intermediate image corresponding to the mask of size a*a. Then, the matrix E(C) is normalized by dividing each value in the matrix by the maximum value, resulting in the normalized matrix, which can be represented as follows:
[0128]
[0129] Furthermore, based on the normalized matrix described above, for the intermediate image corresponding to the mask of size a*a, the confidence level of this image is α. a The corresponding rejection degree takes the value of 1-β. a The corresponding uncertainty is β.a -α a Similarly, the trust information corresponding to the remaining intermediate images can also be obtained using the same method.
[0130] After determining the trust information corresponding to each intermediate image, the trust information of each intermediate image can be fused to obtain the fused trust information. For example, in practical applications, a preset Dempster combination rule can be used for trust information fusion. For instance, the fused result includes the basic trust assignment results for different intermediate images and combinations of intermediate images. When there are three intermediate images, the fused result includes: m f ({θ1}) (represents the confidence assignment for intermediate images that only include masks of size a*a); m f ({θ2}) (represents the confidence assignment for intermediate images that only include masks of size b*b); m f ({θ3}) (represents the confidence assignment for intermediate images that only include masks of size c*c); m f ({θ1, θ2}) (represents the confidence assignment for intermediate images corresponding to masks of sizes a*a and b*b); m f ({θ2, θ3}) (represents the confidence assignment for intermediate images corresponding to masks of sizes b*b and c*c); m f ({θ1, θ3}) (represents the confidence assignment for intermediate images corresponding to masks of sizes a*a and c*c); m f ({Θ}) represents the confidence assignment for intermediate images corresponding to masks of sizes a*a, b*b, and c*c. The basic principles and implementation process of this combination rule can be found in descriptions in related technologies, and will not be repeated here.
[0131] After obtaining the fused trust information, the Pignistic probability transformation method can be used to convert the obtained fused trust information into the weight values corresponding to each intermediate image.
[0132] The weight value processing method for each intermediate image can be represented by the following formula:
[0133]
[0134]
[0135]
[0136] Where P(θ1) represents the weight of the intermediate image corresponding to the mask of size a*a. P(θ2) represents the weight of the intermediate image corresponding to the mask of size b*b. P(θ3) represents the weight of the intermediate image corresponding to the mask of size c*c.
[0137] It is understood that in this embodiment, after obtaining the maximum and minimum values corresponding to each intermediate image, the maximum and minimum values corresponding to each intermediate image can be processed by combining the cautious ordered weighted average evidence reasoning algorithm in related technologies, so as to determine the weight value corresponding to each intermediate image, thereby improving the accuracy of the subsequently obtained filtered image.
[0138] In one example, when performing the third step of step S305, the following steps may be included: determining first quality function information and second quality function information based on the first value and second value corresponding to each intermediate image, wherein the first quality function information is confidence information obtained based on a pessimistic approach; and the second quality function information is confidence information obtained based on an optimistic approach; fusing the first quality function information and the second quality function information to obtain fused quality function information; and determining the weight value corresponding to each intermediate image based on the fused quality function information.
[0139] For example, this embodiment uses the FCOWA-ER algorithm as an example to illustrate how the weight values corresponding to each intermediate image are obtained under this method.
[0140] For example, let's take the matrix E(C) containing the maximum and minimum values corresponding to the intermediate images above as an example. After obtaining the matrix E(C), we perform normalization on each column, that is, we normalize the values in each column by dividing them by the maximum value in that column, thus obtaining the following normalized matrix:
[0141]
[0142] As shown in the normalized matrix above, where the vectors Fuzzy membership functions representing pessimistic and optimistic attitudes, respectively.
[0143] Next, the two fuzzy membership functions are sorted in ascending order. Based on these ascending-order fuzzy membership functions, the first mass function information and the second mass function information are determined, where the first mass function information is based on... The quality function obtained from the data after ascending sorting, i.e., the function obtained based on the pessimistic approach, and the second quality function information are based on... The quality function obtained from the data after ascending sorting is a function based on an optimistic and pessimistic approach. The methods for obtaining each of these quality functions can be found in relevant technical descriptions, and will not be repeated here.
[0144] After determining the first and second quality function information, these two pieces of information can be fused to obtain the fused confidence information. In practical applications, a preset Dempster combination rule can be used for fusion processing. Furthermore, after obtaining the fused confidence information, the Pignistic probability transformation method can be used to convert the obtained fused confidence information into weight values corresponding to each intermediate image.
[0145] It is understood that in this embodiment, after obtaining the maximum and minimum values corresponding to each intermediate image, the maximum and minimum values corresponding to each intermediate image can be processed by combining the fuzzy cautious ordered weighted average evidence reasoning algorithm in related technologies, so as to determine the weight value corresponding to each intermediate image, thereby improving the accuracy of the subsequently obtained filtered image.
[0146] S306. Based on the weight value corresponding to each intermediate image, perform weighted summation on the intermediate images corresponding to each mask to obtain the fused filtered image.
[0147] For example, after obtaining the weight value corresponding to each intermediate image, multiple intermediate images can be weighted and summed, and the weighted summation result can be used as the fused filtered image corresponding to the initial image.
[0148] Understandably, in this embodiment, during image filtering, the weight value corresponding to the intermediate image can be adaptively adjusted and determined based on the quality reference evaluation index corresponding to the intermediate image. Then, the final filtering result corresponding to the initial image is determined based on a weighted summation method. This results in noise removal from the filtered image while retaining the detailed features of the initial image. Furthermore, this avoids the time and manpower consumption caused by repeatedly experimenting to determine a suitable filter mask size in related technologies.
[0149] Figure 4 This is a schematic diagram of the structure of an image filtering device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device includes:
[0150] The acquisition unit 401 is used to acquire an initial image and multiple masks of different sizes.
[0151] The processing unit 402 is used to perform filtering processing on the initial image according to the mask for each mask to obtain the intermediate image corresponding to the mask.
[0152] The first determining unit 403 is used to determine the quality evaluation result corresponding to the intermediate image for each mask; the quality evaluation result includes multiple evaluation parameters, each evaluation parameter corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices.
[0153] The second determining unit 404 is used to perform fusion processing on each intermediate image according to the quality evaluation results corresponding to each intermediate image, so as to obtain the fused filtered image corresponding to the initial image.
[0154] The apparatus provided in this embodiment is used to implement the technical solution provided by the above method. Its implementation principle and technical effect are similar, and will not be described again.
[0155] Figure 5 This is a schematic diagram of the structure of the second image filtering device provided in the embodiments of this application, as shown below. Figure 5 As shown, in Figure 4 Based on the structure shown, the second determining unit 404 in this embodiment includes:
[0156] The first determining module 4041 is used to determine the weight value corresponding to each intermediate image based on the quality evaluation results corresponding to each intermediate image.
[0157] The processing module 4042 is used to perform weighted summation on the intermediate images corresponding to each mask according to the weight value corresponding to each intermediate image, so as to obtain the fused filtered image.
[0158] In one possible implementation, processing module 4042 is specifically used for:
[0159] The evaluation parameters corresponding to each intermediate image under the same evaluation index are normalized to obtain the normalized result under the evaluation index.
[0160] The maximum and minimum values of the normalized results under different evaluation metrics corresponding to the intermediate image are determined to be the first and second values corresponding to the intermediate image, respectively.
[0161] Based on the first value and the second value corresponding to each intermediate image, determine the weight value that corresponds to each intermediate image.
[0162] In one possible implementation, processing module 4042 is specifically used for:
[0163] Based on the first and second values corresponding to each intermediate image, the confidence information of the intermediate image corresponding to each mask is determined. The confidence information is used to characterize the confidence in the intermediate image, the rejection of the intermediate image, and the uncertainty of the intermediate image.
[0164] The trust information of the intermediate images corresponding to each mask is fused to obtain the fused trust information.
[0165] Based on the fused trust information, a weight value corresponding to each intermediate image is determined.
[0166] In one possible implementation, processing module 4042 is specifically used for:
[0167] Based on the first and second values corresponding to each intermediate image, first quality function information and second quality function information are determined. The first quality function information is confidence information obtained based on a pessimistic approach; the second quality function information is confidence information obtained based on an optimistic approach.
[0168] The first mass function information and the second mass function information are fused to obtain the fused mass function information.
[0169] Based on the quality function information after fusion, a weight value corresponding to each intermediate image is determined.
[0170] In one possible implementation, the acquisition unit 401 includes:
[0171] The first acquisition module 4011 is used to acquire the initial image and the corresponding filtering requirement information, which includes the filtering accuracy and filtering duration.
[0172] The second determining module 4012 is used to determine the number of masks and the size of each mask based on the filtering requirement information.
[0173] In one possible implementation, the evaluation metrics include: energy gradient function metrics, frequency domain metrics, and entropy metrics.
[0174] The apparatus provided in this embodiment is used to implement the technical solution provided by the above method. Its implementation principle and technical effect are similar, and will not be described again.
[0175] This application provides an electronic device, including: a memory and a processor;
[0176] Memory; memory used to store processor-executable instructions;
[0177] The processor is used to execute methods according to executable instructions.
[0178] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 6 As shown, the electronic device includes:
[0179] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 292 to execute the methods of the above embodiments.
[0180] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0181] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, thereby implementing the methods in the above-described method embodiments.
[0182] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0183] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any of the methods.
[0184] This application provides a computer program product, which includes a computer program that, when executed by a processor, implements any one of the methods.
[0185] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the appended claims.
[0186] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. An image filtering method, characterized by, include: Obtain an initial image and the corresponding filtering requirement information, the filtering requirement information including filtering accuracy and filtering duration; Based on the filtering requirement information, the number of masks and the size of each mask are determined; wherein, based on different filtering requirement information, multiple masks of different sizes are adaptively adjusted and determined. For each mask, the initial image is filtered according to the mask to obtain the intermediate image corresponding to the mask; For each mask, a quality evaluation result is determined for the intermediate image. The quality evaluation result includes multiple evaluation parameters, each of which corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices. The evaluation indices include: energy gradient function index, frequency domain index, and entropy index. The evaluation parameters corresponding to each intermediate image under the same evaluation index are normalized to obtain the normalized result under the evaluation index. The maximum and minimum values of the normalized results under different evaluation metrics for each intermediate image are determined as the first value and the second value corresponding to the intermediate image, respectively. Based on the first value and the second value corresponding to each intermediate image, determine the weight value that corresponds to each intermediate image one by one. Based on the weight value corresponding to each intermediate image, the intermediate images corresponding to each mask are weighted and summed to obtain the fused filtered image.
2. The method of claim 1, wherein, Based on the first and second values corresponding to each intermediate image, determine the weight value corresponding to each intermediate image one-to-one, including: Based on the first value and the second value corresponding to each intermediate image, the confidence information of the intermediate image corresponding to each mask is determined. The confidence information is used to characterize the confidence in the intermediate image, the rejection of the intermediate image, and the uncertainty of the intermediate image. The trust information of the intermediate images corresponding to each mask is fused to obtain the fused trust information. Based on the fused trust information, a weight value corresponding to each intermediate image is determined.
3. The method of claim 1, wherein, Based on the first and second values corresponding to each intermediate image, determine the weight value corresponding to each intermediate image one-to-one, including: Based on the first and second values corresponding to each intermediate image, first quality function information and second quality function information are determined. The first quality function information is confidence information obtained based on a pessimistic approach; the second quality function information is confidence information obtained based on an optimistic approach. The first mass function information and the second mass function information are fused to obtain the fused mass function information. Based on the fused quality function information, a weight value corresponding to each intermediate image is determined.
4. An image filtering apparatus characterized by comprising: include: An acquisition unit is used to acquire an initial image and filtering requirement information corresponding to the initial image, wherein the filtering requirement information includes filtering accuracy and filtering duration. Based on the filtering requirement information, the number of masks and the size of each mask are determined; wherein, based on different filtering requirement information, multiple masks of different sizes are adaptively adjusted and determined. A processing unit is configured to perform filtering processing on the initial image according to the mask for each mask, so as to obtain an intermediate image corresponding to the mask; The first determining unit is used to determine the quality evaluation result corresponding to the intermediate image for each mask; the quality evaluation result includes multiple evaluation parameters, each evaluation parameter corresponds to an evaluation index, and different evaluation parameters correspond to different evaluation indices; the evaluation indices include: energy gradient function index, frequency domain index, and entropy index; the second determining unit is used to normalize the evaluation parameters corresponding to each intermediate image under the same evaluation index to obtain the normalized result under the evaluation index; determine the maximum and minimum values of the normalized results under different evaluation indices corresponding to each intermediate image as the first value and the second value corresponding to the intermediate image, respectively; determine the weight value corresponding to each intermediate image one-to-one based on the first value and the second value corresponding to each intermediate image; and perform weighted summation processing on the intermediate images corresponding to each mask based on the weight value corresponding to each intermediate image to obtain the fused filtered image.
5. An electronic device comprising: Memory, processor; Memory; Memory used to store the processor's executable instructions; The processor is configured to execute the method as described in any one of claims 1-3 according to the executable instructions.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-3.