CN118351036B - Image correction method, system and device based on container imaging distortion - Google Patents
Image correction method, system and device based on container imaging distortion Download PDFInfo
- Publication number
- CN118351036B CN118351036B CN202410777431.2A CN202410777431A CN118351036B CN 118351036 B CN118351036 B CN 118351036B CN 202410777431 A CN202410777431 A CN 202410777431A CN 118351036 B CN118351036 B CN 118351036B
- Authority
- CN
- China
- Prior art keywords
- image
- calibration plate
- distortion
- parameters
- representing
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000003702 image correction Methods 0.000 title claims abstract description 27
- 238000003384 imaging method Methods 0.000 title claims abstract description 21
- 238000004364 calculation method Methods 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 8
- 230000006870 function Effects 0.000 claims description 35
- 238000004590 computer program Methods 0.000 claims description 13
- 238000004458 analytical method Methods 0.000 claims description 10
- 230000001902 propagating effect Effects 0.000 claims description 6
- 238000003860 storage Methods 0.000 claims description 5
- 230000003287 optical effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 12
- 241000196324 Embryophyta Species 0.000 description 5
- 239000011521 glass Substances 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 239000007788 liquid Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000011065 in-situ storage Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012634 optical imaging Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 229920003169 water-soluble polymer Polymers 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an image correction method, system and device based on container imaging distortion, wherein the method comprises the following steps: acquiring calibration plate parameters, acquiring a first calibration plate image set of a calibration plate placed in a specific container based on an image acquisition device, and removing a second calibration plate image set of the calibration plate after the specific container is removed; obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters; the positions of the image acquisition device and the specific container are kept unchanged, and an image to be corrected of an object to be corrected in the specific container is acquired based on the image acquisition device; and performing de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image. The method of the invention avoids image de-distortion by a great amount of deduction calculation and optical theory knowledge in the light propagation process of the multimedia, reduces the processing difficulty of distorted images and is convenient to use.
Description
Technical Field
The invention relates to the technical field of optical imaging, in particular to a method, a system and a device for correcting imaging distortion of an in-situ root system container.
Background
When light passes through multiple media in the propagation process before the object reaches the lens and the imaging plane of the image acquisition device, the refraction index of each medium is different, so that the light enters into the other medium from one medium to be refracted to different degrees, the imaging position is shifted, further, the image distortion is caused, and the related research is greatly influenced, so that the correction method based on the distorted image is particularly important.
At present, the refractive ray expressions in each medium are sequentially deduced by utilizing a ray tracing technology, calibration parameters and reprojection errors are obtained through iterative optimization, and further, the distorted image is corrected.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides an image correction method, an image correction system and an image correction device based on container imaging distortion.
In order to solve the technical problems, the invention is solved by the following technical scheme:
An image correction method based on container imaging distortion, comprising the steps of:
Acquiring calibration plate parameters, acquiring a first calibration plate image set of a calibration plate placed in a specific container based on an image acquisition device, and removing a second calibration plate image set of the calibration plate after the specific container is removed;
Obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The positions of the image acquisition device and the specific container are kept unchanged, and an image to be corrected of an object to be corrected in the specific container is acquired based on the image acquisition device;
and performing de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image.
As an implementation manner, the obtaining the internal parameters and the comprehensive distortion parameters of the image acquisition device includes the following steps:
Obtaining camera distortion parameters by analyzing a light propagation path after removing a specific container based on the pixel position of the second calibration plate image and the calibration plate parameters;
Based on the pixel position of the first calibration plate image, the calibration plate parameters, the camera distortion parameters and the container distortion parameters, and by analyzing the propagation path of the light rays when the light rays propagate through the specific container, the comprehensive distortion parameters are obtained.
As an embodiment, the camera distortion parameter is expressed as follows:
Wherein, Representing the pixel positions of the second calibration plate image,Indicating pixel positions of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,And representing the pixel position difference between the second calibration plate image and the calibration plate image when distortion is ignored.
As an embodiment, the obtaining the integrated distortion parameter includes the following steps:
based on the propagation path of the light rays propagating through the specific container, the pixel positions of the first calibration plate image are obtained as follows:
Obtaining pixel positions of the calibration plate image when distortion is ignored, obtaining pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, and further obtaining comprehensive distortion parameters through analysis, wherein the pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored are expressed as follows:
Wherein, ,,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,Representing the difference in pixel positions of the first calibration plate image and the calibration plate image when distortion is ignored,Representing the integrated distortion parameters.
As an implementation manner, the image to be corrected is de-distorted based on the internal parameters and the comprehensive distortion parameters of the image acquisition device, so as to obtain a corrected image, and the method comprises the following steps:
Presetting a de-distortion function, inputting the internal parameters, the comprehensive distortion parameters and the image to be corrected of the image acquisition device into the preset de-distortion function for analysis, and obtaining a corrected image;
the preset de-distortion function is expressed as follows:
Wherein, The de-distortion function is represented by a function,Representing an image to be corrected,Represents the internal parameters and the comprehensive distortion parameters of the image acquisition device,Representing a corrected image.
An image correction system based on container imaging distortion comprises a calibration plate acquisition module, a parameter calculation module, an image acquisition module and an image correction module;
the calibration plate acquisition module acquires calibration plate parameters, and acquires a first calibration plate image set of a calibration plate placed in a specific container and a second calibration plate image set of the calibration plate after the specific container is removed based on the image acquisition device;
The parameter calculation module obtains internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The image acquisition module is used for keeping the positions of the image acquisition device and the specific container unchanged, and acquiring an image to be corrected of an object to be corrected in the specific container based on the image acquisition device;
The image correction module carries out de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image.
As an embodiment, the parameter calculation module is configured to:
Obtaining camera distortion parameters by analyzing a light propagation path after removing a specific container based on the pixel position of the second calibration plate image and the calibration plate parameters;
Based on the pixel position of the first calibration plate image, the calibration plate parameters, the camera distortion parameters and the container distortion parameters, and by analyzing the propagation path of the light rays when the light rays propagate through the specific container, the comprehensive distortion parameters are obtained.
As an embodiment, the parameter calculation module is configured to:
The camera distortion parameters are expressed as follows:
Wherein, Representing the pixel positions of the second calibration plate image,Indicating pixel positions of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing a pixel position difference value between the second calibration plate image and the calibration plate image when distortion is ignored;
Wherein, the obtaining the comprehensive distortion parameters comprises the following steps:
based on the propagation path of the light rays propagating through the specific container, the pixel positions of the first calibration plate image are obtained as follows:
Obtaining pixel positions of the calibration plate image when distortion is ignored, obtaining pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, and further obtaining comprehensive distortion parameters through analysis, wherein the pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored are expressed as follows:
Wherein, ,,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,Representing the difference in pixel positions of the first calibration plate image and the calibration plate image when distortion is ignored,Representing the integrated distortion parameters.
As an embodiment, the image correction module is configured to:
Presetting a de-distortion function, inputting the internal parameters, the comprehensive distortion parameters and the image to be corrected of the image acquisition device into the preset de-distortion function for analysis, and obtaining a corrected image;
the preset de-distortion function is expressed as follows:
Wherein, The de-distortion function is represented by a function,Representing an image to be corrected,Represents the internal parameters and the comprehensive distortion parameters of the image acquisition device,Representing a corrected image.
A computer readable storage medium storing a computer program which when executed by a processor performs the method of:
Acquiring calibration plate parameters, acquiring a first calibration plate image set of a calibration plate placed in a specific container based on an image acquisition device, and removing a second calibration plate image set of the calibration plate after the specific container is removed;
Obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The positions of the image acquisition device and the specific container are kept unchanged, and an image to be corrected of an object to be corrected in the specific container is acquired based on the image acquisition device;
and performing de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image.
An image correction device based on container imaging distortion, comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor implementing the following method when executing the computer program:
Acquiring calibration plate parameters, acquiring a first calibration plate image set of a calibration plate placed in a specific container based on an image acquisition device, and removing a second calibration plate image set of the calibration plate after the specific container is removed;
Obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The positions of the image acquisition device and the specific container are kept unchanged, and an image to be corrected of an object to be corrected in the specific container is acquired based on the image acquisition device;
and performing de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image.
The invention has the remarkable technical effects due to the adoption of the technical scheme:
the method solves the problem of higher calculation cost in the existing distorted image correction method, solves the problem of comprehensive distortion parameters by analyzing the propagation path of light in a medium, and further realizes the correction of distorted images by combining with a preset de-distortion function.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic flow chart of the method of the present invention;
FIG. 2 is an overall schematic of the system of the present invention;
FIG. 3 is a schematic view of an image acquisition apparatus of the present invention;
FIG. 4 is a schematic view of the light path of the present invention without a particular container;
FIG. 5 is a schematic view of the optical path through a particular container of the present invention;
FIG. 6 is a schematic diagram of the positional relationship under different light paths according to the present invention;
FIG. 7 is a schematic diagram of an image to be corrected according to the present invention;
Fig. 8 is a schematic diagram of a corrected image of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following examples, which are illustrative of the present invention and are not intended to limit the present invention thereto.
Example 1:
An image correction method based on container imaging distortion, as shown in fig. 1, comprises the following steps:
s100, acquiring calibration plate parameters, and acquiring a first calibration plate image set of a calibration plate placed in a specific container and a second calibration plate image set of the calibration plate after the specific container is removed based on an image acquisition device;
S200, obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
S300, keeping the positions of the image acquisition device and the specific container unchanged, and acquiring an image to be corrected of an object to be corrected in the specific container based on the image acquisition device;
S400, performing de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image.
In step S100, calibration plate parameters are acquired, and a first calibration plate image set of the calibration plate placed in the specific container and a second calibration plate image set of the calibration plate after the specific container is removed are acquired based on the image acquisition device. In this embodiment, a spherical container is used as the specific container.
The position relation between the spherical container and the image acquisition device is shown in fig. 3,1 represents the spherical container, 2 represents the LED lamp, 3 represents the image acquisition device, light enters the spherical container from the LED lamp at the bottom of the spherical container in the spherical container, reaches the surface of the calibration plate, is reflected on the surface of the calibration plate, reaches the arc glass at the inner side of the spherical container after passing through liquid medium water, and is refracted and reflected for the second time at the arc glass, the refracted and reflected light passes through air before reaching the image acquisition device, and the refracted light passes through the image acquisition device to reach the plane of the imaging sensor, so that the image acquisition of the calibration plate in the spherical container is realized, the first calibration plate image is obtained, and the image acquisition of the calibration plates at a plurality of angles and positions is further carried out to form a first calibration plate image set.
After a specific container is removed, light rays are transmitted in a single medium, light rays generated by an LED lamp in the image acquisition device reach the surface of the calibration plate through air, the light rays are transmitted to the front end of a lens of the image acquisition device after being reflected on the surface of the calibration plate, refraction and reflection occur at the front end of the lens of the image acquisition device, the refracted light rays pass through the lens to reach the plane of a camera imaging sensor of the image acquisition device, image acquisition is realized, a second calibration plate image is obtained, and then image acquisition is carried out on calibration plates with multiple angles and multiple positions to form a second calibration plate image set.
In one embodiment, a schematic diagram of light propagation of a plant root system without a specific container is shown in fig. 4, and R represents an intersection point of light emitted by a bottom LED lamp and the plant root system; l0 represents the intersection point of the light reflected by the root system and the lens of the image acquisition device. The schematic diagram of the light propagation of the plant root system in the process of passing through the specific container is shown in fig. 5, wherein R represents the intersection point of the light emitted by the bottom LED lamp and the plant root system; l0 represents the intersection point of the light which is reflected by the root system and passes through the spherical container wall and the lens of the image acquisition device; l1 represents the intersection point of the light reflected by the plant root system and the inner wall of the spherical container in the liquid medium; l2 represents the intersection of the light ray as it propagates within the curved glass of the spherical container wall with the air side of the spherical container curved wall.
The schematic diagram of the pixel position relationship of the image under different light paths is shown in fig. 6, which shows the position relationship among the pixel position of the calibration plate image, the pixel position of the first calibration plate image and the pixel position of the second calibration plate image when distortion is ignored, in fig. 6,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,Representing the difference in pixel positions of the first calibration plate image and the calibration plate image when distortion is ignored,Representing the integrated distortion parameters. Obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters, wherein the whole calculation process comprises the following steps:
assuming that the light ray propagates along a straight line, the undistorted position of the calibration plate on the imaging plane of the camera without considering the lens distortion is expressed as Obtaining a relation between a pixel position and an undistorted position of the second calibration plate image, and further obtaining a camera distortion parameter through solving, wherein a pixel position difference value between the pixel position of the second calibration plate image and the pixel position difference value of the calibration plate image when distortion is ignored is expressed as follows:
,
Based on the propagation path of light rays propagating through a specific container, combining undistorted positions of the calibration plate on the imaging plane of the camera without considering lens distortion, obtaining pixel positions of a first calibration plate image, which are expressed as follows:
assuming that the container distortion parameter is Based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, obtaining pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored, and further obtaining the comprehensive distortion parameters based on the difference values, wherein the pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored are expressed as follows:
In the above formula, the water content of the water-soluble polymer, ,,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,Representing the difference in pixel positions of the first calibration plate image and the calibration plate image when distortion is ignored,Representing the integrated distortion parameters.
In step S400, the image to be corrected is subjected to de-distortion processing based on the internal parameters and the integrated distortion parameters of the image acquisition device, so as to obtain a corrected image. Forming de-distortion parameters based on internal parameters and comprehensive distortion parameters of image acquisition deviceInputting the de-distortion parameters into a preset de-distortion function to obtain a corrected image, wherein the de-distortion function is in this embodimentThe function is expressed as follows:
Wherein, The de-distortion function is represented by a function,Representing the image to be corrected, as shown in figure 7,Represents the internal parameters and the comprehensive distortion parameters of the image acquisition device,A corrected image is represented as shown in fig. 8.
Example 2:
an image correction system based on container imaging distortion, as shown in fig. 2, comprises a calibration plate acquisition module 100, a parameter calculation module 200, an image acquisition module 300 and an image correction module 400;
The calibration plate acquisition module 100 acquires calibration plate parameters, and acquires a first calibration plate image set of a calibration plate placed in a specific container and a second calibration plate image set of the calibration plate after the specific container is removed based on an image acquisition device;
the parameter calculation module 200 obtains internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The image acquisition module 300 keeps the positions of the image acquisition device and the specific container unchanged, and acquires an image to be corrected of an object to be corrected in the specific container based on the image acquisition device;
The image correction module 400 performs de-distortion processing on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device, so as to obtain a corrected image.
In one embodiment, the parameter calculation module 200 is configured to:
Obtaining camera distortion parameters by analyzing a light propagation path after removing a specific container based on the pixel position of the second calibration plate image and the calibration plate parameters;
Based on the pixel position of the first calibration plate image, the calibration plate parameters, the camera distortion parameters and the container distortion parameters, and by analyzing the propagation path of the light rays when the light rays propagate through the specific container, the comprehensive distortion parameters are obtained.
In one embodiment, the parameter calculation module 200 is configured to:
The camera distortion parameters are expressed as follows:
Wherein, Representing the pixel positions of the second calibration plate image,Indicating pixel positions of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing a pixel position difference value between the second calibration plate image and the calibration plate image when distortion is ignored;
Wherein, the obtaining the comprehensive distortion parameters comprises the following steps:
based on the propagation path of the light rays propagating through the specific container, the pixel positions of the first calibration plate image are obtained as follows:
Obtaining pixel positions of the calibration plate image when distortion is ignored, obtaining pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, and further obtaining comprehensive distortion parameters through analysis, wherein the pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored are expressed as follows:
Wherein, ,,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,Representing the difference in pixel positions of the first calibration plate image and the calibration plate image when distortion is ignored,Representing the integrated distortion parameters.
In one embodiment, the image correction module 400 is configured to:
Presetting a de-distortion function, inputting the internal parameters, the comprehensive distortion parameters and the image to be corrected of the image acquisition device into the preset de-distortion function for analysis, and obtaining a corrected image;
the preset de-distortion function is expressed as follows:
Wherein, The de-distortion function is represented by a function,Representing an image to be corrected,Represents the internal parameters and the comprehensive distortion parameters of the image acquisition device,Representing a corrected image.
All changes and modifications that come within the spirit and scope of the invention are desired to be protected and all equivalent thereto are deemed to be within the scope of the invention.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, so that identical and similar parts of each embodiment are mutually referred to.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that:
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, the appearances of the phrase "one embodiment" or "an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment.
In addition, the specific embodiments described in the present specification may differ in terms of parts, shapes of components, names, and the like. All equivalent or simple changes of the structure, characteristics and principle according to the inventive concept are included in the protection scope of the present invention. Those skilled in the art may make various modifications or additions to the described embodiments or substitutions in a similar manner without departing from the scope of the invention as defined in the accompanying claims.
Claims (6)
1. An image correction method based on container imaging distortion, comprising the steps of:
Acquiring calibration plate parameters, acquiring a first calibration plate image set of a calibration plate placed in a specific container based on an image acquisition device, and removing a second calibration plate image set of the calibration plate after the specific container is removed;
Obtaining internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The positions of the image acquisition device and the specific container are kept unchanged, and an image to be corrected of an object to be corrected in the specific container is acquired based on the image acquisition device;
performing de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image;
The method for obtaining the internal parameters and the comprehensive distortion parameters of the image acquisition device comprises the following steps:
Obtaining camera distortion parameters by analyzing a light propagation path after removing a specific container based on the pixel position of the second calibration plate image and the calibration plate parameters;
based on the pixel position of the first calibration plate image, calibration plate parameters, camera distortion parameters and container distortion parameters, and obtaining comprehensive distortion parameters by analyzing the propagation path of light rays when the light rays propagate through a specific container;
The camera distortion parameters are expressed as follows:
Wherein, Representing the pixel positions of the second calibration plate image,Indicating pixel positions of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing a pixel position difference value between the second calibration plate image and the calibration plate image when distortion is ignored;
the method for obtaining the comprehensive distortion parameters comprises the following steps:
based on the propagation path of the light rays propagating through the specific container, the pixel positions of the first calibration plate image are obtained as follows:
Obtaining pixel positions of the calibration plate image when distortion is ignored, obtaining pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, and further obtaining comprehensive distortion parameters through analysis, wherein the pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored are expressed as follows:
Wherein, ,,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,The integrated distortion parameters are represented by a set of parameters,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,The pixel position difference between the first calibration plate image and the calibration plate image when distortion is ignored is represented.
2. The image correction method based on container imaging distortion according to claim 1, wherein the image correction method based on the internal parameters and the integrated distortion parameters of the image acquisition device performs the de-distortion processing on the image to be corrected to obtain the corrected image, and comprises the following steps:
Presetting a de-distortion function, inputting the internal parameters, the comprehensive distortion parameters and the image to be corrected of the image acquisition device into the preset de-distortion function for analysis, and obtaining a corrected image;
the preset de-distortion function is expressed as follows:
Wherein, The de-distortion function is represented by a function,Representing an image to be corrected,Representing internal parameters and comprehensive distortion parameters of the image acquisition device, wherein the comprehensive distortion parameters are as follows,Representing a corrected image.
3. An image correction system based on container imaging distortion is characterized by comprising a calibration plate acquisition module, a parameter calculation module, an image acquisition module and an image correction module;
the calibration plate acquisition module acquires calibration plate parameters, and acquires a first calibration plate image set of a calibration plate placed in a specific container and a second calibration plate image set of the calibration plate after the specific container is removed based on the image acquisition device;
The parameter calculation module obtains internal parameters and comprehensive distortion parameters of the image acquisition device through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
The image acquisition module is used for keeping the positions of the image acquisition device and the specific container unchanged, and acquiring an image to be corrected of an object to be corrected in the specific container based on the image acquisition device;
The image correction module is used for carrying out de-distortion treatment on the image to be corrected based on the internal parameters and the comprehensive distortion parameters of the image acquisition device to obtain a corrected image;
wherein the parameter calculation module is configured to:
Obtaining camera distortion parameters by analyzing a light propagation path after removing a specific container based on the pixel position of the second calibration plate image and the calibration plate parameters;
based on the pixel position of the first calibration plate image, calibration plate parameters, camera distortion parameters and container distortion parameters, and obtaining comprehensive distortion parameters by analyzing the propagation path of light rays when the light rays propagate through a specific container;
wherein the parameter calculation module is configured to:
The camera distortion parameters are expressed as follows:
Wherein, Representing the pixel positions of the second calibration plate image,Indicating pixel positions of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing a pixel position difference value between the second calibration plate image and the calibration plate image when distortion is ignored;
Wherein, the obtaining the comprehensive distortion parameters comprises the following steps:
based on the propagation path of the light rays propagating through the specific container, the pixel positions of the first calibration plate image are obtained as follows:
Obtaining pixel positions of the calibration plate image when distortion is ignored, obtaining pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, and further obtaining comprehensive distortion parameters through analysis, wherein the pixel position difference values of the first calibration plate image and the calibration plate image when distortion is ignored are expressed as follows:
Wherein, ,,Representing the pixel positions of the first calibration plate image,Indicating the pixel position of the calibration plate image when the distortion is ignored,Representing the distortion parameters of the camera,Representing the distortion parameters of the container,Representing the difference in pixel positions of the second calibration plate image and the calibration plate image when distortion is ignored,Representing the distortion offset of the container,Representing the difference in pixel positions of the first calibration plate image and the calibration plate image when distortion is ignored,Representing the integrated distortion parameters.
4. The container imaging distortion based image correction system of claim 3, wherein the image correction module is configured to:
Presetting a de-distortion function, inputting the internal parameters, the comprehensive distortion parameters and the image to be corrected of the image acquisition device into the preset de-distortion function for analysis, and obtaining a corrected image;
the preset de-distortion function is expressed as follows:
Wherein, The de-distortion function is represented by a function,Representing an image to be corrected,Represents the internal parameters and the comprehensive distortion parameters of the image acquisition device,Representing a corrected image.
5. A computer readable storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1 to 2.
6. An image correction device based on container imaging distortion comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that the processor implements the method according to any one of claims 1 to 2 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410777431.2A CN118351036B (en) | 2024-06-17 | 2024-06-17 | Image correction method, system and device based on container imaging distortion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410777431.2A CN118351036B (en) | 2024-06-17 | 2024-06-17 | Image correction method, system and device based on container imaging distortion |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118351036A CN118351036A (en) | 2024-07-16 |
CN118351036B true CN118351036B (en) | 2024-10-18 |
Family
ID=91815806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410777431.2A Active CN118351036B (en) | 2024-06-17 | 2024-06-17 | Image correction method, system and device based on container imaging distortion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118351036B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112819725A (en) * | 2021-02-05 | 2021-05-18 | 广东电网有限责任公司广州供电局 | Rapid image correction method for radial distortion |
CN113256540A (en) * | 2021-07-14 | 2021-08-13 | 智道网联科技(北京)有限公司 | Image distortion removal method and apparatus, electronic device, and computer-readable storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107424126A (en) * | 2017-05-26 | 2017-12-01 | 广州视源电子科技股份有限公司 | Image correction method, device, equipment and system, image pickup equipment and display equipment |
CN110717942B (en) * | 2018-07-11 | 2022-06-10 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
CN112702515B (en) * | 2020-12-23 | 2022-07-15 | 上海立可芯半导体科技有限公司 | Image processing method, system and computer readable medium in camera system |
CN113450418A (en) * | 2021-06-24 | 2021-09-28 | 深圳市明日系统集成有限公司 | Improved method, device and system for underwater calibration based on complex distortion model |
CN114359398A (en) * | 2021-12-02 | 2022-04-15 | 北京旷视科技有限公司 | Distortion calibration method of camera, electronic equipment and storage medium |
CN115713560A (en) * | 2022-10-29 | 2023-02-24 | 重庆长安汽车股份有限公司 | Camera and vehicle external parameter calibration method and device, electronic equipment and storage medium |
CN117893695B (en) * | 2024-03-15 | 2024-06-04 | 浙江托普云农科技股份有限公司 | Three-dimensional reconstruction method, system and device for arbitrary plant height |
-
2024
- 2024-06-17 CN CN202410777431.2A patent/CN118351036B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112819725A (en) * | 2021-02-05 | 2021-05-18 | 广东电网有限责任公司广州供电局 | Rapid image correction method for radial distortion |
CN113256540A (en) * | 2021-07-14 | 2021-08-13 | 智道网联科技(北京)有限公司 | Image distortion removal method and apparatus, electronic device, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN118351036A (en) | 2024-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI539184B (en) | Design method of a freeform imaging lens | |
CN106981050A (en) | The method and apparatus of the image flame detection shot to fish eye lens | |
CN111488874A (en) | Method and system for correcting inclination of pointer instrument | |
CN101437103B (en) | Imaging system, imaging apparatus, portable terminal apparatus, onboard apparatus, and medical apparatus, and method of manufacturing the imaging system | |
CN102472621B (en) | Image processing apparatus and image processing method | |
CN108182708B (en) | Calibration method and calibration device of binocular camera and terminal equipment | |
CN102592264A (en) | Method of processing image and apparatus for the same | |
CN110533588B (en) | Root system image restoration method based on generation of countermeasure network | |
JP5412757B2 (en) | Optical system distortion correction method and optical system distortion correction apparatus | |
CN202471004U (en) | Full-automatic image measuring instrument based on plurality of camera lenses | |
JP5686139B2 (en) | Manufacturing method of glass substrate for liquid crystal display panel | |
CN110261069B (en) | Detection method for optical lens | |
CN118351036B (en) | Image correction method, system and device based on container imaging distortion | |
CN107756784B (en) | The even smooth method and system of slice map based on DLP rapid shaping technique | |
CN109696240A (en) | Detection method, device and the readable storage medium storing program for executing of the semiconductor laser overall situation uniformity | |
WO2021072767A1 (en) | Calibration method and system for camera device, and stereoscopic calibration device and storage medium | |
CN117132583A (en) | Wafer defect detection method and device, electronic equipment and nonvolatile storage medium | |
JP6376809B2 (en) | Projection device and imaging device used in three-dimensional shape measurement system | |
CN102147530B (en) | Fast wave-front reconstruction method applied to liquid crystal adaptive optical system | |
WO2006075832A1 (en) | Outer and inner diameter measuring apparatus and method for transparent tube | |
CN111986266A (en) | Photometric stereo light source parameter calibration method | |
CN107888804A (en) | Thermal imaging system image processing method and device | |
CN112067136B (en) | Drift correction method and device for photothermal reflection microscopic thermal imaging | |
CN113487632B (en) | Ampoule bottle neck detection system, method and equipment for liquid preparation robot | |
CN109612408A (en) | Semiconductor laser angle measurement method, apparatus and readable storage medium storing program for executing |
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 |