CN110148139A - A kind of image recovery method and device - Google Patents
A kind of image recovery method and device Download PDFInfo
- Publication number
- CN110148139A CN110148139A CN201910339117.5A CN201910339117A CN110148139A CN 110148139 A CN110148139 A CN 110148139A CN 201910339117 A CN201910339117 A CN 201910339117A CN 110148139 A CN110148139 A CN 110148139A
- Authority
- CN
- China
- Prior art keywords
- image
- neuron
- neurons
- pixel
- block
- 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.)
- Withdrawn
Links
- 238000011084 recovery Methods 0.000 title claims abstract description 86
- 238000000034 method Methods 0.000 title claims abstract description 83
- 210000002569 neuron Anatomy 0.000 claims abstract description 494
- 238000013528 artificial neural network Methods 0.000 claims abstract description 130
- 238000012545 processing Methods 0.000 claims abstract description 76
- 230000008859 change Effects 0.000 claims description 233
- 230000006870 function Effects 0.000 claims description 101
- 239000011159 matrix material Substances 0.000 claims description 82
- 230000015556 catabolic process Effects 0.000 claims description 48
- 238000006731 degradation reaction Methods 0.000 claims description 48
- 238000004590 computer program Methods 0.000 claims description 46
- 230000001537 neural effect Effects 0.000 claims description 35
- 230000000903 blocking effect Effects 0.000 claims description 22
- 238000012986 modification Methods 0.000 abstract description 3
- 230000004048 modification Effects 0.000 abstract description 3
- XOFYZVNMUHMLCC-ZPOLXVRWSA-N prednisone Chemical compound O=C1C=C[C@]2(C)[C@H]3C(=O)C[C@](C)([C@@](CC4)(O)C(=O)CO)[C@@H]4[C@@H]3CCC2=C1 XOFYZVNMUHMLCC-ZPOLXVRWSA-N 0.000 description 13
- 238000001914 filtration Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 229960001948 caffeine Drugs 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002964 excitative effect Effects 0.000 description 1
- 230000002401 inhibitory effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- RYYVLZVUVIJVGH-UHFFFAOYSA-N trimethylxanthine Natural products CN1C(=O)N(C)C(=O)C2=C1N=CN2C RYYVLZVUVIJVGH-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Biomedical Technology (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Biophysics (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Neurology (AREA)
- Molecular Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Image Processing (AREA)
Abstract
The present invention provides a kind of image recovery method and devices, are related to technical field of image processing.The image recovery method, comprising: image to be processed is subjected to piecemeal processing, obtains multiple block images;Successively each block image is handled, until the state knots modification of all neurons in the corresponding neural network of the block image be zero or the knots modification of the energy function of neural network be greater than or equal to zero, export the restoration result of target area in the block image;According to the restoration result of target area in all block images, the final image restoration result of image to be processed is obtained.Such mode reduces the computational complexity in image recovery process, has stronger real-time online processing capacity.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image restoration method and apparatus.
Background
As is well known, restoration of degraded images is always an important research content in the field of image processing and computer vision, and has been highly concerned by academia and industry for many years, and has gradually formed an architecture framework. Typical of the existing degraded image restoration techniques are an inverse filtering method, a Wiener (Wiener) filtering method, a Kalman filtering method, a Singular Value Decomposition (SVD) pseudo-inverse method, a maximum entropy method, and some restoration methods based on an image model.
Due to the ill-conditioned nature of the degraded image recovery problem, the inverse filtering method can only be used under extremely high signal-to-noise ratio (SNR) conditions to obtain a good recovery result. Wiener filtering basically overcomes the disadvantages of inverse filtering, but makes assumptions about the generalized stationary (WSS) of the processed degraded image, and knows the correlation function or power spectrum characteristics of the degraded image, which are often difficult to satisfy and obtain in practice. Although the SVD pseudo-inverse method and the Kalman filtering method can be used for restoring non-stationary degraded images, the huge calculation amount of the SVD pseudo-inverse method and the Kalman filtering method causes the SVD pseudo-inverse method and the Kalman filtering method to be limited in practical application. Some restoration techniques based on degraded image models, like Wiener filtering, also require assumptions of WSS and period boundary conditions for the processed degraded image.
However, the above methods all have a problem of "positive constraint" which is not solved yet, although the maximum entropy method implies constraint conditions, it involves the solution of a high-dimensional nonlinear equation set, and the computational difficulty and complexity of solving the equation set greatly limit the practical application thereof. It is therefore important and necessary to explore and develop a new method for restoration of degraded images that can satisfy the constraints and facilitate the practical engineering implementation while also not requiring the generalized stationary (WSS) assumption. The development of the Artificial Neural Network (ANN) technology in recent years provides a new technical approach for developing the new image recovery method; to this end, y.t.zhou et al, southern california university, usa, proposed a new method of applying ANN techniques for degraded image recovery. Although this method achieves a good effect in recovering degraded images, particularly under low SNR conditions, since the space-time complexity thereof depends greatly on the size of the image to be processed and the size of the maximum gray level value of the pixel, in the case where these parameter values are large, this ANN method for image recovery is difficult to implement in practice.
Disclosure of Invention
The embodiment of the invention provides an image recovery method and device, and aims to solve the problem of high implementation complexity of the conventional image recovery technology.
In order to solve the above technical problem, an embodiment of the present invention provides an image recovery method, including:
the method comprises the steps of carrying out blocking processing on an image to be processed to obtain a plurality of blocking images;
processing each block image in sequence until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
Optionally, the blocking processing the image to be processed to obtain a plurality of blocked images includes:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
Further, the sequentially processing each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image includes:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
Optionally, the sequentially processing all the pixels in each block image until the state change amount of all the neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target region in the block image includes:
performing iterative processing on each neuron corresponding to a first pixel in the block image to acquire the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
updating the image gray level estimator corresponding to the pixel;
if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero, sequentially performing iterative processing on each neuron corresponding to a second pixel in the block image;
and under the condition that the energy function of the network is not changed, outputting a recovery result of the target area in the block image.
Further, the state change amount of the neuron is acquired in a manner of:
acquiring an input signal received by a neuron;
and determining the state change quantity of the neuron according to the input signal.
Further, the acquiring input signals received by the neurons comprises:
respectively determining interconnection weights of the neurons and bias of the neurons;
and determining the input signal received by the neuron according to the interconnection weight and the bias.
Specifically, the acquisition mode of the interconnection right of the neuron is as follows:
according to the formula:acquiring interconnection authority of neurons;
wherein, Tikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, a,r and R are the total number of neurons in each group of neurons, anM is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the bias of the neuron is obtained by:
according to the formula:obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the determining the input signal received by the neuron according to the interconnection weight and the bias comprises:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray level value of the p-th pixel in the image to be processed is obtained; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, …, R being the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the determining the state change amount of the neuron according to the input signal comprises:
according to the formula:determining a state change amount of a neuron;
wherein, Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the manner of obtaining the change of the energy function of the neural network caused by the state change is as follows:
according to the formula:determining energy of a neural network caused by a change in stateThe amount of change of the function;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Further, the updating the image gray level estimate for the pixel comprises:
acquiring an image gray level estimator corresponding to a pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
judging whether the image gray level estimator meets a preset condition or not;
and if the image gray level estimator meets the preset condition, updating the image gray level estimator corresponding to the pixel.
Specifically, the obtaining of the image gray level estimator corresponding to the pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron includes:
according to the formula:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the preset conditions are as follows: the image gray level estimator is greater than or equal to zero and less than or equal to M;
wherein, M is a positive integer, which is the maximum value of the gray level of the pixel in the image to be processed.
The embodiment of the invention also provides an image recovery device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor; wherein the processor implements the following steps when executing the computer program:
the method comprises the steps of carrying out blocking processing on an image to be processed to obtain a plurality of blocking images;
processing each block image in sequence until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
Optionally, the processor implements the following steps when executing the computer program for performing block processing on the image to be processed to obtain a plurality of block images:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
Further, the processor executes the sequential processing on each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and the following steps are realized when the computer program outputs the recovery result of the target area in the block image:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
Optionally, the processor executes the processing on all pixels in each block image in sequence until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and when the computer program outputs the recovery result of the target area in the block image, the following steps are implemented:
performing iterative processing on each neuron corresponding to a first pixel in the block image to acquire the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
updating the image gray level estimator corresponding to the pixel;
if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero, sequentially performing iterative processing on each neuron corresponding to a second pixel in the block image;
and under the condition that the energy function of the network is not changed, outputting a recovery result of the target area in the block image.
Further, the processor, when executing the computer program of the manner of acquiring the state change amount of the neuron, realizes the steps of:
acquiring an input signal received by a neuron;
and determining the state change quantity of the neuron according to the input signal.
Optionally, the processor, when executing the computer program for acquiring input signals received by the neuron, implements the following steps:
respectively determining interconnection weights of the neurons and bias of the neurons;
and determining the input signal received by the neuron according to the interconnection weight and the bias.
Specifically, the processor, when executing the computer program of the acquisition mode of the interconnection right of the neuron, implements the following steps:
according to the formula:acquiring interconnection authority of neurons;
wherein, Tikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, …, J2,j=1,2,…,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S, l is 1, 2, …, S is the total number of neuronal groups; n-1, 2, …, R-1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the processor, when executing the computer program of the manner of obtaining the bias of the neuron, implements the following steps:
according to the formula:obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
In particular, the processor, when executing the computer program for determining an input signal received by a neuron based on the interconnection weights and the bias, implements the steps of:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray level value of the p-th pixel in the image to be processed is obtained; 1, 2, …, J2,j=1,2,…,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S, l is 1, 2, …, S is the total number of neuronal groups; n-1, 2, …, R-1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
In particular, the processor, when executing the computer program for determining an amount of state change of a neuron based on the input signal, implements the steps of:
according to the formula:determining a state change amount of a neuron;
wherein, Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the processor, when executing the computer program of the manner of obtaining the change amount of the energy function of the neural network caused by the state change amount, implements the steps of:
according to the formula:determining a change in stateThe amount of change in the energy function of the neural network caused by the variable;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Further, the processor, when executing the computer program for updating the image gray level estimator for the pixel, performs the following steps:
acquiring an image gray level estimator corresponding to a pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
judging whether the image gray level estimator meets a preset condition or not;
and if the image gray level estimator meets the preset condition, updating the image gray level estimator corresponding to the pixel.
Specifically, the processor executes the computer program for obtaining the image gray level estimator corresponding to the pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron, and implements the following steps:
according to the formula:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the preset conditions are as follows: the image gray level estimator is greater than or equal to zero and less than or equal to M;
wherein, M is a positive integer, which is the maximum value of the gray level of the pixel in the image to be processed.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the image recovery method described above.
An embodiment of the present invention further provides an image restoration device, including:
the first acquisition module is used for carrying out blocking processing on the image to be processed to acquire a plurality of blocked images;
the output module is used for sequentially processing each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and the second acquisition module is used for acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
The invention has the beneficial effects that:
according to the scheme, a plurality of block images are obtained by blocking an image to be processed, each block image is sequentially processed until the state change quantity of all neurons in a neural network corresponding to the block image is zero or the change quantity of an energy function of the neural network is greater than or equal to zero, the recovery result of a target area in the block image is output, and the final image recovery result of the image to be processed is obtained according to the recovery results of the target area in all the block images; by the method, the operation complexity in the image recovery process is reduced, and the method has strong real-time online processing capability.
Drawings
FIG. 1 is a schematic diagram of an artificial neural network used in an embodiment of the present invention;
FIG. 2 is a flow chart of an image restoration method according to an embodiment of the present invention;
FIG. 3 is a block diagram of an image restoration apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an image restoration apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The invention provides an image recovery method and device aiming at the problem of high implementation complexity of the existing image recovery technology.
The embodiment of the invention provides a novel ANN method for restoring degraded images, which is easy to realize on line in real time aiming at the defects of the existing ZHou-ANN method for restoring images. The following specifically describes the main technical ideas of the embodiments of the present invention.
There is provided an image 0 ≦ f (i, j) ≦ M (where M is a positive integer that is the maximum value of the gray level of a pixel in the image) having M +1 gray levels and a scale lxl (where L is the scale parameter of the image that represents the number of pixels in the length direction or in the width direction), which is arranged in lexicographical order as a column vector of L2 × 1, as shown in equation one:
formula I,
Then, it degrades the imageCan be expressed by the formula two:
the second formula,
Wherein,expressed by the formula three:
the formula III,
Is related to the imageThe independent noise, expressed by equation four, is:
the formula IV,
H is a blur degradation matrix corresponding to a blur degradation function H (k, 1), which can be expressed by the formula five:
the formula five,
If the blur degradation function h (k, 1) of the image is linearly non-shifting, it can be expressed as:
the formula six,Where C is a positive integer.
Further assuming that the image f (i, j) has periodic boundaries, equation five becomes the following block circulant matrix:
the formula is seven,
Wherein HτExpressed by equation eight as:
the formula eight,
Note that τ is 0, ± 1, ± 2, ± C.
For the degradation model mentioned in formula two, the embodiment of the present invention constructs a neural network for degraded image recovery, and the specific structure is shown in fig. 1, which is L of one2A two-dimensional array of x N, where N is S.R, R (where R is a parameter related to system fault tolerance and 1. ltoreq. R.ltoreq.M) and S are positive integers, andwherein the operatorRepresents a minimum integer not less than x; in FIG. 1, the bits of each component i in the image column vectorThere are N neurons, which are divided into S groups of R each.
Note that the kth group of nth neurons at the ith component position of the image vector is neuron (i, k, n), where i is 1, 221, 2, S, n 1, 2, R, and the interconnection between neuron (i, k, n) and neuron (j, l, R) is given by Tikn;jlrAnd assume Tikn;jlr=Tjlr;iktAnd Tikn;iknNot equal to 0; note that the state of neuron (i, k, n) is viknThe value is only 0 or 1 to indicate that the neuron is in an inhibitory state or an excitatory state, and each neuron (I, k, n) has a bias, which is denoted as Iikn(ii) a Then each neuron (i, k, n) in the network will receive an input signal u asynchronously at randomiknNamely:
the formula is nine,
This signal will be fed back to the neuron (i, k, n) and change the state of the neuron in a non-linear manner according to the following equation ten:
the formula is ten,
The energy function E defining the neural network is:
eleven formula,
When the state of the neuron (i, k, n) changes, the energy of the network is caused to change, and the state change of the neuron (i, k, n) is recorded asIt causes the network energy to change by Δ E, then:
the formula twelve,
Due to Tikn;iknNot equal to 0, so the right value of formula eleven is not necessarily non-positive, so the network does not necessarily converge. In order to converge the network, the embodiment of the present invention proposes a method for constraining the state change of the neuron (i, k, n), that is: if Δ viknΔ E < 0, the state of the neuron (i, k, n) is allowed to change; if Δ viknIf Δ E is greater than or equal to 0, the state of the neuron (i, k, n) will not change. This ensures that the neural network dynamics always progresses in the direction of decreasing system energy function until the network converges.
Parameter T of neural networkikn;jlrAnd IiknMay be derived from an image restoration criteria function. In fact, consider the image restoration criteria function as shown in equation thirteen:
thirteen formula,
Note that, λ ≧ 0 is a constant,to be formed by a two-dimensional window operator WpAnd constructing a block circulant matrix. The first term of equation thirteen attempts to give an optimal estimate of the image in the least squares senseAnd the second term is estimatedA smoothness constraint is imposed.Usually H is a blurring degradation matrix with low-pass characteristics, then the two-dimensional window operator used to construct matrix D must have spatial high-pass characteristics. To do this, we select an approximate window operator of the two-dimensional laplacian (Laplace) operator as the formula fourteen:
fourteen formulas,
For theIn terms of each component thereofThe state variable v of the N neurons (i, k, N) arranged at this position i can be usedikn(where N ═ S · R; k ═ 1, 2.., S; N ═ 1, 2.., R) is expressed according to a group weighting scheme, as shown by the formula fifteen:
the formula fifteen,
Substituting equation fifteen into equation thirteen:
the formula is sixteen,
Subtracting the constant term from the formula sixteenAnd comparing with the formula eleven to obtain the neural network parameter Tikn;jlrAnd IiknThe method specifically comprises the following steps:
seventeen formula,
Eighteen formulas,
Notice Tikn;jlrIndependent of the parameters n, r, IiknIndependent of the parameter n, so Then equation nine can be written as:
the formula is nineteen,
Wherein, αijExpressed by the equation twenty:
the formula is twenty,
θiExpressed by the formula twenty-one:
the formula twenty-one,
Accordingly, the state change amount Δ v of the neuron elementiknExpressed by the formula twenty-two:
the formula is twenty-two,
The change amount of the energy function of the neural network caused by the state change amount is expressed by the formula twenty-three:
the formula twenty three,
The update to the image gray level estimate for a pixel can be expressed by the equation twenty-four:
twenty-four of the formulas,
If the access of the neurons in the neural network is sequential, that is, the order of accessing the neurons is:
(1,1,1)→…→(1,1,R)→(1,2,1)→…→(1,2,R)→…→(L2,S,1)→…(L2s, R), then the input signal received by the next neuron is obtained using the formula twenty-five:
formula twenty-five, uik(n+1)=uikn+Δvikn·αii·(R+1)k-1。
Specifically, according to the formulas nineteen to twenty-five, the specific implementation process of the method for restoring the degraded image with the construction scale lxl is as follows:
step 101, taking a degraded imageIs composed ofAn initial value of (1);
step 102, sequentially accessing all pixels in the image, and for the pixel i, repeatedly using the formula nineteen to the formula twenty-five to iterate until the value is delta viknWhen the value is 0 or the delta E is more than or equal to 0, processing the next pixel (i + 1);
here, it is necessary toIt should be noted that each iteration in the process requires checkingWhether or not conditions are satisfiedIf not, abandonAnd proceeds to the next pixel.
103, checking whether the energy function E of the neural network changes or not, and outputting if the energy function E does not changei=1,...,L2Obtaining an image recovery result; otherwise, go to step 102 for the next cycle.
It should be noted that, in order to further improve the real-time online processing capability of the above-mentioned degraded image restoration method and reduce the spatial complexity thereof, an embodiment of the present invention employs an image blocking sequential processing technique, in which an entire image is first blocked, and then a degraded image restoration method is called in each block to perform image restoration processing. Andrewsh and Hunt indicate that when the linear non-shift-varying blur window function described in formula six is subjected to image restoration by using the degradation model described in formula two, the first 2C rows and columns and the 2C rows and columns before the reciprocal in the restored image are incorrect due to the boundary value problem, and only the middle (L-4C) × (L-4C) region is correct. Therefore, the embodiment of the invention provides the following image blocking principle and blocking image sequential recovery processing technology:
image blocking principle: dividing an LXL image into P X P block images BijI, J1.. said, P, each in the J X J dimension, where J >4C is required, C having the same meaning as above. Block B of ith row and jth columnijAnd Bi,j+1And Bi+1,jRespectively J X4C and4C XJ pixels overlap with Bi+1,j+1There is an overlap of 4C X4C pixels, where the relationship of P, J to L, C is expressed by the equation twenty-six:
the formula twenty-six, P · J- (P-1) · 4C ═ L.
The block image sequential recovery processing technology comprises the following steps: since the degradation model of each image is the same and is J2×J2The block circulant matrix of (c). Then in each block BijIn the method, a recovery method of a degraded image is called for a middle (J-4C) x (J-4C) area to carry out image recovery processing until an algorithm is converged, and then the next block image is processed; and when all the block images are processed, obtaining the recovery result of the whole degraded image.
In summary, the specific implementation flow of the method for recovering the degraded image based on the ANN in real time on line provided by the embodiment of the present invention is as follows:
step 201, applying the image blocking principle to block the degraded image to be restored;
step 202, a block sequential processing technology is applied to call a recovery method of a degraded image for all block images to process;
here, it should be noted that, since the block images are sequentially restored at the time of image restoration, that is, the image restoration is performed according to the scale of the block images, for example, after the image block is performed in the above manner, the scale of the block images is J X J, when the block images are restored, the dimension of the above equation nineteen to twenty-five should be J X J, that is, the degraded image of the above equation nineteen to twenty-five having the scale of L X L needs to be replaced with the degraded image of the scale J X J, so that the degraded image is restored.
Step 203, ending the processing process and outputting the recovered result.
The following describes a specific implementation of an embodiment of the present invention.
As shown in fig. 2, an embodiment of the present invention provides an image restoring method, including:
step 21, performing blocking processing on an image to be processed to obtain a plurality of blocked images;
step 22, sequentially processing each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
step 23, obtaining a final image restoration result of the image to be processed according to the restoration results of the target areas in all the block images;
it should be noted that after the recovery result of the target area of each block image is obtained, all the recovery results are spliced according to the position of the to-be-processed image where the block image is located to obtain the final image recovery result.
Optionally, a specific implementation manner of step 21 is:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
In addition, since the block images are sequentially restored at the time of image restoration, that is, the image restoration is performed according to the scale of the block images, for example, if the scale of the block images is jx J after the image block is performed as described above, the degraded images should be restored according to the degraded images having the scale of J X J at the time of restoration of the block images.
Specifically, the sequentially processing each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image includes:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
Further, the sequentially processing all the pixels in each block image until the state change amount of all the neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image includes:
performing iterative processing on each neuron corresponding to a first pixel in the block image to acquire the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
updating the image gray level estimator corresponding to the pixel;
if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero, sequentially performing iterative processing on each neuron corresponding to a second pixel in the block image;
and under the condition that the energy function of the network is not changed, outputting a recovery result of the target area in the block image.
Further, the state change amount of the neuron is acquired in a manner of:
acquiring an input signal received by a neuron;
and determining the state change quantity of the neuron according to the input signal.
It should be noted that, the acquiring the input signal received by the neuron includes:
respectively determining interconnection weights of the neurons and bias of the neurons;
and determining the input signal received by the neuron according to the interconnection weight and the bias.
Specifically, the acquisition mode of the interconnection right of the neuron is as follows:
seventeen is utilized (since the embodiment of the present invention is processing of the block images, and the scale of each block image is jxj, L in seventeen needs to be replaced by J): acquiring interconnection authority of neurons;
wherein, Tikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, …, J2j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is a number of 1, 2,.., S, l 1, 2, S is the total number of neuronal groups; n 1, 2, …, R1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
The bias of the neuron is obtained by the following method:
eighteen is utilized (since the embodiment of the present invention is processing of the block images, and the scale of each block image is jxj, L in eighteen needs to be replaced by J): obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
It should be noted that, the determining the input signal received by the neuron according to the interconnection weight and the bias includes:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray scale of the p-th pixel in the image to be processedA level value; 1, 2, …, J2,j=1,2,…,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S, l is 1, 2, …, S is the total number of neuronal groups; n-1, 2, …, R-1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the determining the state change amount of the neuron according to the input signal comprises:
according to the formula twenty-two:determining a state change amount of a neuron;
wherein, Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the manner of obtaining the change of the energy function of the neural network caused by the state change is as follows:
according to the formula twenty-three:determining an amount of change in an energy function of the neural network caused by the amount of change in state;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the updating the image gray level estimator corresponding to the pixel includes:
acquiring an image gray level estimator corresponding to a pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
judging whether the image gray level estimator meets a preset condition or not;
and if the image gray level estimator meets the preset condition, updating the image gray level estimator corresponding to the pixel.
It should be noted that, the obtaining of the image gray level estimate corresponding to the pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron includes:
according to the formula twenty-four:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer, which is the image in the image to be processedThe maximum value of the gray level of the pixel,is not less than log(R+1)The smallest integer of M.
Specifically, the preset conditions are as follows: the image gray level estimate is greater than or equal to zero and less than or equal to M.
It should be noted that, compared with the conventional image recovery Zhou-ANN technique, the image recovery method provided by the embodiment of the present invention has the following advantages:
A. under the condition of keeping the same image recovery performance, the time-space complexity of the image recovery method is far less than that of a Zhou-ANN algorithm, so that the image recovery method has a smaller running speed block and occupies a smaller storage space than that of the Zhou-ANN algorithm;
B. the image recovery method of the embodiment of the invention overcomes the problem of time waiting caused by acquiring the whole degraded image data, thereby having stronger real-time online processing capability.
As shown in fig. 3, an embodiment of the present invention further provides an image restoration apparatus 30, including:
a first obtaining module 31, configured to perform blocking processing on an image to be processed to obtain a plurality of blocked images;
an output module 32, configured to sequentially process each block image until a state change amount of all neurons in a neural network corresponding to the block image is zero or a change amount of an energy function of the neural network is greater than or equal to zero, and output a recovery result of a target area in the block image;
and a second obtaining module 33, configured to obtain a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
Optionally, the first obtaining module 31 is configured to:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
Further, the output module 32 is configured to:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
Optionally, the output module 32 includes:
the first obtaining submodule is used for carrying out iterative processing on each neuron corresponding to a first pixel in the block image to obtain the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
the updating submodule is used for updating the image gray level estimator corresponding to the pixel;
the processing submodule is used for sequentially carrying out iterative processing on each neuron corresponding to a second pixel in the block image if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero;
and the output sub-module is used for outputting the recovery result of the target area in the block image under the condition that the energy function of the network is not changed.
Further, the acquiring of the state change amount of the neuron by the first acquiring sub-module includes:
a first acquisition unit for acquiring an input signal received by a neuron;
a first determination unit configured to determine a state change amount of a neuron element according to the input signal.
Further, the first obtaining unit includes:
a first determining subunit, configured to determine interconnection weights of the neurons and bias of the neurons, respectively;
and the second determining subunit is used for determining the input signal received by the neuron according to the interconnection weight and the bias.
Specifically, when the first determining subunit obtains the interconnection right of the neuron, it is configured to:
according to the formula:acquiring interconnection authority of neurons;
wherein, Tikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, …, J2,j=1,2,…,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k ═1, 2, …, S, l ═ 1, 2, …, S are the total number of neuronal groupings; n-1, 2, …, R-1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, when the first determining subunit performs obtaining of the bias of the neuron, it is configured to implement:
according to the formula:obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Further, the second determining subunit is configured to:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray level value of the p-th pixel in the image to be processed is obtained; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, R for each groupThe total number of neurons in the neuron, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Further, the first determining unit is configured to:
according to the formula:determining a state change amount of a neuron;
wherein, Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, when the first obtaining sub-module obtains the change of the energy function of the neural network caused by the state change, the first obtaining sub-module is configured to:
according to the formula:determining an amount of change in an energy function of the neural network caused by the amount of change in state;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Further, the update sub-module includes:
the second acquisition unit is used for acquiring the image gray level estimator corresponding to the pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
the judging unit is used for judging whether the image gray level estimator meets a preset condition or not;
and the updating unit is used for updating the image gray level estimator corresponding to the pixel if the image gray level estimator meets the preset condition.
Specifically, the second obtaining unit is configured to:
according to the formula:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the preset conditions are as follows: the image gray level estimator is greater than or equal to zero and less than or equal to M;
wherein, M is a positive integer, which is the maximum value of the gray level of the pixel in the image to be processed.
It should be noted that the embodiment of the apparatus is an apparatus corresponding to the above method embodiments one to one, and all the implementation manners in the above method embodiments are applicable to the embodiment of the apparatus, and the same technical effect can be achieved.
As shown in fig. 4, an embodiment of the present invention further provides an image restoration apparatus, which includes a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor 41; wherein, the processor 41 is configured to read a program in the memory, and execute the following processes:
the method comprises the steps of carrying out blocking processing on an image to be processed to obtain a plurality of blocking images;
processing each block image in sequence until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
It should be noted that in fig. 4, the bus architecture may include any number of interconnected buses and bridges, with one or more processors represented by processor 41 and various circuits of memory represented by memory 42 being linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. For various devices, the processor 41 is responsible for managing the bus architecture and general processing, and the memory 42 may store data used by the processor 41 in performing operations.
Optionally, the processor implements the following steps when executing the computer program for performing block processing on the image to be processed to obtain a plurality of block images:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
Further, the processor executes the sequential processing on each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and the following steps are realized when the computer program outputs the recovery result of the target area in the block image:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
Optionally, the processor executes the processing on all pixels in each block image in sequence until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and when the computer program outputs the recovery result of the target area in the block image, the following steps are implemented:
performing iterative processing on each neuron corresponding to a first pixel in the block image to acquire the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
updating the image gray level estimator corresponding to the pixel;
if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero, sequentially performing iterative processing on each neuron corresponding to a second pixel in the block image;
and under the condition that the energy function of the network is not changed, outputting a recovery result of the target area in the block image.
Further, the processor, when executing the computer program of the manner of acquiring the state change amount of the neuron, realizes the steps of:
acquiring an input signal received by a neuron;
and determining the state change quantity of the neuron according to the input signal.
Optionally, the processor, when executing the computer program for acquiring input signals received by the neuron, implements the following steps:
respectively determining interconnection weights of the neurons and bias of the neurons;
and determining the input signal received by the neuron according to the interconnection weight and the bias.
Specifically, the processor, when executing the computer program of the acquisition mode of the interconnection right of the neuron, implements the following steps:
according to the formula:acquiring interconnection authority of neurons;
wherein, Tikn;jlrFor the ith pixelInterconnection and weighting between the nth neuron in the kth group of neurons and the r-th neuron in the l group of neurons corresponding to the j-th pixel; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S, l is 1, 2, …, S is the total number of neuronal groups; n-1, 2, …, R-1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the processor, when executing the computer program of the manner of obtaining the bias of the neuron, implements the following steps:
according to the formula:obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which represents pixels in the length direction or the width directionThe number of the cells; k is 1, 2, …, S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
In particular, the processor, when executing the computer program for determining an input signal received by a neuron based on the interconnection weights and the bias, implements the steps of:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray level value of the p-th pixel in the image to be processed is obtained; 1, 2, …, J2,j=1,2,…,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S, l is 1, 2, …, S is the total number of neuronal groups; n-1, 2, …, R-1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
In particular, the processor, when executing the computer program for determining an amount of state change of a neuron based on the input signal, implements the steps of:
according to the formula:determining a state change amount of a neuron;
wherein, Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2…, S, S is the total number of neuronal groupings; n is 1, 2, …, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the processor, when executing the computer program of the manner of obtaining the change amount of the energy function of the neural network caused by the state change amount, implements the steps of:
according to the formula:determining an amount of change in an energy function of the neural network caused by the amount of change in state;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k is 1, 2, …, S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Further, the processor, when executing the computer program for updating the image gray level estimator for the pixel, performs the following steps:
acquiring an image gray level estimator corresponding to a pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
judging whether the image gray level estimator meets a preset condition or not;
and if the image gray level estimator meets the preset condition, updating the image gray level estimator corresponding to the pixel.
Specifically, the processor executes the computer program for obtaining the image gray level estimator corresponding to the pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron, and implements the following steps:
according to the formula:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, …, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
Specifically, the preset conditions are as follows: the image gray level estimator is greater than or equal to zero and less than or equal to M;
wherein, M is a positive integer, which is the maximum value of the gray level of the pixel in the image to be processed.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the image recovery method described above.
While the preferred embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.
Claims (30)
1. An image restoration method, comprising:
the method comprises the steps of carrying out blocking processing on an image to be processed to obtain a plurality of blocking images;
processing each block image in sequence until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
2. The image restoration method according to claim 1, wherein the blocking processing of the image to be processed to obtain a plurality of block images comprises:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
3. The image restoration method according to claim 2, wherein the sequentially processing each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the restoration result of the target region in the block image comprises:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
4. The image restoration method according to claim 3, wherein the sequentially processing all pixels in each block image until the state change amount of all neurons in the neural network corresponding to the block image is zero or the change amount of the energy function of the neural network is greater than or equal to zero, and outputting the restoration result of the target area in the block image comprises:
performing iterative processing on each neuron corresponding to a first pixel in the block image to acquire the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
updating the image gray level estimator corresponding to the pixel;
if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero, sequentially performing iterative processing on each neuron corresponding to a second pixel in the block image;
and under the condition that the energy function of the network is not changed, outputting a recovery result of the target area in the block image.
5. The image restoration method according to claim 4, wherein the state change amount of the neuron element is acquired in such a manner that:
acquiring an input signal received by a neuron;
and determining the state change quantity of the neuron according to the input signal.
6. The image restoration method according to claim 5, wherein the obtaining of the input signal received by the neuron comprises:
respectively determining interconnection weights of the neurons and bias of the neurons;
and determining the input signal received by the neuron according to the interconnection weight and the bias.
7. The image restoration method according to claim 6, wherein the interconnection rights of the neurons are obtained by:
according to the formula:spirit of acquisitionInterconnection right through elements;
wherein, Tikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
8. The image restoration method according to claim 6, wherein the bias of the neuron is obtained by:
according to the formula:obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiFor blur-degrading matrices with low-pass characteristicsLine p ith element; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
9. The image restoration method according to claim 6, wherein determining the input signal received by the neuron according to the interconnection weight and the bias comprises:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p-th row of the fuzzy degradation matrix with low-pass characteristic, λ is a constant and 0, d of λpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray level value of the p-th pixel in the image to be processed is obtained; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
10. The image restoration method according to claim 5, wherein determining the amount of state change of the neuron according to the input signal comprises:
according to the formula:determining a state change amount of a neuron;
wherein, Δ viknThe ith group of neurons corresponding to the ith pixelThe amount of state change of n neurons; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
11. The image restoration method according to claim 4, wherein the amount of change in the energy function of the neural network due to the amount of state change is obtained by:
according to the formula:determining an amount of change in an energy function of the neural network caused by the amount of change in state;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p row of the fuzzy degradation matrix with low-pass characteristic, wherein lambda is a constant and is more than or equal to 0, dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic;i=1,2,...,J2j is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
12. The method of claim 4, wherein updating the image gray level estimate for the pixel comprises:
acquiring an image gray level estimator corresponding to a pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
judging whether the image gray level estimator meets a preset condition or not;
and if the image gray level estimator meets the preset condition, updating the image gray level estimator corresponding to the pixel.
13. The method according to claim 12, wherein obtaining the image gray level estimate corresponding to the pixel to be updated according to the change of the energy function of the neural network caused by the change of the state of the neuron comprises:
according to the formula:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
14. The image restoration method according to claim 12, wherein the preset condition is: the image gray level estimator is greater than or equal to zero and less than or equal to M;
wherein, M is a positive integer, which is the maximum value of the gray level of the pixel in the image to be processed.
15. An image restoration apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor; wherein the processor implements the following steps when executing the computer program:
the method comprises the steps of carrying out blocking processing on an image to be processed to obtain a plurality of blocking images;
processing each block image in sequence until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
16. The image restoration apparatus according to claim 15, wherein the processor executes the computer program for performing the block processing on the image to be processed to obtain a plurality of block images, and implements the following steps:
dividing an image to be processed into P multiplied by P block images;
the scale of the image to be processed is L multiplied by L, and L is a scale parameter of the image to be processed and represents the number of pixels in the length direction or the width direction; p is a block number parameter of the block image in the length direction or the width direction; the scale of each block image is J × J, J is a scale parameter of the block image, which indicates the number of pixels in the longitudinal direction or the width direction, J >4C, C is a positive integer, and P · J- (P-1) · 4C ═ L is satisfied.
17. The image restoration apparatus according to claim 16, wherein the processor executes the processing for each block image in turn until a state change amount of all neurons in a neural network corresponding to the block image is zero or a change amount of an energy function of the neural network is greater than or equal to zero, and when the computer program for outputting a restoration result of a target area in the block image implements the following steps:
sequentially processing all pixels in each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
the target area in the block image is an area occupied by pixels in the middle (J-4C) x (J-4C) of the block image.
18. The image restoration apparatus according to claim 17, wherein the processor executes the processing for sequentially processing all pixels in each block image until a change amount of states of all neurons in a neural network corresponding to the block image is zero or a change amount of an energy function of the neural network is greater than or equal to zero, and the computer program for outputting a restoration result of a target area in the block image implements the following steps:
performing iterative processing on each neuron corresponding to a first pixel in the block image to acquire the state change quantity of the neuron and the change quantity of an energy function of the neural network caused by the state change quantity;
updating the image gray level estimator corresponding to the pixel;
if the state change amount of the neuron is zero or the change amount of the energy function of the neural network is greater than or equal to zero, sequentially performing iterative processing on each neuron corresponding to a second pixel in the block image;
and under the condition that the energy function of the network is not changed, outputting a recovery result of the target area in the block image.
19. The image restoration apparatus according to claim 18, wherein the processor implements the following steps when executing the computer program of the manner of acquiring the amount of state change of the neuron element:
acquiring an input signal received by a neuron;
and determining the state change quantity of the neuron according to the input signal.
20. The image restoration device according to claim 19, wherein the processor when executing the computer program for acquiring input signals received by the neuron performs the steps of:
respectively determining interconnection weights of the neurons and bias of the neurons;
and determining the input signal received by the neuron according to the interconnection weight and the bias.
21. The image restoration device according to claim 20, wherein the processor when executing the computer program of the manner of obtaining the interconnection rights of the neurons implements the steps of:
according to the formula:acquiring interconnection authority of neurons;
wherein, Tikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; h ispjThe jth element of the p row of the fuzzy degradation matrix with the low-pass characteristic; lambda is a constant and is more than or equal to 0; dpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; dpjA jth element of a p row of a block circulant matrix with high-pass characteristics; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
22. The image restoration device according to claim 20, wherein the processor when executing the computer program of the manner of obtaining the bias of the neuron realizes the steps of:
according to the formula:obtaining the bias of the neuron;
wherein, IiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel; gpThe image gray level value of the p-th pixel in the image to be processed is obtained; h ispiThe ith element of the p row of the fuzzy degradation matrix with the low-pass characteristic; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
23. The image restoration device according to claim 20, wherein the processor when executing the computer program for determining the input signal received by the neuron according to the interconnection weights and the bias implements the steps of:
according to the formula: determining an input signal received by a neuron;
wherein u isiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; t isikn;jlrThe interconnection weight between the nth neuron in the kth group of neurons corresponding to the ith pixel and the r-th neuron in the l group of neurons corresponding to the jth pixel is obtained; v. ofjlrThe state value of the r-th neuron in the l-th group of neurons corresponding to the j-th pixel; i isiknA bias for an nth neuron in a kth group of neurons corresponding to the ith pixel;estimating the gray level of the image corresponding to the jth pixel;hpifor the ith element of the p row of the blur degradation matrix with low-pass characteristics, hpjIs the jth element of the p-th row of the fuzzy degradation matrix with low-pass characteristic, λ is a constant and 0, d of λpiFor the ith element of the p-th row of the block circulant matrix with high-pass characteristics, dpjA jth element of a p row of a block circulant matrix with high-pass characteristics;gpthe image gray level value of the p-th pixel in the image to be processed is obtained; 1, 2, J2,j=1,2,...,J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; 1, 2, S, l 1, 2, S is the total number of neuron groups; n 1, 2, R1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is a graph to be processedThe maximum value of the grey level of a pixel in a pixel,is not less than log(R+1)The smallest integer of M.
24. The image restoration apparatus according to claim 19, wherein said processor, when executing said computer program for determining an amount of state change of neurons from said input signal, implements the steps of:
according to the formula:determining a state change amount of a neuron;
wherein, Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
25. The image restoration apparatus according to claim 18, wherein said processor when executing the computer program of the manner of obtaining the amount of change of the energy function of the neural network caused by the amount of change of state realizes the steps of:
according to the formula:determining an amount of change in an energy function of the neural network caused by the amount of change in state;
wherein Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron in the kth group of neurons corresponding to the ith pixel; u. ofiknAn input signal received for an nth neuron in a kth group of neurons corresponding to the ith pixel; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel;hpiis the ith element of the p-th row of the fuzzy degradation matrix with low-pass characteristic, λ is a constant and 0, d of λpiThe ith element of the p row of the block circulant matrix with high-pass characteristic; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer which is the maximum value of the gray level of a pixel in the image to be processed,is not less than log(R+1)The smallest integer of M.
26. The image restoration apparatus according to claim 18, wherein the processor when executing the computer program for updating the image gray level estimates for the pixels implements the steps of:
acquiring an image gray level estimator corresponding to a pixel to be updated according to the change of the energy function of the neural network caused by the state change of the neuron;
judging whether the image gray level estimator meets a preset condition or not;
and if the image gray level estimator meets the preset condition, updating the image gray level estimator corresponding to the pixel.
27. The image restoration apparatus according to claim 26, wherein the processor when executing the computer program for obtaining the image gray level estimate corresponding to the pixel to be updated based on the change in the energy function of the neural network caused by the change in the state of the neuron realizes the following steps:
according to the formula:acquiring an image gray level estimator corresponding to a pixel to be updated;
wherein,estimating the image gray level of the updated ith pixel;estimating the image gray level of the ith pixel before updating; Δ viknThe state change amount of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; Δ E is the change of the energy function of the neural network caused by the state change of the nth neuron element in the kth group of neuron elements corresponding to the ith pixel; 1, 2, J2J is a scale parameter of the block image, which indicates the number of pixels in the length direction or the width direction; k 1, 2., S is the total number of neuronal groups; n 1, 2, R is the total number of neurons in each group of neurons, andm is a positive integer, which is in the image to be processedThe maximum value of the pixel grey level,is not less than log(R+1)The smallest integer of M.
28. The image restoration device according to claim 26, wherein the preset condition is: the image gray level estimator is greater than or equal to zero and less than or equal to M;
wherein, M is a positive integer, which is the maximum value of the gray level of the pixel in the image to be processed.
29. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the image restoration method according to any one of claims 1 to 14.
30. An image restoration apparatus, comprising:
the first acquisition module is used for carrying out blocking processing on the image to be processed to acquire a plurality of blocked images;
the output module is used for sequentially processing each block image until the state change quantity of all neurons in the neural network corresponding to the block image is zero or the change quantity of the energy function of the neural network is greater than or equal to zero, and outputting the recovery result of the target area in the block image;
and the second acquisition module is used for acquiring a final image recovery result of the image to be processed according to the recovery results of the target areas in all the block images.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910339117.5A CN110148139A (en) | 2019-04-25 | 2019-04-25 | A kind of image recovery method and device |
PCT/CN2020/084749 WO2020216104A1 (en) | 2019-04-25 | 2020-04-14 | Image recovery method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910339117.5A CN110148139A (en) | 2019-04-25 | 2019-04-25 | A kind of image recovery method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110148139A true CN110148139A (en) | 2019-08-20 |
Family
ID=67594446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910339117.5A Withdrawn CN110148139A (en) | 2019-04-25 | 2019-04-25 | A kind of image recovery method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110148139A (en) |
WO (1) | WO2020216104A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110705426A (en) * | 2019-09-25 | 2020-01-17 | 广东石油化工学院 | Power signal filtering method and system by using deblurring operator |
CN110796584A (en) * | 2019-10-28 | 2020-02-14 | 国网内蒙古东部电力有限公司电力科学研究院 | Motion blurred image modeling method and device, storage medium and inspection robot |
WO2020216104A1 (en) * | 2019-04-25 | 2020-10-29 | 电信科学技术研究院有限公司 | Image recovery method and device |
CN113554574A (en) * | 2021-09-23 | 2021-10-26 | 苏州浪潮智能科技有限公司 | Compressed sensing image recovery method, device, equipment and medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20000038508A (en) * | 1998-12-08 | 2000-07-05 | 서태준 | Method for coding numbers in hop field neural network |
CN101571948A (en) * | 2009-06-11 | 2009-11-04 | 西安电子科技大学 | Method for restoring motion blurred image based on total variational model and neutral network |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8160340B2 (en) * | 2008-09-04 | 2012-04-17 | Siemens Medical Solutions Usa, Inc. | Reconstructing a tomographic image |
CN104156919B (en) * | 2014-08-04 | 2016-09-14 | 陕西科技大学 | A kind of based on wavelet transformation with the method for restoring motion blurred image of Hopfield neutral net |
CN110148139A (en) * | 2019-04-25 | 2019-08-20 | 电信科学技术研究院有限公司 | A kind of image recovery method and device |
-
2019
- 2019-04-25 CN CN201910339117.5A patent/CN110148139A/en not_active Withdrawn
-
2020
- 2020-04-14 WO PCT/CN2020/084749 patent/WO2020216104A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20000038508A (en) * | 1998-12-08 | 2000-07-05 | 서태준 | Method for coding numbers in hop field neural network |
CN101571948A (en) * | 2009-06-11 | 2009-11-04 | 西安电子科技大学 | Method for restoring motion blurred image based on total variational model and neutral network |
Non-Patent Citations (1)
Title |
---|
梁民 等: "一种用神经网络来进行图像恢复的方法", 《系统工程与电子技术》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020216104A1 (en) * | 2019-04-25 | 2020-10-29 | 电信科学技术研究院有限公司 | Image recovery method and device |
CN110705426A (en) * | 2019-09-25 | 2020-01-17 | 广东石油化工学院 | Power signal filtering method and system by using deblurring operator |
CN110705426B (en) * | 2019-09-25 | 2021-09-21 | 广东石油化工学院 | Power signal filtering method and system by using deblurring operator |
CN110796584A (en) * | 2019-10-28 | 2020-02-14 | 国网内蒙古东部电力有限公司电力科学研究院 | Motion blurred image modeling method and device, storage medium and inspection robot |
CN113554574A (en) * | 2021-09-23 | 2021-10-26 | 苏州浪潮智能科技有限公司 | Compressed sensing image recovery method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
WO2020216104A1 (en) | 2020-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110148139A (en) | A kind of image recovery method and device | |
US5649065A (en) | Optimal filtering by neural networks with range extenders and/or reducers | |
US5408424A (en) | Optimal filtering by recurrent neural networks | |
CN110909926A (en) | TCN-LSTM-based solar photovoltaic power generation prediction method | |
CN116113941A (en) | Neural network accelerator, acceleration method and device | |
CN115511177A (en) | Ultra-short-term wind speed prediction method based on INGO-SWGMN hybrid model | |
CN113176532B (en) | DNN robustness DOA estimation method, device and storage medium based on array error and array element failure of beam space | |
CN110263832B (en) | AUV navigation system fault diagnosis method based on multi-scale analysis | |
Sivakumar et al. | Image restoration using a multilayer perceptron with a multilevel sigmoidal function | |
CN116432543B (en) | Method for predicting remaining life of power semiconductor module, terminal device and storage medium | |
Figueiredo et al. | Sequential and parallel image restoration: neural network implementations | |
Franz et al. | Implicit Wiener series for higher-order image analysis | |
US5627944A (en) | Parallel data processing system | |
WO2021134519A1 (en) | Device and method for realizing data synchronization in neural network inference | |
Ayna et al. | Learning optimum binary color filter arrays for demosaicing with neural networks | |
CN114820326B (en) | Efficient single-frame image super-division method based on adjustable kernel sparsification | |
CN114004421B (en) | Traffic data missing value interpolation method based on space-time integrated learning | |
CN118429189B (en) | Space weather numerical simulation method and device | |
CN117058000B (en) | Neural network architecture searching method and device for image super-resolution | |
Torkamani et al. | Differential equation units: learning functional forms of activation functions from data | |
CN118537241A (en) | Image shadow removing method based on homogenization converter model | |
CN117908164A (en) | Precipitation prediction method based on deep double-branch structure | |
Etienne-Cummings et al. | A general purpose image processing chip: Orientation detection | |
Weruaga et al. | Active training on the cmac nonlinear adaptive system | |
Xia et al. | Design of Intelligent Spectral Selection and Multispectral Imaging Fusion Algorithm Based on Deep Neural Network Model |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190820 |