CN117474790A - Pointer instrument image denoising method and device based on improved wavelet threshold function - Google Patents

Pointer instrument image denoising method and device based on improved wavelet threshold function Download PDF

Info

Publication number
CN117474790A
CN117474790A CN202311468313.5A CN202311468313A CN117474790A CN 117474790 A CN117474790 A CN 117474790A CN 202311468313 A CN202311468313 A CN 202311468313A CN 117474790 A CN117474790 A CN 117474790A
Authority
CN
China
Prior art keywords
denoising
instrument image
wavelet
frequency information
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311468313.5A
Other languages
Chinese (zh)
Inventor
陈锐
夏勇辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202311468313.5A priority Critical patent/CN117474790A/en
Publication of CN117474790A publication Critical patent/CN117474790A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20064Wavelet transform [DWT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20216Image averaging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Biophysics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a pointer instrument image denoising method and device based on an improved wavelet threshold function. The invention obtains the pointer instrument image; preprocessing the pointer instrument image to obtain a first instrument image; inputting the first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform; according to the low-frequency information A and the high-frequency information B, using wavelet reconstruction to output a denoised second instrument image; and outputting a second instrument image as a pointer instrument denoising image. According to the method and the device, the denoising effect of the pointer instrument image is improved by fusing the results output by the two denoising modules.

Description

Pointer instrument image denoising method and device based on improved wavelet threshold function
Technical Field
The invention relates to the technical field of image processing, in particular to a pointer instrument image denoising method and device based on an improved wavelet threshold function.
Background
The pointer instrument is used as a measuring instrument, and has the advantages of simple structure, convenient maintenance and use, high reliability, low price, water resistance, freezing resistance, dust resistance and the like, and is widely used in large industrial fields, such as industries of electric power systems, petrochemical industry, factories and mining enterprises, railway systems and the like. Common pointer meters are: voltmeters, barometers, oil temperature meters, thermometer, water meters, etc. Because of the reasons of working occasions, the pointer type meters generally have no data interface, and automatic collection and transmission of measurement parameters cannot be realized. The reading of such pointer meters therefore mainly relies on manual means, i.e. the human eye, to observe the scale value pointed by the pointer. However, the mode has high labor intensity and slow reading, is easy to cause visual fatigue, and has great potential safety hazard in manual reading in certain high-pressure and nuclear radiation specific occasions. Therefore, the reading of the pointer instrument is more prone to machine recognition at present, the pointer instrument is photographed by a robot or a camera to obtain a pointer instrument image, and the pointer instrument image is recognized by a machine learning method to obtain data. However, the pointer instrument image obtained by shooting has certain noise, so that the recognition of the pointer instrument image by machine learning is influenced, and erroneous data are obtained.
Therefore, in the field of pointer instrument image processing, image denoising is an important research direction, and the aim is to remove noise in an image and improve the quality and definition of the image. Common image denoising methods include filtering-based methods, wavelet transform-based methods, sparse representation-based methods, and the like. However, conventional image denoising methods generally can only process images with low noise levels, and do not work well at high noise levels.
In past studies, wavelet transformation has been widely used for image denoising. Wavelet transformation is a signal processing technique based on multi-scale analysis, representing local features of a signal by decomposing the signal into subbands of different frequencies. In the wavelet domain, denoising of signals can be achieved by thresholding the wavelet coefficients, i.e., setting the smaller wavelet coefficients to zero or a value near zero, while retaining the larger wavelet coefficients.
The current wavelet denoising algorithm mainly adopts a soft threshold function, a hard threshold function and a semi-soft and semi-hard threshold function to filter signals. In the prior art, the noise removing method for ultrasonic detection of the high-voltage bushing lead of the transformer disclosed in Chinese patent with the application number of CN201910008221.6 combines a gray-wolf optimization algorithm with an adaptive threshold method, optimizes an objective function by using the gray-wolf algorithm, improves the global optimizing capability and optimizing speed of the adaptive threshold method, but only combines the gray-wolf optimization algorithm with the adaptive threshold method, the noise removing effect cannot be ensured, and meanwhile, the problem of picture noise caused by illumination, dust and the like of an instrument image cannot be solved by the scheme.
Therefore, aiming at the problem of poor denoising effect under high noise level existing in the existing pointer instrument image denoising method, the pointer instrument image denoising method and device based on the improved wavelet threshold function are provided.
Disclosure of Invention
The invention aims to provide a pointer instrument image denoising method and device based on an improved wavelet threshold function.
According to a first aspect of the present disclosure, there is provided a pointer instrument image denoising method based on an improved wavelet threshold function, comprising:
acquiring a pointer instrument image;
preprocessing the pointer instrument image to obtain a first instrument image;
inputting the first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform;
inputting the first instrument image into a first denoising module to obtain first low-frequency information A1 and first high-frequency information B1;
inputting the first instrument image into a second denoising module to obtain second low-frequency information A2 and second high-frequency information B2;
Performing linear fusion on the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and performing fusion on the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B;
according to the low-frequency information A and the high-frequency information B, using wavelet reconstruction to output a denoised second instrument image;
and outputting a second instrument image as a pointer instrument denoising image.
According to a second aspect of the present disclosure, there is provided a pointer instrument image denoising apparatus based on an improved wavelet threshold function, comprising:
the acquisition module is used for: the method comprises the steps of acquiring a pointer instrument image;
the processing module is used for: the method comprises the steps of preprocessing the pointer instrument image to obtain a first instrument image;
an input module: the method comprises the steps of inputting a first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform;
and an output module: and the second instrument image is used for outputting a pointer instrument denoising image.
According to a third aspect of the present disclosure, there is provided a computer device comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 5.
Compared with the prior art, the invention has the beneficial effects that:
1. according to the first denoising module and the second denoising module, wavelet decomposition is respectively carried out on the first instrument image to respectively obtain first low-frequency information and first high-frequency information, second low-frequency information and second high-frequency information, the first low-frequency information and the second low-frequency information are fused to obtain low-frequency information, the first high-frequency information and the second high-frequency information are fused to obtain high-frequency information, information fusion can better preserve information of the image, image quality is improved, and denoising effect of the pointer instrument image is improved.
2. Three adjustable parameters alpha, beta and eta are added to the improved wavelet threshold function, and an adjustable factor gamma is added to the self-adaptive threshold, so that the improved wavelet threshold function can be generally suitable for different types of pointer instrument images and noise conditions, and has higher robustness and universality. Whether the background noise intensity is changed or different types of noise, the improved wavelet threshold function can be adaptively adjusted according to actual conditions, and a more reliable denoising result is provided.
3. The optimal parameters of the self-adaptive threshold value of each layer in wavelet decomposition and the optimal parameters in the improved wavelet threshold function are searched by using a mucosae optimization algorithm, the threshold value can be determined in a self-adaptive mode according to noise frequency characteristics of different layers, subjectivity and uncertainty of manually selecting a fixed threshold value are avoided, compared with other algorithm models, the method is not easy to fall into a local optimal solution, the convergence speed is higher, the optimal parameters of the improved wavelet threshold function are searched by using the mucosae optimization algorithm, the form of the wavelet threshold function can be optimized, and the denoising effect is improved.
Drawings
FIG. 1 is a schematic flow chart of a pointer instrument image denoising method based on an improved wavelet threshold function provided by the invention;
FIG. 2 is a schematic structural diagram of a pointer instrument image denoising device based on an improved wavelet threshold function provided by the invention;
FIG. 3 is a schematic flow chart of parameter optimization by using a mucosae optimization algorithm;
FIG. 4 is a diagram of an image of a first meter image after edge detection according to an embodiment of the present disclosure
FIG. 5 is a view of a first meter image after a Fourier transform provided in an embodiment of the present disclosure;
FIG. 6 is an inverse Fourier transformed image provided by an embodiment of the present disclosure;
FIG. 7 is an image of a secondary wavelet transform result provided by an embodiment of the present disclosure;
FIG. 8 is an image of a secondary wavelet reconstruction provided by an embodiment of the present disclosure;
FIG. 9 is a second meter image of a pointer meter image provided by an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of a computer device provided in an embodiment of the present disclosure;
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 to 10, the present invention provides a pointer instrument image denoising method and device based on improved wavelet threshold function, and the technical scheme is as follows:
fig. 1 is a schematic flow chart of a pointer instrument image denoising method based on an improved wavelet threshold function according to an embodiment of the present disclosure.
As shown in fig. 1, the pointer instrument image denoising method based on the improved wavelet threshold function comprises the following steps:
s100, acquiring a pointer instrument image;
the pointer instrument is used as a measuring instrument, and has the advantages of simple structure, convenient maintenance and use, high reliability, low price, water resistance, freezing resistance, dust resistance and the like, and is widely used in large industrial fields, such as industries of electric power systems, petrochemical industry, factories and mining enterprises, railway systems and the like. Common pointer meters are: voltmeters, barometers, oil temperature meters, thermometer, water meters, etc. The pointer instrument image is an image obtained by photographing the pointer instrument with a robot or a camera.
It should be specifically noted that, noise of the pointer instrument image refers to an undesired random disturbance or interference signal introduced during the process of collecting, transmitting, storing or processing the pointer instrument image. It can cause undesirable changes or distortions in the image, degrading the quality and visibility of the image. The noise includes gaussian noise, pretzel noise, analog noise, compression noise, mottled noise, speckle noise, block noise, motion blur noise, and the like. These noise types negatively affect the quality and visibility of the pointer instrument image, distorting, blurring or losing detail of the image, etc.
S200, preprocessing the pointer instrument image to obtain a first instrument image;
s210, detecting the edge of a dial part of the pointer instrument image by using an edge detection algorithm; the specific steps of detecting the edge of the dial part of the pointer instrument image by using an edge detection algorithm comprise:
(1) And carrying out gray level conversion on the pointer instrument image to obtain a gray level image.
(2) Gradient magnitude and direction are calculated.
Wherein Gx is a difference in the horizontal direction, gy is a difference in the vertical direction, G is a gradient mode, and θ is a direction.
(3) A threshold is set. Cutting the dial part according to the edge by using a pre-trained cutting model;
specifically, embodiments of the present disclosure employ a Canny edge detection algorithm that involves setting a dual threshold, by setting a high threshold and a low threshold, to determine edge pixels. If the gradient value of the edge pixel point is lower than the low threshold value, the edge pixel point is suppressed by being assigned 0. Conversely, if the gradient value of an edge pixel point is greater than the low threshold but less than the high threshold, it is classified as a weak edge point. Edge pixels have gradient values greater than a high threshold and are classified as strong edge points.
S220, cutting the pointer instrument image according to the edge of the dial plate part to obtain the dial plate part;
Specifically, a pre-trained clipping model is used for clipping; the pre-trained clipping model in the embodiments of the present disclosure is a model based on a convolutional neural network; the training steps are as follows: (1) preparing a dataset; (2) performing feature extraction on samples in the dataset; (3) Coordinate marking is carried out on a dial plate part of the pointer type instrument image; (4) selecting a model: such as convolutional neural networks; (5) training a model; (6) evaluating the trained model; (7) cutting out the dial plate portion.
S230, respectively carrying out anti-reflection treatment and correction treatment on the dial plate part;
specifically, the Gaussian function and homomorphic filtering are used for antireflection compensation of pointer instrument images reflecting light of the dial. And (3) performing correction processing by using a deep learning method, for example, extracting features by using a convolutional neural network with the scale of a pointer instrument image as the center, and correcting the inclination by using a correction model, wherein the correction model is a mathematical model based on a least square method.
It should be noted that, the preprocessing may further include enhancing the dial portion, identifying a noise type of the pointer instrument image, and the like. Specifically, the dial plate part can be enhanced by using an image enhancement technology, an image defogging technology, an image restoration technology and the like.
Specifically, the noise analysis is performed by performing noise analysis on the pointer instrument image to understand characteristics, statistical properties and types of noise, and the noise analysis can be performed by collecting a plurality of similar pointer instrument images and performing statistical analysis. For example, a gray level histogram of the pointer meter image, a power spectral density of estimated noise, a noise distribution characteristic of the observation pointer meter image, and the like may be calculated.
Specifically, the noise estimation is to estimate the noise level of the pointer instrument image according to the statistical characteristics of the pointer instrument image signal and noise on the basis of noise analysis. This may be done by analyzing statistical parameters of detail coefficients of a particular frequency band or particular scale of the image. Common noise estimation methods include mean square error based estimation, hypothesis testing, maximum likelihood estimation, and the like. A specific method and steps for noise estimation are given below:
(1) First, assume the distribution type of noise: based on knowledge and assumptions about the image noise of the pointer instrument, a suitable pointer instrument image noise distribution type is selected.
(2) Constructing a noise model: and establishing a corresponding pointer instrument image noise model according to the selected pointer instrument image noise distribution type. For example, for gaussian noise, it may be assumed that the noise of a pixel follows a gaussian distribution with a mean of 0 and a variance of σ2.
(3) Building a likelihood function: and constructing a likelihood function of the image data sample of the pointer instrument according to the image noise model of the pointer instrument. The likelihood function represents the probability of sample data being observed given a noise model.
(4) Maximum likelihood estimation: the noise parameters of the pointer instrument image are estimated by maximizing the likelihood function, i.e. the parameter value that maximizes the likelihood function is found. For gaussian noise, this can be achieved by minimizing the negative log-likelihood function, since the minimum value of the negative log-likelihood function is equivalent to the maximum value of the likelihood function.
(5) Parameter estimation: and obtaining the image parameter value of the pointer instrument, namely the distribution parameter of noise, according to the maximized likelihood function. For gaussian noise, for example, the estimated parameters are the mean and variance of the noise.
S300, inputting the first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform;
s310, inputting the first instrument image into a first denoising module to obtain first low-frequency information A1 and first high-frequency information B1;
Specifically, the specific steps of constructing the first denoising module in S310 are as follows:
s311: constructing an improved wavelet threshold function:
wherein w is the wavelet coefficient,for the thresholded new wavelet coefficients, parameter +.>The adjustable parameter alpha is more than or equal to 0, beta is more than or equal to 0, eta is more than or equal to 0, lambda is the self-adaptive threshold value, sign is a sign function;
s312: constructing the adaptive threshold function:
wherein L is the length of the sampling signal, sigma is the noise standard deviation, gamma is an adjustable parameter, and n is the total number of layers;
specifically, the total number of layers may be determined by the following formula:
n=ψ·floor(log 2 min(M,N))
wherein N is the number of decomposition layers, M is the height of the first instrument image, N is the width of the first instrument image, ψ is an adjustable factor, different parameters can be designed according to the instrument images corresponding to different noises, and floor is a downward rounding function.
S313: searching optimal parameters of the improved wavelet threshold function and the self-adaptive threshold by using a mucor optimization algorithm;
fig. 3 is a schematic flow chart of parameter optimization by using a mucosae optimization algorithm according to an embodiment of the disclosure.
As shown in fig. 3, the parameter optimization by using the mucoid optimization algorithm comprises the following steps:
S314: setting the improved wavelet threshold function parameter and the self-adaptive threshold parameters alpha, beta, gamma and eta, and initializing population parameters;
specifically, the population parameter may be set to be the maximum iteration number T, the number N of thalli, the perception range 0.5, and the maximum step size 0.1;
s315: updating the weight W of the coliform bacteria, wherein the weight coefficient of the coliform bacteria is as follows:
wherein the condition represents that the fitness of the population is ranked in the first half of individuals; other means the remaining individuals; bF represents the best fitness obtained during the current iteration; hF represents the worst fitness value currently obtained in the iterative process;
s316: updating the individual position, wherein the position formula is as follows:
p=tanh|S(i)-D E |
wherein LB and UB are the upper and lower limits of the search range, and r is the interval [0,1 ]]Is a self-defined parameter, vb is [ -a, a)]Random number in between, vc is [0,1]The parameter of oscillation between the two and finally tending to 0, t is the current iteration number, xb (t) represents the currentThe individual position with the optimal fitness; x (t) represents the current position of the slime mold individual; XA (t) and XB (t) are two random individual positions; w represents the weight coefficient of the coliform, S (i) represents the fitness of X (t), and D E Representing the optimal fitness value obtained by all iterations;
s317: calculating the fitness value and updating a global optimal solution;
Specifically, the fitness function may be designed by applying a denoising effect evaluation function of a wavelet threshold function, specifically, a peak signal-to-noise ratio function, firstly, performing wavelet reconstruction on low-frequency information A1 and high-frequency information B1 to obtain a reconstructed image, and then calculating the peak signal-to-noise ratio of the reconstructed image and the first instrument image, where a specific formula is as follows:
wherein n is the bit number of each sampling value, and the larger the calculated peak signal-to-noise ratio is, the fewer noise signals of the denoised image are, and the better the image denoising effect is; MSE is the mean square error, and the formula is as follows:
wherein w, h is the size of the image of the instrument, M (i, j) is the pixel size of the pixel point with the original image coordinate of (i, j); n (i, j) is the pixel size of the pixel point with the coordinates of (i, j) of the reconstructed image after denoising.
S318: judging whether an end condition is met, and returning to the step S315 if the end condition is not met; outputting optimal parameters if the ending condition is met; whether the end condition reaches the preset denoising effect or not;
s319: and generating a first denoising module according to the improved wavelet threshold function and the optimal parameter.
Specifically, after the first denoising module is constructed, the first instrument image is input to the first denoising module to perform wavelet decomposition, and a final output result is first low-frequency information A1 and first high-frequency information B1.
S320, inputting the first instrument image into a second denoising module to obtain second low-frequency information A2 and second high-frequency information B2;
specifically, the specific steps of inputting the first instrument image to the second denoising module to perform wavelet decomposition in S320 are as follows:
s321: performing Fourier transform on the first instrument image, and converting the first instrument image from a space domain to a frequency domain;
specifically, spatial domain (time domain): the spatial domain refers to the representation of a signal in time. In the spatial domain, a signal is represented as a time-varying amplitude or amplitude. The method shows the value of the signal at each time point, and the time sequence characteristics of the signal such as duration, amplitude, periodicity and the like can be known by observing the waveform of the signal. Frequency domain: the frequency domain refers to the representation of a signal in frequency. The signal is transformed into the frequency domain by fourier transformation. In the frequency domain, the signal is represented in the form of frequencies, revealing information of the different frequency components contained in the signal. Information in the frequency domain concerns frequency characteristics of the signal, such as frequency content, spectral distribution, frequency response, etc.
It should be noted that, before converting the first meter image from the spatial domain to the frequency domain, the first meter image needs to be subjected to gray-scale conversion to obtain a gray-scale image.
In particular, the fourier transform is a linear integral transform used to transform signals between the spatial (or time) domain and the frequency domain, and has many applications in physics and engineering. The formula is as follows:
wherein,for the Fourier transform, f (x) is a periodic function, +.>Is frequency;
FIG. 5 is a view of a first meter image after Fourier transforming, as provided by an embodiment of the present disclosure;
the image comprises an original image, a gray image, an image after Fourier transformation and an image after Fourier transformation translation.
S322: analyzing the frequency domain information, determining a frequency threshold value, and removing high-frequency noise;
it should be specifically noted that, the following is an example of an embodiment of the disclosure, where the selection of a specific threshold should be combined with the actual calculation of the amplitude spectrum of the image, so as to obtain a spectrogram. And counting the amplitude values in the spectrogram, and calculating the average value and standard deviation of the amplitude spectrum. Depending on the noise level and the image detail requirements, an appropriate multiple times the standard deviation (e.g. 2 or 3 times) is chosen as the threshold. The spectral regions above the threshold are zeroed out.
S323: performing inverse Fourier transform on the first instrument image from which the high-frequency noise is removed, and recovering the first instrument image from which the high-frequency noise is removed to a spatial domain;
FIG. 6 is an image of a first instrument image after an inverse Fourier transform provided by an embodiment of the present disclosure;
the image comprises an original image, a gray level image, an image after Fourier transformation and an image after inverse transformation;
s24: and decomposing the first instrument image restored to the spatial domain into the second low-frequency information A2 and the second high-frequency information B2 by using wavelet transformation.
S330, performing linear fusion on the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and performing fusion on the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B;
s331: the first low-frequency information A1 and the second low-frequency information A2 are linearly fused by using the weighted average method to obtain the low-frequency information A;
introducing a weight coefficient lambda 12 The low frequency information a=λ 1 A1+λ 2 A2;
Specifically, the weight coefficient λ 12 =1。
S332: and fusing the first high-frequency information B1 and the second high-frequency information B2 by using the wavelet coefficient maximum value method to obtain the high-frequency information B=max { B1, B2}.
S340, reconstructing and outputting a denoised second instrument image by utilizing wavelet according to the low-frequency information A and the high-frequency information B;
Specifically, the specific steps of wavelet reconstruction are as follows:
(1) Loading wavelet coefficients: the approximation coefficients and the detail coefficients are loaded into a computing environment.
(2) Using a wavelet threshold function: the inverse transform is performed using the same wavelet threshold function according to the wavelet threshold function selected when performing wavelet decomposition.
(3) Inverse wavelet decomposition: according to the number of stages and the structure of the wavelet decomposition, the inverse wavelet decomposition is performed in an inverse order from high frequency to low frequency. The inverse wavelet decomposition process is to reverse the approximation coefficient and detail coefficient refined step by step and restore the original signal or image through synthesis filter and inverse convolution operation.
(4) And (3) reconstruction: and according to the result of the inverse wavelet decomposition, carrying out synthesis operation on the low-frequency approximation coefficient and the high-frequency detail coefficient on each decomposition level, and reconstructing an original signal or image. The inverse convolution and synthesis filter filtering operations used in the inverse wavelet decomposition process may fuse and reconstruct the low and high frequency information.
(5) And (5) iterative reconstruction: if multi-stage wavelet decomposition is performed, inverse wavelet decomposition and reconstruction of the corresponding number of times are required according to the number of decomposition stages. From the approximation coefficient and detail coefficient of the last stage, inverse wavelet decomposition and reconstruction are sequentially carried out, and the original signal or image is gradually restored.
(6) Evaluating the reconstruction quality: and performing quality evaluation on the reconstructed signal or image obtained by inverse transformation, such as calculating indexes of signal-to-noise ratio (SNR), peak signal-to-noise ratio (PSNR), structural Similarity Index (SSIM) and the like, so as to evaluate the accuracy of reconstruction and the degree of retaining original characteristics.
Specifically, the wavelet inverse transformation formula is:
wherein, (W) ψ f) (a, b) are wavelet transform coefficients.
S400, outputting a second instrument image as a pointer instrument denoising image.
Embodiment one:
in a hydroelectric power station, data on various meters need to be checked regularly, and the data on the meters need to be manually transcribed in the past, so that the method is quite labor-consuming, and the manually transcribed data is easy to cause data transcription errors, so that unnecessary losses can be caused. Therefore, in the context of manually copying meter data of a hydroelectric power station, it is proposed to recognize data in a meter image by using a machine learning meter image recognition method. The method comprises the steps of firstly shooting an instrument by using a robot or a camera to obtain data, and then recognizing an instrument image by using machine learning to obtain the data in the instrument image, wherein when the instrument image is recognized, the image contains certain noise which can be caused by various factors such as water mist or camera shake during shooting of the robot, so that the recognition difficulty is greatly improved.
The method for denoising the pointer instrument image comprises the steps of firstly obtaining the pointer instrument image shot by a robot or a camera, and then preprocessing the water conservancy and hydropower instrument image to obtain a first instrument image, wherein preprocessing comprises the steps of cutting size, judging noise type and the like, and the noise type of the instrument image of a hydropower station is Gaussian noise, spiced salt noise and the like mostly. And secondly, constructing two denoising models for carrying out wavelet decomposition on pointer instrument images shot by the robot or the camera, wherein the first denoising module is formed by optimizing and improving a wavelet threshold function by a mucosae optimization algorithm, and the second denoising module is formed by combining Fourier transformation and wavelet transformation. As shown in fig. 5, the image of the pointer instrument image after fourier transformation is shown in fig. 6, which is the image of the pointer instrument image after inverse transformation, and fig. 7, which is the result of performing two-layer wavelet transformation after inverse fourier transformation. The first instrument image is subjected to wavelet decomposition by using the first denoising module and the second denoising module respectively, so that first low-frequency information A1 and first high-frequency information B1, second low-frequency information A2 and second high-frequency information B2 are correspondingly obtained respectively. Thirdly, linearly fusing the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and fusing the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B; and finally, reconstructing and outputting a denoised second instrument image by utilizing wavelet according to the low-frequency information A and the high-frequency information B. Fig. 8 is a two-level image reconstruction obtained by performing wavelet reconstruction on the low-frequency information a and the high-frequency information B, and fig. 9 is a comparison chart of denoising a pointer instrument image containing noise by using a common wavelet method and denoising by using the method disclosed in the disclosure.
Embodiment two: in chemical production, due to the specificity of the chemical field, such as alkaline, acidic, corrosive and explosive substances in the working environment, etc. The electronic instrument is not suitable for observing a series of physical quantities such as flow velocity and pressure, and the pointer instrument is widely applied to chemical production due to the simple and durable structure. The pointer instrument images are remotely shot by using the camera, and the readings of the instruments are identified by using methods such as machine learning, so that the production efficiency of the chemical industry is greatly improved. However, since the photographed image may be inclined and reflected and may be noisy, the pointer instrument image needs to be denoised. In the embodiment of the disclosure, an original pointer instrument image is obtained remotely through a camera, edge extraction is performed on the original pointer instrument image through a canny operator, and a dial part is obtained by cutting according to the extracted edge characteristics. And then carrying out reflection treatment and inclination correction treatment on the surface disc part to obtain a first instrument image. And secondly, constructing two denoising models for carrying out wavelet decomposition on pointer instrument images shot by the robot or the camera, wherein the first denoising module is formed by optimizing and improving a wavelet threshold function by a mucosae optimization algorithm, and the second denoising module is formed by combining Fourier transformation and wavelet transformation. The first instrument image is subjected to wavelet decomposition by using the first denoising module and the second denoising module respectively, so that first low-frequency information A1 and first high-frequency information B1, second low-frequency information A2 and second high-frequency information B2 are correspondingly obtained respectively. Thirdly, linearly fusing the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and fusing the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B; and finally, reconstructing and outputting a denoised second instrument image by utilizing wavelet according to the low-frequency information A and the high-frequency information B. And outputting the second instrument image as the denoised pointer instrument image.
Embodiment III: the pointer type pressure gauge is widely applied to verification of petroleum exploitation, gas exploitation and chemical industry, parameters such as a measuring range, verification point number, forward and backward strokes and the like are set by reading the reading of the pointer type pressure gauge, and the system can realize the works such as automatic pressurization, decompression, voltage stabilization, reading judgment, error calculation and the like. In the process of reading the pointer pressure gauge, the image denoising of the pointer pressure gauge is necessary. In the embodiment of the disclosure, an original pointer instrument image is obtained remotely through a camera, edge extraction is performed on the original pointer instrument image through a canny operator, and a dial part is obtained by cutting according to the extracted edge characteristics. And then carrying out reflection treatment and inclination correction treatment on the surface disc part to obtain a first instrument image. And secondly, constructing two denoising models for carrying out wavelet decomposition on pointer instrument images shot by the robot or the camera, wherein the first denoising module is formed by optimizing and improving a wavelet threshold function by a mucosae optimization algorithm, and the second denoising module is formed by combining Fourier transformation and wavelet transformation. The first instrument image is subjected to wavelet decomposition by using the first denoising module and the second denoising module respectively, so that first low-frequency information A1 and first high-frequency information B1, second low-frequency information A2 and second high-frequency information B2 are correspondingly obtained respectively. Thirdly, linearly fusing the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and fusing the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B; and finally, reconstructing and outputting a denoised second instrument image by utilizing wavelet according to the low-frequency information A and the high-frequency information B. And outputting the second instrument image as a denoised pointer type pressure gauge image.
In the disclosed embodiment, step S100 first acquires a pointer meter image. S200, preprocessing the pointer instrument image to obtain a first instrument image; the preprocessing step can analyze the noise type, noise frequency and the like of the instrument image containing noise, so that the data is more accurate, a basis is provided for the selection of subsequent parameters, and the probability of inaccurate parameter selection caused by the ambiguous noise type is reduced. S300, inputting the first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform; through carrying out wavelet decomposition and denoising processing on the image by using the first denoising module and the second denoising module, the beneficial effects of noise removal, detail enhancement, structure maintenance, compression performance improvement and the like of the image can be realized, so that the image quality and the visual effect are improved. Appropriate denoising models and thresholds need to be selected according to specific application scenes and requirements so as to achieve the best results. Performing linear fusion on the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and performing fusion on the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B; the low-frequency information is fused linearly by using a weighted average method and the high-frequency information is fused by using a wavelet coefficient maximum method, so that the quality of an image can be further improved, details are reserved, the denoising effect is improved, and the visual effect and the perceived quality of the image are enhanced. And finally, reconstructing and outputting a denoised second denoised image by using wavelet according to the low-frequency information A and the high-frequency information B. Image noise can be effectively removed, details and structures can be preserved, and image quality and visual effect can be improved. S400, the pointer type instrument image of the noise removing hand can be used as input of the pointer type instrument image identification, and the identification accuracy is improved.
Fig. 2 is a schematic structural diagram of a pointer instrument image denoising device based on an improved wavelet threshold function according to an embodiment of the present disclosure.
As shown in fig. 2, the pointer instrument image denoising apparatus based on the improved wavelet threshold function includes:
the acquisition module is used for: the method comprises the steps of acquiring a pointer instrument image;
the processing module is used for: the method comprises the steps of preprocessing the pointer instrument image to obtain a first instrument image;
an input module: the method comprises the steps of inputting a first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform;
and an output module: and the second instrument image is used for outputting a pointer instrument denoising image.
In an embodiment of the present disclosure, the acquisition module first acquires a pointer instrument image. The processing module is used for preprocessing the pointer type instrument image to obtain a first instrument image; the preprocessing step can analyze the noise type, noise frequency and the like of the instrument image containing noise, so that the data is more accurate, a basis is provided for the selection of subsequent parameters, and the probability of inaccurate parameter selection caused by the ambiguous noise type is reduced. The input module then inputs the first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform; through carrying out wavelet decomposition and denoising processing on the image by using the first denoising module and the second denoising module, the beneficial effects of noise removal, detail enhancement, structure maintenance, compression performance improvement and the like of the image can be realized, so that the image quality and the visual effect are improved. Appropriate denoising models and thresholds need to be selected according to specific application scenes and requirements so as to achieve the best results. Performing linear fusion on the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and performing fusion on the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B; the low-frequency information is fused linearly by using a weighted average method and the high-frequency information is fused by using a wavelet coefficient maximum method, so that the quality of an image can be further improved, details are reserved, the denoising effect is improved, and the visual effect and the perceived quality of the image are enhanced. And finally, reconstructing and outputting a denoised second denoised image by using wavelet according to the low-frequency information A and the high-frequency information B. Image noise can be effectively removed, details and structures can be preserved, and image quality and visual effect can be improved. The pointer type instrument image of the denoising hand output by the output module can be used as the input of the pointer type instrument image identification, so that the identification accuracy is improved.
Fig. 10 is a flowchart of a computer device according to an embodiment of the disclosure.
As shown in fig. 10, the computer device includes:
the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry Standard architecture (Industry Standard Architecture; hereinafter ISA) bus, micro channel architecture (Micro Channel Architecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video Electronics Standards Association; hereinafter VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnection; hereinafter PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 10, commonly referred to as a "hard disk drive"). Although not shown in fig. 10, a magnetic disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable nonvolatile optical disk (e.g., a compact disk read only memory (Compact Disc Read Only Memory; hereinafter CD-ROM), digital versatile read only optical disk (Digital Video Disc Read Only Memory; hereinafter DVD-ROM), or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the various embodiments of the disclosure.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods in the embodiments described in this disclosure.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, the computer device 12 may also communicate with one or more networks such as a local area network (Local Area Network; hereinafter LAN), a wide area network (Wide Area Network; hereinafter WAN) and/or a public network such as the Internet via the network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the methods mentioned in the foregoing embodiments.
In the description of the present specification, a description referring to the terms "one embodiment," "example," "specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1. A pointer instrument image denoising method based on an improved wavelet threshold function, comprising:
s100, acquiring a pointer instrument image;
s200, preprocessing the pointer instrument image to obtain a first instrument image;
s210, detecting the edge of a dial part of the pointer instrument image by using an edge detection algorithm;
s220, cutting the pointer instrument image according to the edge of the dial plate part to obtain the dial plate part;
s230, respectively carrying out reflection processing and correction processing on the dial plate part to obtain the first instrument image;
s300, inputting the first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform;
S310, inputting the first instrument image into a first denoising module to obtain first low-frequency information A1 and first high-frequency information B1;
s320, inputting the first instrument image into a second denoising module to obtain second low-frequency information A2 and second high-frequency information B2;
s330, performing linear fusion on the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A, and performing fusion on the first high-frequency information B1 and the second high-frequency information B2 by using a wavelet coefficient maximum value method to obtain high-frequency information B;
s340, reconstructing and outputting a denoised second instrument image by utilizing wavelet according to the low-frequency information A and the high-frequency information B;
s400, outputting a second instrument image as a pointer instrument denoising image.
2. The method for denoising a pointer instrument image based on an improved wavelet threshold function according to claim 1, wherein S200 specifically comprises:
carrying out gray level transformation on the pointer instrument image to obtain a gray level image; calculating the gradient and amplitude of the gray level image; setting a threshold to determine the edge using an edge detection algorithm; cutting the dial part according to the edge by using a pre-trained cutting model;
Marking each part of the dial plate part by coordinates with the circle center of the dial plate as a central coordinate point and extracting the characteristics of the parts; correcting the dial part by using a correction model according to the extracted characteristics; each part comprises a pointer, a scale, a numerical value and a unit mark of a pointer instrument;
and carrying out reflection compensation on the corrected dial plate part to obtain the first instrument image.
3. The method for denoising a pointer instrument image based on an improved wavelet threshold function according to claim 1, wherein S300 further comprises a step of constructing a first denoising module, wherein the specific step of constructing the first denoising module is as follows:
s311: constructing an improved wavelet threshold function:
wherein w is the wavelet coefficient,for the thresholded new wavelet coefficients, parameter +.>The adjustable parameter alpha is more than or equal to 0, beta is more than or equal to 0, eta is more than or equal to 0, lambda is a self-adaptive threshold value, and sign is a sign function;
s312: constructing the adaptive threshold function:
wherein L is the length of the sampling signal, sigma is the noise standard deviation, gamma is an adjustable parameter, and n is the total number of layers;
s313: searching optimal parameters of the improved wavelet threshold function and the self-adaptive threshold by using a mucor optimization algorithm;
S314: setting parameters of the improved wavelet threshold function and parameters alpha, beta, gamma and eta of the self-adaptive threshold, and initializing population parameters; the population parameters comprise maximum iteration times T, the number N of thalli, a perception range and a maximum step length;
s315: updating the weight W of the myxobacteria;
s316: updating the individual location;
s317: calculating the fitness function and updating a global optimal solution;
s318: judging whether an end condition is met, and returning to the step S316 if the end condition is not met; outputting optimal parameters if the ending condition is met;
s319: and generating the first denoising module according to the improved wavelet threshold function, the adaptive threshold and the optimal parameter.
4. The method for denoising a pointer instrument image based on an improved wavelet threshold function according to claim 1, wherein S320 comprises:
s321: performing Fourier transform on the first instrument image, and converting the first instrument image from a space domain to a frequency domain;
s322: analyzing the frequency domain information, determining a frequency threshold value, and removing high-frequency noise;
s323: performing inverse Fourier transform on the first instrument image from which the high-frequency noise is removed, and recovering the first instrument image from which the high-frequency noise is removed to a spatial domain;
S324: and decomposing the first instrument image restored to the spatial domain into the second low-frequency information A2 and the second high-frequency information B2 by using wavelet transformation.
5. The method for denoising a pointer instrument image based on an improved wavelet threshold function according to claim 1, wherein S330 specifically comprises:
s331: the first low-frequency information A1 and the second low-frequency information A2 are linearly fused by using the weighted average method to obtain the low-frequency information A;
introducing a weight coefficient lambda 12 The low frequency information a=λ 1 A1+λ 2 A2;
S332: and fusing the first high-frequency information B1 and the second high-frequency information B2 by using the wavelet coefficient maximum value method to obtain the high-frequency information B=max { B1, B2}.
6. A pointer instrument image denoising apparatus based on an improved wavelet threshold function, comprising:
the acquisition module is used for: the method comprises the steps of acquiring a pointer instrument image;
the processing module is used for: the method comprises the steps of preprocessing the pointer instrument image to obtain a first instrument image;
an input module: the method comprises the steps of inputting a first instrument image into a wavelet denoising model to denoise to obtain a second instrument image; the wavelet denoising model comprises a first denoising module and a second denoising module; the first denoising module is a wavelet denoising model optimized by a mucor algorithm; the second denoising module is a wavelet denoising model combined with Fourier transform;
And an output module: and the second instrument image is used for outputting a pointer instrument denoising image.
7. The pointer instrument image denoising apparatus according to claim 6, wherein the input module is further configured to construct a first denoising module:
s311: constructing an improved wavelet threshold function:
wherein w is the wavelet coefficient,for the thresholded new wavelet coefficients, parameter +.>The adjustable parameter alpha is more than or equal to 0, beta is more than or equal to 0, eta is more than or equal to 0, lambda is a self-adaptive threshold value, and sign is a sign function;
s312: constructing the adaptive threshold function:
wherein L is the length of the sampling signal, sigma is the noise standard deviation, gamma is an adjustable parameter, and n is the total number of layers;
s313: searching optimal parameters of the improved wavelet threshold function and the self-adaptive threshold by using a mucor optimization algorithm;
s314: setting parameters of the improved wavelet threshold function and parameters alpha, beta, gamma and eta of the self-adaptive threshold, and initializing population parameters; the population parameters comprise maximum iteration times T, the number N of thalli, a perception range and a maximum step length;
s315: updating the weight W of the myxobacteria;
s316: updating the individual location;
s317: calculating the fitness function and updating a global optimal solution;
S318: judging whether an end condition is met, and returning to the step S316 if the end condition is not met; outputting optimal parameters if the ending condition is met;
s319: and generating the first denoising module according to the improved wavelet threshold function, the adaptive threshold and the optimal parameter.
8. The pointer instrument image denoising apparatus based on improved wavelet threshold function of claim 6, wherein said input module is further configured to:
s321: performing Fourier transform on the first instrument image, and converting the first instrument image from a space domain to a frequency domain;
s322: analyzing the frequency domain information, determining a frequency threshold value, and removing high-frequency noise;
s323: performing inverse Fourier transform on the first instrument image from which the high-frequency noise is removed, and recovering the first instrument image from which the high-frequency noise is removed to a spatial domain;
s324: the first meter image restored to the spatial domain is decomposed into second low-frequency information A2 and second high-frequency information B2 using wavelet transform.
9. The pointer instrument image denoising apparatus based on improved wavelet threshold function of claim 6, wherein said input module is further configured to:
S331: performing linear fusion on the first low-frequency information A1 and the second low-frequency information A2 by using a weighted average method to obtain low-frequency information A;
introducing a weight coefficient lambda 12 The low frequency information a=λ 1 A1+λ 2 A2;
S332: and fusing the first high-frequency information B1 and the second high-frequency information B2 by using the wavelet coefficient maximum value method to obtain high-frequency information B=max { B1, B2}.
10. A computer device comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when the computer program is executed.
CN202311468313.5A 2023-11-07 2023-11-07 Pointer instrument image denoising method and device based on improved wavelet threshold function Pending CN117474790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311468313.5A CN117474790A (en) 2023-11-07 2023-11-07 Pointer instrument image denoising method and device based on improved wavelet threshold function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311468313.5A CN117474790A (en) 2023-11-07 2023-11-07 Pointer instrument image denoising method and device based on improved wavelet threshold function

Publications (1)

Publication Number Publication Date
CN117474790A true CN117474790A (en) 2024-01-30

Family

ID=89630833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311468313.5A Pending CN117474790A (en) 2023-11-07 2023-11-07 Pointer instrument image denoising method and device based on improved wavelet threshold function

Country Status (1)

Country Link
CN (1) CN117474790A (en)

Similar Documents

Publication Publication Date Title
CN110361778B (en) Seismic data reconstruction method based on generation countermeasure network
CN112132959B (en) Digital rock core image processing method and device, computer equipment and storage medium
CN111626993A (en) Image automatic detection counting method and system based on embedded FEFnet network
WO2023202474A1 (en) Method and system for accurately forecasting three-dimensional spatiotemporal sequence multiple parameters of seawater quality
CN108681689B (en) Frame rate enhanced gait recognition method and device based on generation of confrontation network
CN117434153B (en) Road nondestructive testing method and system based on ultrasonic technology
CN113936132B (en) Method and system for detecting water pollution of chemical plant based on computer vision
CN111275686A (en) Method and device for generating medical image data for artificial neural network training
CN113920255B (en) High-efficient mapping system based on point cloud data
CN117036715A (en) Deformation region boundary automatic extraction method based on convolutional neural network
CN117011234A (en) Chromosome anomaly detection system and method based on denoising diffusion probability model
CN113920208A (en) Image processing method and device, computer readable storage medium and electronic device
CN117522891A (en) 3D medical image segmentation system and method
CN117291835A (en) Denoising network model based on image content perception priori and attention drive
CN116862885A (en) Segmentation guide denoising knowledge distillation method and device for ultrasonic image lesion detection
CN117474790A (en) Pointer instrument image denoising method and device based on improved wavelet threshold function
CN112184778B (en) Short-term displacement detection method based on GNSS dynamic positioning time sequence segmentation
CN112180454B (en) Magnetic resonance underground water detection random noise suppression method based on LDMM
CN114820636A (en) Three-dimensional medical image segmentation model and training method and application thereof
CN114332278A (en) OCTA image motion correction method based on deep learning
CN114155411A (en) Intelligent detection and identification method for small and weak targets
CN111079715B (en) Occlusion robustness face alignment method based on double dictionary learning
CN109360656B (en) Cancer detection method based on multi-target evolution algorithm
Oroumchian ECEI Spectrogram Denoising and Feature Extraction Using a Multi-Wavelet Convolutional Neural Network Model
CN116977220B (en) Blind image motion blur removal algorithm based on image quality heuristic

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination