Image correction method, system and device based on container imaging distortion
By analyzing the light propagation path and calibration plate parameters, solving the internal parameters and comprehensive distortion parameters of the image acquisition device, and performing image correction combined with the preset de-distortion function, it solves the problems of complex imaging distortion correction and high consumption of computing resources in existing optical imaging technology. Fast and efficient image correction effects are achieved.
Patent Information
- Application Number
- CN202410777431.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In existing optical imaging technology, the imaging distortion correction method caused by light propagation in multiple media is complex and consumes large computing resources, making it difficult to achieve fast and effective image correction.
By obtaining the image set and parameters of the calibration plate, analyzing the light propagation path, solving the internal parameters and comprehensive distortion parameters of the image acquisition device, and performing image correction in conjunction with the preset de-distortion function, the requirements for optical expertise are simplified and the calculation cost is reduced.
It achieves rapid correction of image distortion, reduces computational costs, and simplifies the image correction process in optical imaging technology, making it more convenient and efficient in practical applications.
Smart Images

Figure CN118351036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical imaging technology, and in particular to a method, system and device for correcting in-situ root container imaging distortion. Background Art
[0002] When light passes through multiple media in the process of propagating from an object to the lens and imaging plane of the image acquisition device, the different refractive indices of the media will cause the light to refract to varying degrees when it enters another medium, causing the imaging position to shift, which in turn leads to image distortion and has a significant impact on related research. Therefore, correction methods based on distorted images are particularly important.
[0003] At present, the refracted light expressions in each medium are derived in turn by using ray tracing technology, and the calibration parameters and reprojection errors are obtained through iterative optimization to correct the distorted image. This method requires a lot of optical theoretical knowledge and derivation calculations, which is too complicated and consumes a lot of computing resources in actual use. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides an image correction method, system and device based on container imaging distortion.
[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:
[0006] An image correction method based on container imaging distortion comprises the following steps:
[0007] Acquire calibration plate parameters, and acquire, based on an image acquisition device, a first calibration plate image set of the calibration plate placed in a specific container, and a second calibration plate image set of the calibration plate after removing the specific container;
[0008] Obtaining the internal parameters of the image acquisition device and the comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
[0009] The positions of the image acquisition device and the specific container are kept unchanged, and the image to be calibrated of the object to be calibrated in the specific container is acquired based on the image acquisition device;
[0010] The image to be corrected is dedistorted based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image.
[0011] As an implementable method, obtaining the internal parameters of the image acquisition device and the comprehensive distortion parameters includes the following steps:
[0012] Based on the pixel position of the second calibration plate image, the calibration plate parameters, and by analyzing the light propagation path after removing the specific container, the camera distortion parameters are obtained;
[0013] 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 light when passing through a specific container, a comprehensive distortion parameter is obtained.
[0014] As an implementable method, the camera distortion parameter is expressed as follows:
[0015]
[0016]
[0017]
[0018] in, represents the pixel position of the second calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, Represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored.
[0019] As an implementable method, obtaining the comprehensive distortion parameter comprises the following steps:
[0020] Based on the propagation path of the light when passing through a specific container, the pixel position of the first calibration plate image is obtained, which is expressed as follows:
[0021]
[0022] The pixel position of the calibration plate image when the distortion is ignored is obtained. Based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is obtained. Then, the comprehensive distortion parameters are obtained by analysis. The pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is expressed as follows:
[0023]
[0024]
[0025] in, , , represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, represents the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored, Represents the comprehensive distortion parameter.
[0026] As an implementation method, the dedistortion processing of the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain the corrected image includes the following steps:
[0027] A dedistortion function is preset, and the internal parameters of the image acquisition device, the comprehensive distortion parameters and the image to be corrected are input into the preset dedistortion function for analysis to obtain a corrected image;
[0028] The preset dedistortion function is expressed as follows:
[0029]
[0030] in, represents the dedistortion function, represents the image to be corrected, represents the internal parameters of the image acquisition device and the comprehensive distortion parameters, Represents the corrected image.
[0031] An image correction system based on container imaging distortion includes a calibration plate acquisition module, a parameter calculation module, an image acquisition module and an image correction module;
[0032] The calibration plate acquisition module acquires calibration plate parameters, and acquires a first calibration plate image set of the calibration plate placed in a specific container and a second calibration plate image set of the calibration plate without the specific container based on an image acquisition device;
[0033] The parameter calculation module obtains the internal parameters of the image acquisition device and the comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
[0034] The image acquisition module keeps the positions of the image acquisition device and the specific container unchanged, and acquires the image to be calibrated of the object to be calibrated in the specific container based on the image acquisition device;
[0035] The image correction module performs dedistortion processing on the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image.
[0036] As an implementable method, the parameter calculation module is configured as follows:
[0037] Based on the pixel position of the second calibration plate image, the calibration plate parameters, and by analyzing the light propagation path after removing the specific container, the camera distortion parameters are obtained;
[0038] 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 light when passing through a specific container, a comprehensive distortion parameter is obtained.
[0039] As an implementable method, the parameter calculation module is configured as follows:
[0040] The camera distortion parameters are expressed as follows:
[0041]
[0042]
[0043]
[0044] in, represents the pixel position of the second calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored;
[0045] Wherein, obtaining the comprehensive distortion parameter comprises the following steps:
[0046] Based on the propagation path of the light when passing through a specific container, the pixel position of the first calibration plate image is obtained, which is expressed as follows:
[0047]
[0048] The pixel position of the calibration plate image when the distortion is ignored is obtained. Based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is obtained. Then, the comprehensive distortion parameters are obtained by analysis. The pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is expressed as follows:
[0049]
[0050]
[0051] in, , , represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, represents the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored, Represents the comprehensive distortion parameter.
[0052] As an implementable embodiment, the image correction module is configured as follows:
[0053] A dedistortion function is preset, and the internal parameters of the image acquisition device, the comprehensive distortion parameters and the image to be corrected are input into the preset dedistortion function for analysis to obtain a corrected image;
[0054] The preset dedistortion function is expressed as follows:
[0055]
[0056] in, represents the dedistortion function, represents the image to be corrected, represents the internal parameters of the image acquisition device and the comprehensive distortion parameters, Represents the corrected image.
[0057] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following method is implemented:
[0058] Acquire calibration plate parameters, and acquire, based on an image acquisition device, a first calibration plate image set of the calibration plate placed in a specific container, and a second calibration plate image set of the calibration plate after removing the specific container;
[0059] Obtaining the internal parameters of the image acquisition device and the comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
[0060] The positions of the image acquisition device and the specific container are kept unchanged, and the image to be calibrated of the object to be calibrated in the specific container is acquired based on the image acquisition device;
[0061] The image to be corrected is dedistorted based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image.
[0062] An image correction device based on container imaging distortion includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the following method is implemented:
[0063] Acquire calibration plate parameters, and acquire, based on an image acquisition device, a first calibration plate image set of the calibration plate placed in a specific container, and a second calibration plate image set of the calibration plate after removing the specific container;
[0064] Obtaining the internal parameters of the image acquisition device and the comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
[0065] The positions of the image acquisition device and the specific container are kept unchanged, and the image to be calibrated of the object to be calibrated in the specific container is acquired based on the image acquisition device;
[0066] The image to be corrected is dedistorted based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image.
[0067] The present invention has significant technical effects due to the adoption of the above technical solution:
[0068] The method of the present invention solves the problem of high computational cost in existing distorted image correction methods. The method analyzes the propagation path of light in the medium to solve the comprehensive distortion parameters, and then corrects the distorted image in combination with a preset dedistortion function. The method has low requirements for optical expertise and is more convenient in practical applications to achieve rapid image correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0070] Figure 1 It is a schematic flow diagram of the method of the present invention;
[0071] Figure 2 It is an overall schematic diagram of the system of the present invention;
[0072] Figure 3 is a schematic diagram of an image acquisition device of the present invention;
[0073] Figure 4 It is a schematic diagram of the optical path without a specific container of the present invention;
[0074] Figure 5 is a schematic diagram of the light path through a specific container of the present invention;
[0075] Figure 6 It is a schematic diagram of the position relationship under different optical paths of the present invention;
[0076] Figure 7is a schematic diagram of an image to be corrected according to the present invention;
[0077] Figure 8 It is a schematic diagram of the corrected image of the present invention. DETAILED DESCRIPTION
[0078] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.
[0079] Embodiment 1:
[0080] An image correction method based on container imaging distortion, such as Figure 1 As shown, the following steps are included:
[0081] S100, obtaining calibration plate parameters, and obtaining, based on an image acquisition device, a first calibration plate image set of the calibration plate placed in a specific container, and a second calibration plate image set of the calibration plate without the specific container;
[0082] S200, obtaining internal parameters of the image acquisition device and comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and calibration plate parameters;
[0083] S300, keeping the positions of the image acquisition device and the specific container unchanged, and acquiring the image to be calibrated of the object to be calibrated in the specific container based on the image acquisition device;
[0084] S400, performing dedistortion processing on the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image.
[0085] In step S100, calibration plate parameters are obtained, and a first calibration plate image set of the calibration plate placed in a specific container and a second calibration plate image set of the calibration plate without the specific container are obtained based on an image acquisition device. In this embodiment, a spherical container is used as the specific container.
[0086] Among them, the positional relationship between the spherical container and the image acquisition device is as follows: Figure 3 As shown, 1 represents a spherical container, 2 represents an LED lamp, and 3 represents an image acquisition device. Light enters the spherical container from the LED lamp at the bottom of the spherical container, reaches the surface of the calibration plate, and is reflected on the surface of the calibration plate. After passing through the liquid medium water, it reaches the curved glass inside the spherical container, and a second refraction and reflection occur at the curved glass. The refracted and reflected light passes through the air, and before reaching the image acquisition device, the light is refracted and reflected at the image acquisition device. The refracted light passes through the image acquisition device and reaches the imaging sensor plane, thereby acquiring the image of the calibration plate in the spherical container and obtaining a first calibration plate image. Then, image acquisition is performed on the calibration plates at multiple angles and multiple positions to form a first calibration plate image set.
[0087] After removing the specific container, the light propagates in a single medium, and the light generated by the LED lamp in the image acquisition device passes through the air to reach the surface of the calibration plate. After being reflected on the surface of the calibration plate, it propagates to the front end of the lens of the image acquisition device, where it is refracted and reflected. The refracted light passes through the lens to reach the camera imaging sensor plane of the image acquisition device, realizing image acquisition and obtaining the second calibration plate image. Then, image acquisition is performed on the calibration plate at multiple angles and multiple positions to form a second calibration plate image set.
[0088] In one embodiment, a schematic diagram of light propagation of plant roots without a specific container is shown in FIG. Figure 4 As shown in the figure, R represents the intersection of the light emitted by the bottom LED lamp and the plant root system; L0 represents the intersection 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 passing through a specific container is shown in the figure below. Figure 5 As shown, R represents the intersection of the light emitted by the bottom LED lamp and the plant root system; L0 represents the intersection of the light reflected by the root system and passing through the wall of the spherical container and the lens of the image acquisition device; L1 represents the intersection of the light reflected by the plant root system in the liquid medium and the inner wall of the spherical container; L2 represents the intersection of the light with the air side of the curved wall of the spherical container when propagating in the curved glass of the spherical container wall.
[0089] The schematic diagram of the relationship between image pixel positions under different optical paths is as follows: Figure 6 As shown, the figure shows the positional relationship between 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 the distortion is ignored. Figure 6 middle, represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, represents the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored, Represents the comprehensive distortion parameter. Then, the internal parameters of the image acquisition device and the comprehensive distortion parameter are obtained through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters. The whole calculation process includes the following steps:
[0090] Assuming that light propagates in a straight line and ignoring lens distortion, the undistorted position of the calibration plate on the camera imaging plane is expressed as , the relationship between the pixel position of the second calibration plate image and the undistorted position is obtained, and then the camera distortion parameters are obtained by solving, where the difference between the pixel position of the second calibration plate image and the pixel position of the calibration plate image when the distortion is ignored is expressed as follows:
[0091] ,
[0092]
[0093] Based on the propagation path of the light when it propagates through a specific container, combined with the undistorted position of the calibration plate on the camera imaging plane when the lens distortion is not considered, the pixel position of the first calibration plate image is obtained, which is expressed as follows:
[0094]
[0095] Assume that the container distortion parameter is , based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is obtained, and then the comprehensive distortion parameter is obtained based on the difference, wherein the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is expressed as follows:
[0096]
[0097]
[0098] In the above formula, , , represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, represents the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored, Represents the comprehensive distortion parameter.
[0099] In step S400, the image to be corrected is dedistorted based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image. , the dedistortion parameters are input into a preset dedistortion function for processing to obtain a corrected image. In this embodiment, the dedistortion function is: Function, expressed as follows:
[0100]
[0101] in, represents the dedistortion function, Represents the image to be corrected, such as Figure 7 As shown, represents the internal parameters of the image acquisition device and the comprehensive distortion parameters, Represents the corrected image, such as Figure 8 shown.
[0102] Embodiment 2:
[0103] An image correction system based on container imaging distortion, such as Figure 2 As shown, it includes a calibration plate acquisition module 100, a parameter calculation module 200, an image acquisition module 300 and an image correction module 400;
[0104] The calibration plate acquisition module 100 acquires calibration plate parameters, and acquires a first calibration plate image set of the calibration plate placed in a specific container and a second calibration plate image set of the calibration plate without the specific container based on an image acquisition device;
[0105] The parameter calculation module 200 obtains the internal parameters of the image acquisition device and the comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters;
[0106] The image acquisition module 300 keeps the positions of the image acquisition device and the specific container unchanged, and acquires the image to be calibrated of the object to be calibrated in the specific container based on the image acquisition device;
[0107] The image correction module 400 performs dedistortion processing on the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image.
[0108] In one embodiment, the parameter calculation module 200 is configured as follows:
[0109] Based on the pixel position of the second calibration plate image, the calibration plate parameters, and by analyzing the light propagation path after removing the specific container, the camera distortion parameters are obtained;
[0110] 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 light when passing through a specific container, a comprehensive distortion parameter is obtained.
[0111] In one embodiment, the parameter calculation module 200 is configured as follows:
[0112] The camera distortion parameters are expressed as follows:
[0113]
[0114]
[0115]
[0116] in, represents the pixel position of the second calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored;
[0117] Wherein, obtaining the comprehensive distortion parameter comprises the following steps:
[0118] Based on the propagation path of the light when passing through a specific container, the pixel position of the first calibration plate image is obtained, which is expressed as follows:
[0119]
[0120] The pixel position of the calibration plate image when the distortion is ignored is obtained. Based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is obtained. Then, the comprehensive distortion parameters are obtained by analysis. The pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is expressed as follows:
[0121]
[0122]
[0123] in, , , represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, represents the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored, Represents the comprehensive distortion parameter.
[0124] In one embodiment, the image correction module 400 is configured to:
[0125] A dedistortion function is preset, and the internal parameters of the image acquisition device, the comprehensive distortion parameters and the image to be corrected are input into the preset dedistortion function for analysis to obtain a corrected image;
[0126] The preset dedistortion function is expressed as follows:
[0127]
[0128] in, represents the dedistortion function, represents the image to be corrected, represents the internal parameters of the image acquisition device and the comprehensive distortion parameters, Represents the corrected image.
[0129] Various changes and modifications can be made without departing from the spirit and scope of the present invention, and all equivalent technical solutions also belong to the scope of the present invention.
[0130] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0131] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0132] The present invention is described with reference to the flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0135] It should be noted that:
[0136] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.
[0137] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different. Any equivalent or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. The technicians in the technical field of the present invention can make various modifications or supplements to the specific embodiments described or replace them in a similar manner, as long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. An image correction method based on container imaging distortion, characterized in that: The following steps are involved: Acquire calibration plate parameters, and acquire, based on an image acquisition device, a first calibration plate image set of the calibration plate placed in a specific container, and a second calibration plate image set of the calibration plate after removing the specific container; Obtaining the internal parameters of the image acquisition device and the comprehensive distortion parameters 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 the image to be calibrated of the object to be calibrated in the specific container is acquired based on the image acquisition device; Dedistorting the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image; Wherein, obtaining the internal parameters of the image acquisition device and the comprehensive distortion parameters comprises the following steps: Based on the pixel position of the second calibration plate image, the calibration plate parameters, and by analyzing the light propagation path after removing the specific container, the camera distortion parameters are obtained; 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 light when passing through a specific container, a comprehensive distortion parameter is obtained; The camera distortion parameters are expressed as follows: in, represents the pixel position of the second calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored; The step of obtaining the comprehensive distortion parameter comprises the following steps: Based on the propagation path of the light when passing through a specific container, the pixel position of the first calibration plate image is obtained, which is expressed as follows: The pixel position of the calibration plate image when the distortion is ignored is obtained. Based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is obtained. Then, the comprehensive distortion parameters are obtained by analysis. The pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is expressed as follows: in, , , represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the comprehensive distortion parameter, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, Indicates the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored.
2. The image correction method based on container imaging distortion according to claim 1, characterized in that: The method of performing dedistortion processing on the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain the corrected image includes the following steps: A dedistortion function is preset, and the internal parameters of the image acquisition device, the comprehensive distortion parameters and the image to be corrected are input into the preset dedistortion function for analysis to obtain a corrected image; The preset dedistortion function is expressed as follows: in, represents the dedistortion function, represents the image to be corrected, represents the internal parameters of the image acquisition device and the comprehensive distortion parameters. The comprehensive distortion parameters are , Represents the corrected image.
3. An image correction system based on container imaging distortion, characterized in that: It includes 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 the calibration plate placed in a specific container and a second calibration plate image set of the calibration plate without the specific container based on an image acquisition device; The parameter calculation module obtains the internal parameters of the image acquisition device and the comprehensive distortion parameters through the first calibration plate image set, the second calibration plate image set and the calibration plate parameters; The image acquisition module keeps the positions of the image acquisition device and the specific container unchanged, and acquires the image to be calibrated of the object to be calibrated in the specific container based on the image acquisition device; The image correction module performs dedistortion processing on the image to be corrected based on the internal parameters of the image acquisition device and the comprehensive distortion parameters to obtain a corrected image; Wherein, the parameter calculation module is set to: Based on the pixel position of the second calibration plate image, the calibration plate parameters, and by analyzing the light propagation path after removing the specific container, the camera distortion parameters are obtained; 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 light when passing through a specific container, a comprehensive distortion parameter is obtained; Wherein, the parameter calculation module is set to: The camera distortion parameters are expressed as follows: in, represents the pixel position of the second calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored; Wherein, obtaining the comprehensive distortion parameter comprises the following steps: Based on the propagation path of the light when passing through a specific container, the pixel position of the first calibration plate image is obtained, which is expressed as follows: The pixel position of the calibration plate image when the distortion is ignored is obtained. Based on the container distortion parameters, the camera distortion parameters and the calibration plate parameters, the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is obtained. Then, the comprehensive distortion parameters are obtained by analysis. The pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored is expressed as follows: in, , , represents the pixel position of the first calibration plate image, represents the pixel position of the calibration plate image when the distortion is ignored, represents the camera distortion parameters, represents the container distortion parameter, represents the pixel position difference between the second calibration plate image and the calibration plate image when the distortion is ignored, Indicates the container distortion offset, represents the pixel position difference between the first calibration plate image and the calibration plate image when the distortion is ignored, Represents the comprehensive distortion parameter.
4. The image correction system based on container imaging distortion according to claim 3, characterized in that: The image correction module is configured as follows: A dedistortion function is preset, and the internal parameters of the image acquisition device, the comprehensive distortion parameters and the image to be corrected are input into the preset dedistortion function for analysis to obtain a corrected image; The preset dedistortion function is expressed as follows: in, represents the dedistortion function, represents the image to be corrected, represents the internal parameters of the image acquisition device and the comprehensive distortion parameters, Represents the corrected image.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.
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: When the processor executes the computer program, the method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Rapid image correction method for radial distortion
CN112819725A
Image distortion removal method and device, electronic equipment and computer readable storage medium
CN113256540A
