Debugging method and system of dielectric filter
By performing metadata analysis and noise area division on the image, selecting a suitable filtering algorithm for denoising processing, the problem of insufficient denoising difficulty in the prior art is solved, and the accuracy and efficiency of image denoising is improved.
Patent Information
- Application Number
- CN202411534445.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing dielectric filters fail to effectively distinguish the difficulty of image denoising during image denoising, resulting in the use of the same filter algorithm in areas with less noise, resulting in the loss of local details of the image and reducing the accuracy of the image.
By analyzing the metadata of the image, classifying the images and dividing the noise areas, detecting the noise situation in each area, and selecting different filtering algorithms (median filtering algorithm or bilateral filtering algorithm) to denoising the image or partitioning area.
It improves the accuracy and efficiency of image denoising, reduces the cost of denoising time, ensures the retention of local details of the image, and improves image quality.
Smart Images

Figure CN119444608A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of filtering and noise reduction, and more specifically, to a method and system for debugging a dielectric filter. Background Art
[0002] Filtering and noise reduction technology is an important means in signal processing and image processing. It is used to remove noise in signals or images and improve image quality. When filtering and noise reduction technology is applied to image denoising, it can make the image clearer and provide accuracy guarantee for data analysis.
[0003] The prior art has the following deficiencies:
[0004] Most dielectric filters denoise images based on a set algorithm, without considering the difficulty of denoising the image, and tend to ignore the noise level in local areas, resulting in the loss of local details of the image when the same filter algorithm is used in areas with less noise, which reduces the accuracy of the image. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a debugging method and system for a dielectric filter, which classifies the image and divides the noise area by analyzing the metadata of the image, detects the noise situation of the divided area, and selects different filtering algorithms to denoise the image or the divided area to solve the problems raised in the above-mentioned background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for debugging a dielectric filter comprises the following steps:
[0008] Step S1: Identify the source of the image sample and the operation steps, collect the number of times the image sample is saved and compressed, and conduct a preliminary analysis on the degree of quality degradation of the image sample;
[0009] Step S2: Detecting a histogram established by the image samples, counting the number of abnormal peaks in the histogram of the image samples, and determining the denoising difficulty of the image samples based on the degree of quality degradation of the image samples and the number of abnormal peaks in the histogram;
[0010] Step S3: classifying the image sample as having high denoising difficulty, medium denoising difficulty or low denoising difficulty according to the denoising difficulty of the image sample; when the image sample is classified as having high denoising difficulty, dividing the image sample into regions and detecting the pixel value and pixel change rate of each divided region;
[0011] Step S4: Calculate the noise coefficient of each divided area by using the lasso regression algorithm based on the pixel value and pixel change rate of each divided area, and select the median filtering algorithm or the bilateral filtering algorithm to perform denoising on each divided area of the image sample according to the size of the noise coefficient of each divided area.
[0012] In a preferred embodiment, in step S1, when analyzing the degree of quality degradation of an image sample, a plurality of images of the same size are collected as analysis samples to set a quality classification threshold, the average of the number of times the image sample is saved and the number of times it is compressed is calculated as the quality coefficient of the image sample, the quality coefficient of the image sample is compared with the quality classification threshold, and when the quality coefficient of the image sample exceeds the quality classification threshold, it is judged that the degree of quality degradation of the image sample is high; when the quality coefficient of the image sample is lower than the quality classification threshold, it is judged that the degree of quality degradation of the image sample is low.
[0013] In a preferred embodiment, in step S1: setting the quality classification threshold value, the specific steps are as follows:
[0014] The same denoising algorithm is used for each analysis sample obtained and the noise processing time of each analysis sample is recorded. The analysis samples are arranged from small to large according to the noise processing time, and the middle analysis sample of the arrangement is selected. The number of times the middle analysis sample is saved and the number of times it is compressed are obtained, and the average value is taken as the quality classification threshold.
[0015] In a preferred embodiment, in step S2, the specific steps of counting the number of abnormal peaks in the histogram of the image samples are as follows:
[0016] Data preprocessing: Calculate the frequency of each pixel value of the image sample and map each pixel value in the image between 0 and 255 using the default grayscale;
[0017] Determine the peak value: Calculate the derivative of the histogram, find the point where the derivative changes from positive to negative, and determine the peak value;
[0018] Set peak threshold: Calculate the mean and standard deviation of the histogram, and set the peak threshold to the sum of the mean and standard deviation;
[0019] Count abnormal peaks: Among the peaks, select those exceeding the peak threshold as abnormal peaks, and count the number of abnormal peaks;
[0020] The images below the quality classification threshold in the analysis sample are screened out and the number of abnormal peaks is counted. The average value is selected and multiplied by the preset abnormal ratio, and the product result is set as the abnormal peak number threshold. When the abnormal peak number of the image sample exceeds the abnormal peak number threshold, the image sample is judged to have a large number of abnormal peaks; otherwise, the image sample is judged to have a small number of abnormal peaks.
[0021] In a preferred embodiment, in step S2, a denoising difficulty rule is formulated based on the number of abnormal peaks of the image samples and the quality degradation degree of the image samples to analyze the denoising difficulty of the image samples. The denoising difficulty rule is as follows:
[0022] Rule 1: When the number of abnormal peaks of an image sample is large and the quality of the image sample is highly degraded, it is judged that the denoising of the image sample is difficult;
[0023] Rule 2: When the number of abnormal peaks of the image sample is small and the quality degradation of the image sample is low, it is judged that the denoising difficulty of the image sample is small;
[0024] Rule 3: When the number of abnormal peaks and the degree of quality degradation of an image sample do not satisfy any of Rules 1 and 2, the denoising difficulty of the image sample is judged to be moderate.
[0025] In a preferred embodiment, in step S3, the image samples are classified into high denoising difficulty, moderate denoising difficulty or low denoising difficulty according to the denoising difficulty of the image samples. When the image samples are classified as low denoising difficulty, the median filtering algorithm is used to denoise the entire image sample; when the image samples are classified as moderate denoising difficulty, the bilateral filtering algorithm is used to denoise the entire image sample; when the image samples are classified as high denoising difficulty, the image samples are divided into regions.
[0026] In a preferred embodiment, in step S4, the pixel value and pixel change rate of each divided area of the image sample are obtained and merged into a pixel value data set and a pixel change data set, respectively, the data averages of the two data sets are taken, the optimal weights of the two data averages are calculated by the lasso regression formula, and the noise coefficient of the divided area is obtained by weighted summing the optimal weights and the data averages;
[0027] When the noise coefficient of the divided area is lower than the preset noise threshold, the median filtering algorithm is used to perform denoising in the corresponding divided area; when the noise coefficient of the divided area exceeds the preset noise threshold, the bilateral filtering algorithm is used to perform denoising in the corresponding divided area.
[0028] In a preferred embodiment, in step S4, the median filtering algorithm is used to perform denoising on the image sample or the divided area in the image sample. The specific process is as follows:
[0029] Select window: randomly set a processing window, process the pixels in the processing window each time, and after the processing is completed, traverse the area to be denoised in turn to process the entire denoising area;
[0030] Extract window pixel value: extract the pixel value of each pixel in the processing window;
[0031] Calculate the median: Sort the extracted pixel values and find the median;
[0032] Replace center pixel: replace the center pixel value of the current processing window with the median value;
[0033] The specific process of using the bilateral filtering algorithm to denoise image samples or divided areas in image samples is as follows:
[0034] Set a processing window with a pixel as the center, detect the pixel values of all pixels in the processing window and the distance to the center pixel, take the ratio of the distance from the pixel to the center pixel to the sum of the distances from all pixels to the center pixel as the weight of the corresponding adjacent pixel to the center pixel, take the weighted average of the pixel values of all adjacent pixels in the processing window as the pixel value of the center pixel, and use the processing window to traverse the denoising area for complete denoising.
[0035] A dielectric filter debugging system, used to implement the above-mentioned dielectric filter debugging method, comprises a data acquisition module, a data analysis module, a user interaction module and an algorithm processing module;
[0036] The data acquisition module is used to collect the number of times the image samples are saved, the number of times they are compressed, the number of abnormal peaks in the histogram, and the pixel values of each divided area of the image samples and transmit them to the data analysis module;
[0037] The data analysis module is used to receive the number of times the image samples are saved and compressed to analyze the quality degradation of the image samples, determine the difficulty of denoising the image samples according to the quality degradation of the image samples and the number of abnormal peaks in the histogram, calculate the pixel change rate of each divided area of the image samples and calculate the noise coefficient of the divided area in combination with the pixel value of each divided area;
[0038] The user interaction module is used to send options to the user end and divide the image samples into regions according to the user's selection and then pass them to the data analysis module;
[0039] The algorithm processing module receives the analysis result of the data analysis module and selects a median filtering algorithm or a bilateral filtering algorithm to perform denoising on the image sample or the divided area in the image sample.
[0040] The technical effects and advantages of a dielectric filter debugging method and system of the present invention are as follows:
[0041] The present invention identifies the source and operation steps of image samples, collects the number of times the image samples are saved and compressed, performs a preliminary analysis on the quality degradation of the image samples according to the number of times the image samples are saved and compressed, detects the histogram of the image samples and determines the number of abnormal peaks, determines the denoising difficulty of the image samples based on the analysis results of the quality degradation of the image samples and the number of abnormal peaks of the histogram and performs classification screening, selects different filtering algorithms for denoising for image samples of different categories, further refines the denoising difficulty, and increases the accuracy of analyzing the denoising difficulty of image samples. When the denoising difficulty of image samples is high, the image samples are divided into regions, the noise amount of the divided regions is calculated by detecting the pixel change rate and the regional pixel value of the divided regions, and different filtering algorithms are selected for denoising according to the noise amount of the divided regions, thereby improving the denoising efficiency and reducing the denoising time cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a schematic diagram of a debugging method for a dielectric filter of the present invention.
[0043] Figure 2 The present invention is a flow chart of a debugging system for a dielectric filter. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] The present invention identifies the source and operation steps of image samples, collects the number of times the image samples are saved and compressed, performs a preliminary analysis on the quality degradation of the image samples according to the number of times the image samples are saved and compressed, detects the histogram of the image samples and determines the number of abnormal peaks, determines the denoising difficulty of the image samples based on the quality degradation analysis results of the image samples and the number of abnormal peaks of the histogram and performs classification screening, selects different filtering algorithms for denoising for image samples of different categories, and when the denoising difficulty of the image samples is great, divides the image samples into regions, calculates the noise amount of the divided regions by detecting the pixel change rate and the regional pixel value of the divided regions, and selects different filtering algorithms for denoising according to the noise amount of the divided regions.
[0046] Embodiment 1, a method for debugging a dielectric filter, such as Figure 1 As shown, the following steps are included:
[0047] Step S1: Identify the source of the image sample and the operation steps, collect the number of times the image sample is saved and compressed, and conduct a preliminary analysis on the degree of quality degradation of the image sample;
[0048] Step S2: Detecting a histogram established by the image samples, counting the number of abnormal peaks in the histogram of the image samples, and determining the denoising difficulty of the image samples based on the degree of quality degradation of the image samples and the number of abnormal peaks in the histogram;
[0049] Step S3: classifying the image sample as having high denoising difficulty, medium denoising difficulty or low denoising difficulty according to the denoising difficulty of the image sample; when the image sample is classified as having high denoising difficulty, dividing the image sample into regions and detecting the pixel value and pixel change rate of each divided region;
[0050] Step S4: Calculate the noise coefficient of each divided area by using the lasso regression algorithm based on the pixel value and pixel change rate of each divided area, and select the median filtering algorithm or the bilateral filtering algorithm to perform denoising on each divided area of the image sample according to the size of the noise coefficient of each divided area.
[0051] The specific implementation is as follows:
[0052] In step S1, when identifying the source of the image sample and the operation steps, the number of times the image sample is saved and the number of times the image sample is compressed are obtained by accessing the file metadata of the image sample. For an image file, the more times it is saved, the more detail data of the image file is lost due to various reasons when it is saved, and the more image noise is. When compressing the image, part of the image file will be lost to reduce the file size. The more times the file is compressed, the more detail data is lost and the more image noise is.
[0053] Collect multiple images of the same size as analysis samples, set the quality classification threshold, and conduct a preliminary analysis of the quality degradation of the image samples. The specific steps are as follows:
[0054] The same denoising algorithm is used for each obtained analysis sample and the noise processing time of each analysis sample is recorded. Each analysis sample is arranged according to the size of the noise processing time. The analysis samples are arranged from small to large according to the noise processing time. The smaller the noise processing time, the easier it is to process the analysis sample and the less image noise. The middle analysis sample of the arrangement is selected, and the number of times the middle analysis sample is saved and compressed is obtained, and the average value is taken as the quality classification threshold;
[0055] The average value of the number of times the image sample is saved and the number of times it is compressed is calculated as the quality coefficient of the image sample, and the quality coefficient of the image sample is compared with the quality classification threshold. When the quality coefficient of the image sample exceeds the quality classification threshold, it is judged that the quality degradation of the image sample is high; when the quality coefficient of the image sample is lower than the quality classification threshold, it is judged that the quality degradation of the image sample is low.
[0056] By recording the processing time of different images using the same denoising algorithm, the degree of noise in different images can be directly reflected. Establishing quality classification thresholds based on processing time provides a data basis for analyzing the degree of quality degradation of image samples.
[0057] It should be noted that file metadata is information about the file itself, which is usually transmitted and saved together with the file. The image file information contained in the component metadata can be used to determine the file's previous operation behavior, including image storage and compression. The number of images of the same size in the analysis sample is not unique, and the standard number can be set for analysis. For example, 100 images of the same size can be collected as analysis samples, etc., which will not be elaborated here.
[0058] In step S2, when detecting the histogram of the image sample, the histogram panel of the image sample can be obtained by using image processing software, and after determining the histogram of the image sample, the abnormal peak of the histogram is detected. The specific steps are as follows:
[0059] Data preprocessing: Calculate the frequency of each pixel value of the image samples and map each pixel value in the image between 0 and 255 using the default grayscale.
[0060] Determine the peak value: Calculate the derivative of the histogram and find the point where the derivative changes from positive to negative to determine the peak value.
[0061] Set peak threshold: Calculate the mean and standard deviation of the histogram and set the peak threshold to the mean plus a certain multiple of the standard deviation. For example, set the peak threshold to the sum of the mean and the standard deviation.
[0062] Count abnormal peaks: Mark the detected abnormal peaks on the histogram, that is, the pixels whose peaks exceed the abnormal threshold, and count the number of abnormal peaks.
[0063] The images below the quality classification threshold in the analysis sample are screened out and the number of abnormal peaks is counted according to the above method, and then the average value is selected. The calculated average value is multiplied by the preset abnormal ratio, and the product result is set as the abnormal peak number threshold. The number of abnormal peaks of the image sample is counted and compared with the abnormal peak number threshold. When the number of abnormal peaks of the image sample exceeds the abnormal peak number threshold, it is judged that the image sample has a large number of abnormal peaks; otherwise, it is judged that the image sample has a small number of abnormal peaks.
[0064] The denoising difficulty rules are formulated based on the number of abnormal peaks of the comprehensive image samples and the degree of quality degradation of the image samples to analyze the denoising difficulty of the image samples. The denoising difficulty rules are as follows:
[0065] Rule 1: When the number of abnormal peaks of an image sample is large and the quality of the image sample is highly degraded, it is judged that the denoising of the image sample is difficult;
[0066] Rule 2: When the number of abnormal peaks of the image sample is small and the quality degradation of the image sample is low, it is judged that the denoising difficulty of the image sample is small;
[0067] Rule 3: When the number of abnormal peaks and the degree of quality degradation of an image sample do not satisfy any of Rules 1 and 2, the denoising difficulty of the image sample is judged to be moderate.
[0068] By screening out images below the quality classification threshold in the analysis samples and setting a threshold for the number of abnormal peaks, the denoising difficulty can be further refined, which narrows the refinement direction of the denoising difficulty and increases the accuracy of the denoising difficulty of the analysis image samples.
[0069] It should be noted that the required abnormal proportion when setting the abnormal peak quantity threshold is not unique and can be set according to actual conditions. For example, the abnormal proportion can be set to 80%, etc., which will not be analyzed in detail here.
[0070] In step S3, the image samples are classified into three categories: high denoising difficulty, moderate denoising difficulty and low denoising difficulty according to the denoising difficulty rule. When the image sample is classified as low denoising difficulty, the median filtering algorithm is used to denoise the entire image sample; when the image sample is classified as moderate denoising difficulty, the bilateral filtering algorithm is used to denoise the entire image sample; when the image sample is classified as high denoising difficulty, the image sample is divided into regions.
[0071] Each image consists of a foreground and a background. However, different image analyses have different requirements for the foreground and the background. The foreground is used to analyze the details of the main object, while the background is used to analyze the details of the secondary object. By sending an option to the user end, the user end selects to determine whether to perform foreground segmentation or background segmentation on the image sample.
[0072] If the user chooses foreground segmentation, the background part of the image sample will be denoised using the median filter algorithm, and only the foreground part will be divided into regions; if the user chooses background segmentation, the foreground part of the image sample will be denoised using the median filter algorithm, and only the background part will be divided into regions. It should be explained that the median filter algorithm is a relatively simple denoising algorithm with a short calculation time but low accuracy, and is more suitable for images with low denoising difficulty; the bilateral filter algorithm is a complex but efficient denoising algorithm with a long calculation time but high accuracy, and is more suitable for images with moderate denoising difficulty. Since the median filter algorithm is relatively simple and fast, when the user has low accuracy requirements for the foreground or background of the image, the median filter algorithm can be directly used to quickly reduce the noise of the part with low accuracy requirements.
[0073] When dividing the image sample into regions, after the user determines the segmentation method, the part to be divided into regions is divided into N equal parts, the pixel value and pixel change rate of each divided region are detected, and the average pixel value of all pixel points in the divided region is taken as the pixel value of the divided region.
[0074] The pixel change rate can be obtained during the image enhancement processing of image samples. The pixel value changes of each pixel point in the divided area in adjacent time frames during the image enhancement processing are counted. During the image enhancement processing, two adjacent time frames are randomly selected to record the pixel values of the pixel points and make a difference. If the difference result is not zero, the corresponding pixel point is marked as a changed pixel point. The ratio of the number of changed pixel points to the total number of pixel points in the divided area is counted as the pixel change rate of the divided area.
[0075] It should be noted that image enhancement processing is used to improve the visibility and feature details of an image, and is usually performed after denoising processing. However, the image will introduce new noise after image enhancement processing. Performing image enhancement processing first and then denoising processing can improve the denoising effect of the image. The time frame mentioned in the above steps is the time point when each processing action occurs when the image is enhanced.
[0076] In step S4, the pixel value and pixel change rate of each divided area of the image sample are obtained and merged into a pixel value data set and a pixel change data set respectively. The noise coefficient of the divided area is calculated by lasso regression based on the pixel value data set and the pixel change data set. The specific steps are as follows:
[0077] Construct a linear combination of noise coefficients, and the calculation formula can be: z = w1a + w2b, where z is the noise coefficient of the divided area of the image sample, a is the data average value in the pixel value data set, b is the data average value in the pixel change data set, w1 is the optimal weight of a, w2 is the optimal weight of b, and the pixel value and pixel change rate of each divided area in the image sample are summed. The calculation formula is: Z i =a i +b i , use the lasso regression formula to calculate the two optimal weights, namely the most weighted w1 and w2: Where γ is the regularization parameter, n is the number of divided regions, and when w1 and w2 use the lasso regression formula to minimize the calculation results, w1 and w2 are the optimal coefficients of a and b respectively.
[0078] The noise coefficient of each divided area of the image sample is compared with the preset noise threshold. When the noise coefficient of the divided area is lower than the noise threshold, the median filtering algorithm is used to perform denoising in the corresponding divided area; when the noise coefficient of the divided area exceeds the noise threshold, the bilateral filtering algorithm is used to perform denoising in the corresponding divided area.
[0079] The specific process of using the median filtering algorithm to denoise image samples or divided areas in image samples is as follows:
[0080] Select window: define a small processing window according to the denoising area, process the pixels in the processing window each time, and after the processing is completed, traverse the unprocessed areas in the denoising area in turn to process the entire denoising area.
[0081] Extract window pixel value: extract the pixel value of each pixel in the processing window;
[0082] Calculate the median: Sort the extracted pixel values and find the median;
[0083] Replace center pixel: Replace the center pixel value of the current processing window with the median value.
[0084] The specific process of using the bilateral filtering algorithm to denoise image samples or divided areas in image samples is as follows:
[0085] A small processing window is defined according to the denoising area. With a pixel as the center, the pixel values of all pixels in the processing window and the distance to the central pixel are detected. The ratio of the distance from the pixel to the central pixel to the sum of the distances from all pixels to the central pixel is used as the weight of the corresponding adjacent pixel to the central pixel. The pixel values of all adjacent pixels in the processing window are weighted averaged as the pixel value of the central pixel. The processing window is used to traverse the denoising area for complete denoising.
[0086] It should be noted that the size of the processing window is set by professionals in the field and will not be analyzed here.
[0087] Embodiment 2, a debugging system for a dielectric filter, such as Figure 2 As shown, a method for debugging a dielectric filter is implemented, comprising a data acquisition module, a data analysis module, a user interaction module and an algorithm processing module;
[0088] The data acquisition module is used to collect the number of times the image samples are saved, the number of times they are compressed, the number of abnormal peaks in the histogram, and the pixel values of each divided area of the image samples and transmit them to the data analysis module;
[0089] The data analysis module is used to receive the number of times the image samples are saved and compressed to analyze the quality degradation of the image samples, determine the difficulty of denoising the image samples according to the quality degradation of the image samples and the number of abnormal peaks in the histogram, calculate the pixel change rate of each divided area of the image samples and calculate the noise coefficient of the divided area in combination with the pixel value of each divided area;
[0090] The user interaction module is used to send options to the user end and divide the image samples into regions according to the user's selection and then pass them to the data analysis module;
[0091] The algorithm processing module receives the analysis result of the data analysis module and selects a median filtering algorithm or a bilateral filtering algorithm to perform denoising on the image sample or the divided area in the image sample.
[0092] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.
[0093] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application of the technical solution and the invention constraints. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0094] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0095] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0096] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for debugging a dielectric filter, characterized in that: The following steps are included: Step S1: Identify the source of the image sample and the operation steps, collect the number of times the image sample is saved and compressed, and conduct a preliminary analysis on the degree of quality degradation of the image sample; Step S2: Detecting a histogram established by the image samples, counting the number of abnormal peaks in the histogram of the image samples, and determining the denoising difficulty of the image samples based on the degree of quality degradation of the image samples and the number of abnormal peaks in the histogram; Step S3: classifying the image sample as having high denoising difficulty, medium denoising difficulty or low denoising difficulty according to the denoising difficulty of the image sample; when the image sample is classified as having high denoising difficulty, dividing the image sample into regions and detecting the pixel value and pixel change rate of each divided region; Step S4: Calculate the noise coefficient of each divided area by using the lasso regression algorithm based on the pixel value and pixel change rate of each divided area, and select the median filtering algorithm or the bilateral filtering algorithm to perform denoising on each divided area of the image sample according to the size of the noise coefficient of each divided area.
2. A method for debugging a dielectric filter according to claim 1, characterized in that: In step S1, when analyzing the degree of quality degradation of image samples, multiple images of the same size are collected as analysis samples to set a quality classification threshold, the average of the number of times the image samples are saved and compressed is calculated as the quality coefficient of the image samples, and the quality coefficient of the image samples is compared with the quality classification threshold. When the quality coefficient of the image samples exceeds the quality classification threshold, it is judged that the degree of quality degradation of the image samples is high; when the quality coefficient of the image samples is lower than the quality classification threshold, it is judged that the degree of quality degradation of the image samples is low.
3. A method for debugging a dielectric filter according to claim 2, characterized in that: In step S1: setting the quality classification threshold, the specific steps are as follows: The same denoising algorithm is used for each analysis sample obtained and the noise processing time of each analysis sample is recorded. The analysis samples are arranged from small to large according to the noise processing time, and the middle analysis sample of the arrangement is selected. The number of times the middle analysis sample is saved and the number of times it is compressed are obtained, and the average value is taken as the quality classification threshold.
4. A method for debugging a dielectric filter according to claim 2, characterized in that: In step S2, the specific steps of counting the number of abnormal peaks in the histogram of the image samples are as follows: Data preprocessing: Calculate the frequency of each pixel value of the image sample and map each pixel value in the image between 0 and 255 using the default grayscale; Determine the peak value: Calculate the derivative of the histogram, find the point where the derivative changes from positive to negative, and determine the peak value; Set peak threshold: Calculate the mean and standard deviation of the histogram, and set the peak threshold to the sum of the mean and standard deviation; Count abnormal peaks: Among the peaks, select those exceeding the peak threshold as abnormal peaks, and count the number of abnormal peaks; The images below the quality classification threshold in the analysis sample are screened out and the number of abnormal peaks is counted. The average value is selected and multiplied by the preset abnormal ratio, and the product result is set as the abnormal peak number threshold. When the abnormal peak number of the image sample exceeds the abnormal peak number threshold, the image sample is judged to have a large number of abnormal peaks; otherwise, the image sample is judged to have a small number of abnormal peaks.
5. A method for debugging a dielectric filter according to claim 4, characterized in that: In step S2, a denoising difficulty rule is formulated based on the number of abnormal peaks of the image samples and the degree of quality degradation of the image samples to analyze the denoising difficulty of the image samples. The denoising difficulty rule is as follows: Rule 1: When the number of abnormal peaks of an image sample is large and the quality of the image sample is highly degraded, it is judged that the denoising of the image sample is difficult; Rule 2: When the number of abnormal peaks of the image sample is small and the quality degradation of the image sample is low, it is judged that the denoising difficulty of the image sample is small; Rule 3: When the number of abnormal peaks and the degree of quality degradation of an image sample do not satisfy any of Rules 1 and 2, the denoising difficulty of the image sample is judged to be moderate.
6. A method for debugging a dielectric filter according to claim 1, characterized in that: In step S3, the image samples are classified into high denoising difficulty, moderate denoising difficulty or low denoising difficulty according to the denoising difficulty of the image samples. When the image samples are classified as low denoising difficulty, the median filtering algorithm is used to denoise the entire image sample; when the image samples are classified as moderate denoising difficulty, the bilateral filtering algorithm is used to denoise the entire image sample; when the image samples are classified as high denoising difficulty, the image samples are divided into regions.
7. A method for debugging a dielectric filter according to claim 6, characterized in that: In step S4, the pixel values and pixel change rates of each divided area of the image sample are obtained and merged into a pixel value data set and a pixel change data set, respectively, the data averages of the two data sets are taken, the optimal weights of the two data averages are calculated by the lasso regression formula, and the noise coefficient of the divided area is obtained by weighted summing the optimal weights and the data averages; When the noise coefficient of the divided area is lower than the preset noise threshold, the median filter algorithm is used to perform denoising in the corresponding divided area; When the noise coefficient of a divided area exceeds a preset noise threshold, a bilateral filtering algorithm is used to perform denoising processing in the corresponding divided area.
8. A method for debugging a dielectric filter according to claim 7, characterized in that: In step S4, the median filtering algorithm is used to perform denoising on the image sample or the divided area in the image sample. The specific process is as follows: Select window: randomly set a processing window, process the pixels in the processing window each time, and after the processing is completed, traverse the area to be denoised in turn to process the entire denoising area; Extract window pixel value: extract the pixel value of each pixel in the processing window; Calculate the median: Sort the extracted pixel values and find the median; Replace center pixel: replace the center pixel value of the current processing window with the median value; The specific process of using the bilateral filtering algorithm to denoise image samples or divided areas in image samples is as follows: Set a processing window with a pixel as the center, detect the pixel values of all pixels in the processing window and the distance to the center pixel, take the ratio of the distance from the pixel to the center pixel to the sum of the distances from all pixels to the center pixel as the weight of the corresponding adjacent pixel to the center pixel, take the weighted average of the pixel values of all adjacent pixels in the processing window as the pixel value of the center pixel, and use the processing window to traverse the denoising area for complete denoising.
9. A dielectric filter debugging system, based on a dielectric filter debugging method according to any one of claims 1 to 8, characterized in that: It includes data acquisition module, data analysis module, user interaction module and algorithm processing module; The data acquisition module is used to collect the number of times the image samples are saved, the number of times they are compressed, the number of abnormal peaks in the histogram, and the pixel values of each divided area of the image samples and transmit them to the data analysis module; The data analysis module is used to receive the number of times the image samples are saved and compressed to analyze the quality degradation of the image samples, determine the difficulty of denoising the image samples according to the quality degradation of the image samples and the number of abnormal peaks in the histogram, calculate the pixel change rate of each divided area of the image samples and calculate the noise coefficient of the divided area in combination with the pixel value of each divided area; The user interaction module is used to send options to the user end and divide the image samples into regions according to the user's selection and then pass them to the data analysis module; The algorithm processing module receives the analysis result of the data analysis module and selects a median filtering algorithm or a bilateral filtering algorithm to perform denoising on the image sample or the divided area in the image sample.
Citation Information
Patent Citations
Image noise removing method and device
CN111325694A
Dielectric filter automatic debugging method and system
CN112164855A
Image hybrid denoising method and device, electronic equipment and medium
CN114037635A
Image noise intensity estimation method, image noise intensity estimation device, and image recognition device
US20200118248A1
Integral dielectric filter
US6229410B1