CN112115411A - Position drift compensation method, terminal device and readable storage medium - Google Patents

Position drift compensation method, terminal device and readable storage medium Download PDF

Info

Publication number
CN112115411A
CN112115411A CN202010849557.8A CN202010849557A CN112115411A CN 112115411 A CN112115411 A CN 112115411A CN 202010849557 A CN202010849557 A CN 202010849557A CN 112115411 A CN112115411 A CN 112115411A
Authority
CN
China
Prior art keywords
image
frame
compensation
images
convolution kernel
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.)
Granted
Application number
CN202010849557.8A
Other languages
Chinese (zh)
Other versions
CN112115411B (en
Inventor
刘岩
李灏
张立飞
王维
任宇龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 13 Research Institute
Original Assignee
CETC 13 Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CETC 13 Research Institute filed Critical CETC 13 Research Institute
Priority to CN202010849557.8A priority Critical patent/CN112115411B/en
Publication of CN112115411A publication Critical patent/CN112115411A/en
Application granted granted Critical
Publication of CN112115411B publication Critical patent/CN112115411B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • G01N2021/0106General arrangement of respective parts
    • G01N2021/0112Apparatus in one mechanical, optical or electronic block

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Analytical Chemistry (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Pathology (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Immunology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biochemistry (AREA)
  • Computational Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Algebra (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a position drift compensation method, a terminal device and a readable storage medium, wherein the method comprises the following steps: s101: collecting a first frame image P of a piece to be detected1(ii) a Setting the number of acquisition frames of an image to be detected as N, the current acquisition frame as k, the acquisition image as P and the cumulative convolution kernel as H, and making k equal to 2 and P equal to P1H ═ 0; s102: collecting the k frame image P of the piece to be measuredkAnd calculating a convolution kernel h corresponding to the translation transformation from the first frame image to the k frame imagek(ii) a S103: let k be k +1 and P be P + Pk、H=H+hkIf k ≦ N, return to execute step S102; if k is>And N, performing deconvolution on the acquired image P based on the accumulated convolution kernel H to obtain a compensation image of the to-be-measured object. The position drift compensation method, the terminal equipment and the readable storage medium provided by the invention can reduceThe real-time computation amount is reduced, and the computation cost is reduced.

Description

Position drift compensation method, terminal device and readable storage medium
Technical Field
The invention belongs to the technical field of microscopic imaging, and particularly relates to a position drift compensation method, terminal equipment and a readable storage medium.
Background
In order to realize high-spatial-resolution microthermal imaging, a microlight reflection thermal imaging device is generally constructed based on a high-performance optical microscope, probe light is provided by an illumination system of the optical microscope, microimaging is recorded by using a high-performance camera, and output camera reading is taken as a measured value. In the measurement process, because the measured value is usually low, in order to ensure the measurement accuracy, the measurement is usually required to be performed for multiple times and a multi-frame image is collected for averaging when the measured value is obtained. However, in the process of multiple measurements, it cannot be guaranteed that all images are accurately aligned, and there is a position drift, which may cause the averaged images to be blurred, thereby affecting the measurement accuracy.
In the prior art, a method for solving the position drift is to estimate the translation amount by using an algorithm while collecting multi-frame images, and compensate the position drift in real time by using image processing modes such as interpolation and the like, and the method has large calculation amount and higher calculation cost.
Disclosure of Invention
The invention aims to provide a position drift compensation method, a terminal device and a readable storage medium, so as to solve the problems of large calculation amount and high calculation cost when position drift compensation is carried out in the prior art.
In a first aspect of the embodiments of the present invention, a method for compensating for a position drift is provided, including:
s101: collecting a first frame image P of a piece to be detected1(ii) a Setting the number of acquisition frames of an image to be detected as N, the current acquisition frame as k, the acquisition image as P and the cumulative convolution kernel as H, and making k equal to 2 and P equal to P1、H=0;
S102: collecting the k frame image P of the piece to be measuredkAnd calculating a convolution kernel h corresponding to the translation transformation from the first frame image to the k frame imagek
S103: let k be k +1 and P be P + Pk、H=H+hkIf k ≦ N, return to execute step S102; if k is>N, thenAnd carrying out deconvolution on the collected image P based on the accumulated convolution kernel H to obtain a compensation image of the to-be-measured piece.
In a second aspect of the embodiments of the present invention, another position drift compensation method is provided, including:
s201: setting the current acquisition frequency as n, the total acquisition frequency as Nmax, and the accumulated compensation image as P1, wherein n is 0, and P1 is 0;
s202: collecting the n x d +1 frame to the n x d + d frame images of the piece to be detected, and calculating the basic compensation image P of the d frame images according to the method of the step San
S203: let n be n +1, P1 be P1+ PnIf n ≦ Nmax, return to execute step S202; if n is>Nmax, then determining a compensation image of the piece to be measured based on the accumulated compensation image P1;
wherein, step Sa includes:
for a certain d frame image, selecting a first frame image in the d frame image as a reference image; calculating convolution kernels of the reference image translated to other frames of images, and performing deconvolution on the d frame of image based on the convolution kernels of the reference image translated to other frames of images to obtain a basic compensation image of the d frame of image; and the other frame images are other images except the reference image in the d frame image.
In a third aspect of the embodiments of the present invention, there is provided another position drift compensation method, including:
s301: setting the current acquisition frequency as n and the total acquisition frequency as Nmax, and enabling n to be 0;
s302: collecting the n x d +1 frame to the n x d + d frame images of the piece to be detected, and calculating a basic compensation image P of the d frame images according to the method of the step ScnAnd compensating the base image P of the d frame imagenAdding to a preset compensation image set;
s303: if n ≦ Nmax, return to step S302; if n is greater than Nmax, determining a compensation image of the piece to be detected based on the compensation image set;
wherein the step Sc comprises:
for a certain d frame image, selecting a first frame image in the d frame image as a first reference image; calculating convolution kernels of the first reference image translated to other frames of images, and performing deconvolution on the d frame of image based on the convolution kernels of the first reference image translated to other frames of images to obtain a basic compensation image of the d frame of image; and the other frame images are other images except the first reference image in the d frame image.
In a fourth aspect of the embodiments of the present invention, there is provided a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above-mentioned position drift compensation method when executing the computer program.
In a fifth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the position drift compensation method described above.
The position drift compensation method, the terminal device and the readable storage medium provided by the embodiment of the invention have the beneficial effects that: compared with the prior art, the position drift compensation method provided by the invention does not need to compensate the image of the to-be-measured piece in real time, and can obtain the compensation image of the to-be-measured piece only by deconvolving the image of the to-be-measured piece by using the obtained convolution kernel after obtaining a fixed number of convolution kernels, namely, the position drift compensation method provided by the invention effectively reduces the real-time operation amount, thereby reducing the operation cost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a position drift compensation method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a position drift compensation method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a position drift compensation method according to yet another embodiment of the present invention;
fig. 4 is a schematic block diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a position drift compensation method according to an embodiment of the present invention, the method including:
s101: collecting a first frame image P of a piece to be detected1Setting the number of acquisition frames of an image to be detected as N, the current acquisition frame as k, the acquisition image as P and the cumulative convolution kernel as H, and making k equal to 2 and P equal to P1、H=0。
S102: collecting the k frame image P of the piece to be measuredkAnd calculating a convolution kernel h corresponding to the translation transformation from the first frame image to the k frame imagek
S103: let k be k +1 and P be P + Pk、H=H+hkIf k ≦ N, the process returns to step S102. If k is>And N, performing deconvolution on the acquired image P based on the accumulated convolution kernel H to obtain a compensation image of the to-be-measured object.
In this embodiment, N is an integer greater than zero, and the value thereof may be set according to actual requirements, which is not limited herein.
In this embodiment, the first frame image of the to-be-detected object is used as the reference image, the real-time calculation portion only needs to calculate the convolution kernel for translating and converting the first frame image to other frame images, the convolution kernel is continuously accumulated, and finally the image of the to-be-detected object is deconvolved according to the convolution kernel obtained by accumulation to obtain the compensation image. That is to say, the position drift compensation method provided by the embodiment of the invention does not need to compensate the image of the to-be-measured object in real time.
In this embodiment, the principle of the embodiment of the present invention is explained from the following:
setting the collected N frames of images and the k frame as PkThe average image of all frame images is
Figure BDA0002644272130000043
Namely, it is
Figure BDA0002644272130000041
With the first frame image as the reference image, in the case of the translational transformation, all the frame images can be expressed as follows
Pk=(s+nk)*hk
Where s is a hypothetical, non-shifted, ideal "in-situ" image, and nkIs noise, hkIs a convolution kernel of the translation transform.
Wherein the content of the first and second substances,
Figure BDA0002644272130000042
can be converted into:
Figure BDA0002644272130000051
according to the formula, the following formula can be obtained:
Figure BDA0002644272130000052
Figure BDA0002644272130000053
wherein the content of the first and second substances,
Figure BDA0002644272130000054
noise, h, corresponding to all frame image translation transformationskThe amount of translation of each frame of image relative to the reference image, i.e. the convolution kernel for translating the reference image into each frame of image, is corresponding to the amount of translation of each frame of image relative to the reference image, so that the embodiment of the present invention can obtain h by estimating the amount of translation of each frame of image relative to the reference image in real timekThen accumulating the last divided frame number frame by frame to obtain the average convolution kernel g, finally utilizing the average convolution kernel g to average image
Figure BDA0002644272130000055
Deconvolution to obtain the desired ideal image (i.e., the compensated image) s.
The convolution kernel h and the average convolution kernel g can also be processed in the frequency domain: setting G, H as the Fourier transforms of g, h, respectively, still satisfies since the accumulation is a linear operation
Figure BDA0002644272130000056
That is, G can still be obtained by accumulating the last divided frame number frame by frame. The translation amount estimation can adopt a correlation phase method, H can be conveniently obtained at the moment, deconvolution methods such as wiener filtering and the like also need to be processed in a frequency domain, and the accumulation amount (including images and estimated convolution kernels) adopting a frequency domain form is simpler and more convenient at the moment.
In this embodiment, if the position drift compensation is performed in the frequency domain, the method may be:
setting the k frame image to be PkFourier transform thereof into PfkThe convolution kernel is denoted as hkThe convolution kernel accumulated value is denoted as H, and the image accumulated value is denoted as P.
First, when k is 1, the image P is acquired1Fourier transform of Pf1,hkAnd H are all 0, P ═ Pf1
For each subsequent frame, P is calculatedkFourier transform P offkAnd estimate hkHere, the convolution kernel h for translating the first frame image to the k frame image can be calculated by adopting a correlation phase methodkOther methods may be used to perform the sub-pixel translationIs not limited herein.
Translation amount estimation/convolution kernel calculation:
Figure BDA0002644272130000061
updating the accumulated value:
H=H+hk
P=P+Pfk
after all the frames are collected and P and H are calculated, deconvolution processing is carried out on a frequency domain to obtain S:
Figure BDA0002644272130000062
and performing inverse Fourier transform on the S to obtain S, namely the compensation image.
In this embodiment, if the position drift compensation is performed in the spatial domain, the method may be:
setting the k frame image to be PkThe convolution kernel is denoted as hkThe convolution kernel accumulated value is denoted as H, and the image accumulated value is denoted as P. The spatial domain processing needs to determine the size of the convolution kernel, the maximum value of the position drift can be estimated, the maximum value is taken as the size of the convolution kernel, and the convolution kernel in the embodiment should contain a possible drift range.
First, when k is 1, the image P is acquired1,hkAnd H are all 0, P ═ P1
For each subsequent frame, with P1Estimating the sub-pixel translation amount for the reference image, wherein the estimation can be realized by using the existing methods based on interpolation calculation and the like, and the details are not repeated herein;
is calculated to obtain hkPost-update accumulated value:
H=H+hk
P=P+Pk
after all N frames are collected and P and H are calculated, calculating an average convolution kernel g and an average image
Figure BDA0002644272130000063
Figure BDA0002644272130000064
Figure BDA0002644272130000065
For g and
Figure BDA0002644272130000066
and performing deconvolution to obtain s, namely the compensation image.
Compared with the prior art, the position drift compensation method provided by the invention does not need to compensate the image of the to-be-measured object in real time, and can obtain the compensation image of the to-be-measured object only by deconvolving the image of the to-be-measured object by using the obtained convolution kernel after a fixed number of convolution kernels are obtained, namely, the position drift compensation method provided by the invention effectively reduces the real-time operation amount, thereby reducing the operation cost.
Optionally, as a specific implementation manner of the position drift compensation method provided in the embodiment of the present invention, calculating a convolution kernel corresponding to the first frame image translation transformation to the k frame image includes:
and taking the first frame image as a reference, performing sub-pixel translation amount estimation on the k frame image, and determining a convolution kernel corresponding to the translation transformation of the first frame image to the k frame image according to the translation amount obtained by estimation.
In this embodiment, the estimation of the sub-pixel translation amount may be implemented by using a correlation phase method, an interpolation method, and the like, and the estimated translation amount is used as a convolution kernel for translating the first frame image to the k frame image.
Optionally, as a specific implementation manner of the position drift compensation method provided in the embodiment of the present invention, the deconvoluting the collected image P based on the cumulative convolution kernel H to obtain a compensated image of the to-be-measured object includes:
and averaging the collected images to obtain an average image.
And averaging the accumulated convolution kernels to obtain an average convolution kernel.
And carrying out deconvolution on the average image based on the average convolution kernel to obtain a compensation image of the to-be-measured piece.
In this embodiment, the average image can be obtained by dividing the total frame number of the acquired image by the total frame number of the image, and the average convolution kernel can be obtained by dividing the total frame number of the image by the accumulated convolution kernel.
Referring to fig. 2, fig. 2 is a schematic flow chart of a position drift compensation method according to another embodiment of the present application. The method comprises the following steps:
s201: the current acquisition number is set to be n, the total acquisition number is set to be Nmax, the accumulated compensation image is set to be P1, and n is set to be 0 and P1 is set to be 0.
S202: collecting the n x d +1 frame to the n x d + d frame images of the piece to be detected, and calculating the basic compensation image P of the d frame images according to the method of the step San
S203: let n be n +1, P1 be P1+ PnIf n ≦ Nmax, the method returns to step S202, if n ≦ Nmax>Nmax, a compensation image of the piece to be measured is determined based on the accumulated compensation image P1.
Wherein, step Sa includes:
and for a certain d frame image, selecting the first frame image in the d frame image as a reference image. And calculating convolution kernels of the reference image translation transformation to other frame images, and performing deconvolution on the d frame image based on the convolution kernels of the reference image translation transformation to other frame images to obtain a basic compensation image of the d frame image. Wherein, each other frame image is other images except the reference image in the d frame image.
In this embodiment, d frame images may be acquired each time, the d frame images are used as a compensation period, the compensation images of the d frame images are calculated according to the methods of steps S101 to S103, and finally, the obtained compensation images are averaged to obtain a final compensation image of the to-be-measured object. Compared with the prior art, the method also reduces the real-time computation amount and the computation cost.
Optionally, as a specific implementation manner of the position drift compensation method provided by the embodiment of the present invention, the determining a compensation image of the to-be-measured object based on the accumulated compensation image P1 includes:
and averaging the accumulated compensation image, and taking the averaged image as a compensation image of the to-be-measured object.
In this embodiment, the accumulated compensation image is divided by the total acquisition times to obtain an average image of the accumulated compensation image, that is, a compensation image.
Optionally, as a specific implementation manner of the position drift compensation method provided in the embodiment of the present invention, deconvolving the d-frame image based on a convolution kernel that is translationally transformed into other frame images of the reference image to obtain a basic compensation image of the d-frame image, including:
and averaging the d frames of images to obtain d frames of averaged images.
And carrying out averaging processing on the convolution kernels of the reference image translation and other frame images to obtain d frame average convolution kernels.
And carrying out deconvolution on the d frame average image based on the d frame average convolution kernel to obtain a basic compensation image of the d frame image.
In this embodiment, the process is the same as the implementation method of "deconvolving the collected image P based on the cumulative convolution kernel H" in step S103, and is not described herein again.
Referring to fig. 3, fig. 3 is a schematic flow chart of a position drift compensation method according to another embodiment of the present application. The method comprises the following steps:
s301: setting the current acquisition frequency as n, the total acquisition frequency as Nmax, and making n equal to 0.
S302: collecting the n x d +1 frame to the n x d + d frame images of the piece to be detected, and calculating a basic compensation image P of the d frame images according to the method of the step ScnAnd compensating the base image P of the d frame imagenTo a preset set of compensated images.
S303: let n be n +1, and if n ≦ Nmax, return to step S302. And if n is greater than Nmax, determining a compensation image of the piece to be detected based on the compensation image set.
Wherein the step Sc comprises:
and for a certain d frame image, selecting a first frame image in the d frame image as a first reference image. And calculating convolution kernels of the first reference image translation transformation to other frame images, and performing deconvolution on the d frame image based on the convolution kernels of the first reference image translation transformation to other frame images to obtain a basic compensation image of the d frame image. And the other frame images are other images except the first reference image in the d frame image.
In this embodiment, each time d frame image is acquired, the d frame image is used as a compensation period, the compensation image of the d frame image is calculated according to the method in steps S101 to S103, a plurality of compensation images can be acquired through multiple times of acquisition, and finally the plurality of compensation images are subjected to secondary processing according to the method in steps S101 to S103, so as to obtain the compensation image of the object to be measured. The method can reduce the real-time computation amount, reduce the computation cost and has higher fault tolerance.
Optionally, as a specific implementation manner of the position drift compensation method provided in the embodiment of the present invention, determining the compensation image of the to-be-measured object based on the compensation image set includes:
and selecting the first frame image in the compensation image set as a second reference image.
A convolution kernel is computed for the translational transformation of the second reference image to the other compensated image.
And performing deconvolution on the compensation data set based on the convolution kernel translated to other compensation images of the second reference image to obtain a compensation image of the to-be-measured object.
Wherein the other compensation images are other images in the compensation image set except the second reference image.
In this embodiment, the process is the same as steps S101-S103, and is not described herein again.
Referring to fig. 4, fig. 4 is a schematic block diagram of a terminal device according to an embodiment of the present invention. The terminal 400 in the present embodiment shown in fig. 4 may include: one or more processors 401, one or more input devices 402, one or more output devices 403, and one or more memories 404. The processor 401, the input device 402, the output device 403 and the memory 404 are all in communication with each other via a communication bus 405. The memory 404 is used to store a computer program comprising program instructions. Processor 401 is operative to execute program instructions stored in memory 404. Wherein the processor 401 is configured to call program instructions to perform the steps in the above-described method embodiments.
It should be understood that, in the embodiments of the present invention, the Processor 401 may be a Central Processing Unit (CPU), and the Processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 402 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 403 may include a display (LCD, etc.), a speaker, etc.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
In a specific implementation, the processor 401, the input device 402, and the output device 403 described in this embodiment of the present invention may execute the implementation manners described in the first embodiment and the second embodiment of the position drift compensation method provided in this embodiment of the present invention, and may also execute the implementation manner of the terminal described in this embodiment of the present invention, which is not described herein again.
In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, where the computer program includes program instructions, and the program instructions, when executed by a processor, implement all or part of the processes in the method of the above embodiments, and may also be implemented by a computer program instructing associated hardware, and the computer program may be stored in a computer-readable storage medium, and the computer program, when executed by a processor, may implement the steps of the above methods embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may include any suitable increase or decrease as required by legislation and patent practice in the jurisdiction, for example, in some jurisdictions, computer readable media may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The computer readable storage medium may be an internal storage unit of the terminal of any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk provided on the terminal, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing a computer program and other programs and data required by the terminal. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces or units, and may also be an electrical, mechanical or other form of connection.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of position drift compensation, comprising:
s101: collecting a first frame image P of a piece to be detected1(ii) a Setting the number of acquisition frames of an image to be detected as N, the current acquisition frame as k, the acquisition image as P and the cumulative convolution kernel as H, and making k equal to 2 and P equal to P1、H=0;
S102: collecting the k frame image P of the piece to be measuredkAnd calculating a convolution kernel h corresponding to the translation transformation from the first frame image to the k frame imagek
S103: let k be k +1 and P be P + Pk、H=H+hkIf k ≦ N, return to execute step S102; if k is>And N, performing deconvolution on the acquired image P based on the accumulated convolution kernel H to obtain a compensation image of the to-be-measured object.
2. The method of claim 1, wherein said computing a convolution kernel for a translational transformation of the first frame image to the k frame image comprises:
and taking the first frame image as a reference, performing sub-pixel translation amount estimation on the k frame image, and determining a convolution kernel corresponding to the translation transformation of the first frame image to the k frame image according to the translation amount obtained by estimation.
3. The method according to claim 1, wherein the deconvolving the collected image P based on the cumulative convolution kernel H to obtain the compensated image of the dut comprises:
carrying out averaging processing on the acquired images to obtain an average image;
carrying out averaging processing on the accumulated convolution kernel to obtain an average convolution kernel;
and carrying out deconvolution on the average image based on the average convolution core to obtain a compensation image of the to-be-measured piece.
4. A method of position drift compensation, comprising:
s201: setting the current acquisition frequency as n, the total acquisition frequency as Nmax, and the accumulated compensation image as P1, wherein n is 0, and P1 is 0;
s202: collecting the n x d +1 frame to the n x d + d frame images of the piece to be detected, and calculating the basic compensation image P of the d frame images according to the method of the step San
S203: let n be n +1, P1 be P1+ PnIf n ≦ Nmax, return to execute step S202; if n is>Nmax, then determining a compensation image of the piece to be measured based on the accumulated compensation image P1;
wherein, step Sa includes:
for a certain d frame image, selecting a first frame image in the d frame image as a reference image; calculating convolution kernels of the reference image translated to other frames of images, and performing deconvolution on the d frame of image based on the convolution kernels of the reference image translated to other frames of images to obtain a basic compensation image of the d frame of image; and the other frame images are other images except the reference image in the d frame image.
5. The method of compensating for positional drift according to claim 4, wherein said determining a compensated image of the object based on the accumulated compensated image P1 comprises:
and carrying out averaging processing on the accumulated compensation image, and taking the averaged image as a compensation image of the to-be-measured object.
6. The method of claim 4, wherein the deconvolving the d-frame image based on the convolution kernel translated to the other frames of images to obtain a base compensated image for the d-frame image, comprises:
carrying out averaging processing on the d frame image to obtain a d frame average image;
carrying out averaging processing on convolution kernels of the reference image translated to other frames of images to obtain d frame average convolution kernels;
and carrying out deconvolution on the d frame average image based on the d frame average convolution kernel to obtain a basic compensation image of the d frame image.
7. A method of position drift compensation, comprising:
s301: setting the current acquisition frequency as n and the total acquisition frequency as Nmax, and enabling n to be 0;
s302: collecting the n x d +1 frame to the n x d + d frame images of the piece to be detected, and calculating a basic compensation image P of the d frame images according to the method of the step ScnAnd compensating the base image P of the d frame imagenAdding to a preset compensation image set;
s303: if n ≦ Nmax, return to step S302; if n is greater than Nmax, determining a compensation image of the piece to be detected based on the compensation image set;
wherein the step Sc comprises:
for a certain d frame image, selecting a first frame image in the d frame image as a first reference image; calculating convolution kernels of the first reference image translated to other frames of images, and performing deconvolution on the d frame of image based on the convolution kernels of the first reference image translated to other frames of images to obtain a basic compensation image of the d frame of image; and the other frame images are other images except the first reference image in the d frame image.
8. The method of claim 7, wherein determining a compensated image of the object based on the set of compensated images comprises:
selecting a first frame image in the compensation image set as a second reference image;
calculating a convolution kernel for translating and transforming the second reference image to other compensation images;
performing deconvolution on the compensation data set based on the convolution kernel translated to other compensation images by the second reference image to obtain a compensation image of the to-be-measured object;
wherein the other compensation image is the other image except the second reference image in the compensation image set.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN202010849557.8A 2020-08-21 2020-08-21 Position drift compensation method, terminal device and readable storage medium Active CN112115411B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010849557.8A CN112115411B (en) 2020-08-21 2020-08-21 Position drift compensation method, terminal device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010849557.8A CN112115411B (en) 2020-08-21 2020-08-21 Position drift compensation method, terminal device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112115411A true CN112115411A (en) 2020-12-22
CN112115411B CN112115411B (en) 2024-04-16

Family

ID=73805372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010849557.8A Active CN112115411B (en) 2020-08-21 2020-08-21 Position drift compensation method, terminal device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112115411B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8958654B1 (en) * 2001-04-25 2015-02-17 Lockheed Martin Corporation Method and apparatus for enhancing three-dimensional imagery data
US20150206309A1 (en) * 2014-01-21 2015-07-23 University Of Rochester System and method for real-time image registration
KR20150121872A (en) * 2014-04-22 2015-10-30 서강대학교산학협력단 Apparatus and method for obtaining photoacoustic image using motion compensatiion
CN107301369A (en) * 2017-09-04 2017-10-27 南京航空航天大学 Road traffic congestion analysis method based on Aerial Images
WO2019237992A1 (en) * 2018-06-15 2019-12-19 Oppo广东移动通信有限公司 Photographing method and device, terminal and computer readable storage medium
CN110913219A (en) * 2019-11-29 2020-03-24 合肥图鸭信息科技有限公司 Video frame prediction method and device and terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8958654B1 (en) * 2001-04-25 2015-02-17 Lockheed Martin Corporation Method and apparatus for enhancing three-dimensional imagery data
US20150206309A1 (en) * 2014-01-21 2015-07-23 University Of Rochester System and method for real-time image registration
KR20150121872A (en) * 2014-04-22 2015-10-30 서강대학교산학협력단 Apparatus and method for obtaining photoacoustic image using motion compensatiion
CN107301369A (en) * 2017-09-04 2017-10-27 南京航空航天大学 Road traffic congestion analysis method based on Aerial Images
WO2019237992A1 (en) * 2018-06-15 2019-12-19 Oppo广东移动通信有限公司 Photographing method and device, terminal and computer readable storage medium
CN110913219A (en) * 2019-11-29 2020-03-24 合肥图鸭信息科技有限公司 Video frame prediction method and device and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王春梅;孙洁林;龙飞;赵俊;胡钧;: "图像配准和时间平均在DNA单分子AFM探测中的应用", 科学通报, no. 06 *

Also Published As

Publication number Publication date
CN112115411B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
Uss et al. Image informative maps for component-wise estimating parameters of signal-dependent noise
CN110533607B (en) Image processing method and device based on deep learning and electronic equipment
CN107403421B (en) Image defogging method, storage medium and terminal equipment
Amiaz et al. Coarse to over-fine optical flow estimation
Hong et al. Fast restoration approach for rotational motion blurred image based on deconvolution along the blurring paths
Ambalathankandy et al. An FPGA implementation of a tone mapping algorithm with a halo-reducing filter
CN112017130B (en) Image restoration method based on self-adaptive anisotropic total variation regularization
Artmann Image quality assessment using the dead leaves target: experience with the latest approach and further investigations
CN113610752A (en) Mammary gland image registration method, computer device and storage medium
CN114241023A (en) Sub-pixel image registration method and device and terminal equipment
Zhang et al. Robust double-weighted guided image filtering
CN114972106A (en) Image processing method and device for endoscope, image processing device and endoscope
Reeves Image restoration: fundamentals of image restoration
CN107085843B (en) System and method for estimating modulation transfer function in optical system
CN112115411B (en) Position drift compensation method, terminal device and readable storage medium
CN111047587B (en) Noise estimation method for image, computer device, and storage medium
Qiu A nonparametric procedure for blind image deblurring
CN110298870A (en) Processing method, processing unit and the terminal of image
CN112434572B (en) Fingerprint image calibration method and device, electronic equipment and storage medium
Kamenický et al. Image restoration in portable devices: Algorithms and optimization
KR101720881B1 (en) Image denoising method based on non-local means algorithm using principal components analysis and image processing apparatus using the same
JP6661491B2 (en) Image processing apparatus and image processing method
CN111340724B (en) Image jitter removing method and device in LED screen correction process
CN113554555B (en) Phase distortion compensation method, apparatus, computer device and storage medium
Kishan et al. Patch-based and multiresolution optimum bilateral filters for denoising images corrupted by Gaussian noise

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
GR01 Patent grant
GR01 Patent grant