CN114640781A - Underwater camera image radial distortion correction device and method - Google Patents
Underwater camera image radial distortion correction device and method Download PDFInfo
- Publication number
- CN114640781A CN114640781A CN202210541076.XA CN202210541076A CN114640781A CN 114640781 A CN114640781 A CN 114640781A CN 202210541076 A CN202210541076 A CN 202210541076A CN 114640781 A CN114640781 A CN 114640781A
- Authority
- CN
- China
- Prior art keywords
- point
- pixel
- calibration
- underwater camera
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000012937 correction Methods 0.000 title claims abstract description 47
- 230000003287 optical effect Effects 0.000 claims abstract description 40
- 230000008569 process Effects 0.000 claims description 23
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 17
- 238000003384 imaging method Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 12
- 239000011159 matrix material Substances 0.000 claims description 12
- 230000009466 transformation Effects 0.000 claims description 6
- 239000000126 substance Substances 0.000 claims description 5
- 238000012360 testing method Methods 0.000 claims description 5
- 230000009467 reduction Effects 0.000 claims description 3
- 230000000007 visual effect Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 241000226585 Antennaria plantaginifolia Species 0.000 description 3
- 238000005259 measurement Methods 0.000 description 2
- 238000004451 qualitative analysis Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 239000003208 petroleum Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000004445 quantitative analysis Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/50—Constructional details
-
- G06T5/80—
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/695—Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/2628—Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30244—Camera pose
Abstract
The invention relates to the technical field of image data processing, and particularly discloses a device and a method for correcting radial distortion of an image of an underwater camera, wherein the method comprises the following steps: deploying a camera and a correction point in an underwater camera distortion correction device, and converting a camera coordinate system and a pixel coordinate system into a basis under the distortion-free condition to realize single-point K value calibration; operating an underwater camera distortion correction system to complete K value calibration of a specific distance point set at different angles; judging whether optical center correction is needed; completing general K value calibration in a pixel plane through a plurality of groups of specific distance point set K values; the radial distortion correction is realized by the pixel plane curves k (d). The device disclosed by the invention is simple and easy to build, the flow is automatic and easy to operate, the principle is direct and easy to realize, the result is accurate and error-resistant, and the automatic batch correction of the radial distortion of the image of the underwater camera can be automatically completed.
Description
Technical Field
The invention relates to the technical field of image data processing, in particular to a device and a method for correcting radial distortion of an image of an underwater camera.
Background
An underwater camera is an image capturing apparatus that captures images of objects in water as digital images through an underwater lens. With the development of marine science and technology in recent years, underwater cameras are widely applied in the fields of scientific research and engineering, and the application scenes of the underwater cameras are also continuously expanded. Typical applications include: the method comprises the following steps of underwater image acquisition of the deep-sea submersible vehicle, petroleum pipeline interface monitoring, marine ecological research, marine ranch and the like.
Underwater camera applications fall into two categories: qualitative collection and quantitative collection. Qualitative collection, namely, the qualitative analysis can be carried out through the collected images, namely, only the content of the images is emphasized without marking; the quantitative acquisition is to perform qualitative analysis on the image and also perform quantitative analysis on the image, for example, to measure the distance between two points in the image and map the distance to a world coordinate system. This analysis determines that the underwater camera must be distortion corrected before quantitative acquisition.
The underwater camera image distortion includes both radial distortion and tangential distortion. The radial distortion is an image distortion phenomenon which is caused by light refraction or lens physical bending in water and is in central symmetry with an optical center in an underwater imaging process of a camera of an underwater camera, and is shown in figure 1. The radial distortion is divided into barrel distortion and pincushion distortion. Barrel distortion is distortion where the image content shrinks towards the center, and pin cushion distortion is distortion where the image content diverges towards the periphery. Wherein, the image distortion of the underwater camera belongs to barrel distortion.
The performance of camera under water at present has promoted by a wide margin than original, mainly includes: image resolution, image return rate, intelligent networking, automatic light compensation and the like, but still has great improvement space in the aspect of image distortion correction. Because the individual parameters of the underwater lens hardware and the difference of the using environment cannot optimize the products in batches through a unified standard, and the calibration cost is higher one by one, most of the underwater camera products in the current market do not have the distortion correction function except for an extremely individual high-end series.
Disclosure of Invention
In order to solve the technical problems, the invention provides an underwater camera image radial distortion correction device and method, so that the aims of simple and easy construction, automatic and easy operation of the process, direct and easy realization of the principle, accurate result and error resistance and automatic batch correction of the image radial distortion of the underwater camera can be fulfilled.
In order to achieve the purpose, the technical scheme of the invention is as follows:
the utility model provides a radial distortion correcting unit of camera image under water, includes base one and base two through the slip hub connection, but install the camera under water that oscilaltion and left-right removal on the base one, install servo motor on the base two, servo motor passes through the pivot and connects the calibration disc, be provided with a plurality of calibration points on the calibration disc, a plurality of calibration point evenly distributed are on crossing a radius of calibration disc centre of a circle, the camera is just to the calibration disc under water.
In the scheme, two vertical rods are installed on the base, a cross beam is installed between the two vertical rods through bolts, a sliding block is installed on the cross beam, and the underwater camera is installed on the sliding block.
In the above scheme, the servo motor is installed on the second base through the supporting rod, the second base is further provided with a support, and the rotating shaft is erected on the support.
In the above scheme, the sliding shaft is provided with a scale.
The method for correcting the radial distortion of the image of the underwater camera comprises the following steps:
s1: adjusting the distance between the first base and the second base to enable the calibration disc to completely appear in the visual field range of the underwater camera in the rotating process, adjusting the position of the underwater camera to enable the optical axis of the underwater camera to be over against the circle center of the calibration disc, and then placing the correction device under water;
s2: when the test is started, the servo motor is controlled to enable the connecting line of the calibration points on the calibration disc to be located at the position of 0 degree in the azimuth, the first calibration point is selected, the system automatically collects the pixel coordinates of the first calibration point, the pixel coordinates are converted into the coordinates of the underwater camera, and the correction proportion K of the calibration point under the position of 0 degree is obtained through calculation1A value;
s3: the servo motor is controlled by the system to rotate a certain angle clockwise/anticlockwise, and the step S2 is repeated to obtain K of the index point under the angle1A value; the process is circulated until the calibration point returns to the 0 DEG position, and a plurality of groups of K of the calibration point under different angles are obtained1Value and calculating K at the calibration point by mean fitting1Mean value;
s4: according to K1If the deviation is within the range of the set threshold value, the optical center correction is not needed, and if the deviation exceeds the set threshold value, the optical center correction is carried out;
s5: selecting a second index point, repeating steps S2-S4 to obtain K of the second index point2Mean value; repeating the process to obtain K of the nth calibration pointnMean value; performing curve fitting on the K values of the n calibration points to obtain an expression of a general curve K (D) in the pixel plane, wherein D is the distance between an imaging point and a pixel coordinate origin A;
s6: and performing radial distortion correction on the underwater image shot by the underwater camera by using a K (D) expression.
In the above solution, the method for converting the pixel coordinates into the coordinates of the underwater camera in step S2 is as follows:
the plane M is a pixel plane of the underwater camera, the plane N is a plane where the surface of the calibration disc is located, O is the optical center of the underwater camera, A is the origin of pixel coordinates in the pixel plane, B is the center of the calibration disc, P is a calibration point on the calibration disc,is an imaging point with the calibration point P distorted, and P is an imaging point after correctionThe reduction point on the calibration disk is a pointPoint of contactThe coordinates areImaging pointHas pixel coordinates ofThe transformation formula of the two is as follows:
wherein the content of the first and second substances,
wherein S is a scale factor representing the scaling of the image display;,referred to as an internal reference, respectively represent the transformation ratios from the coordinates of the underwater camera in the x-direction and the y-direction to the coordinates of the pixels,C x ,C y the offset of the inside of the pixel coordinate system is the pixel offset of the first point at the upper left corner in the pixel plane translated to the x and y directions of the pixel coordinate origin A; dx represents the width of the image expressed by 1 pixel in the horizontal direction, dy represents the width of the image expressed by 1 pixel in the vertical direction, O is the optical center of the underwater camera, a is the origin of pixel coordinates in the pixel plane,is the focal length of the underwater camera and,is the horizontal distance between the underwater camera pixel plane and the calibration disc, M N is the resolution of the image,represents rounding up;
in the above solution, in step S2, the formula for calculating the correction ratio K value is as follows:
wherein the content of the first and second substances,is the distance from the calibration point P to the circle center B,is a pointDistance to center B.
In the above scheme, the optical center correction method in step S4 is as follows:
(1) establishing a pixel coordinate system XAY in a pixel plane, wherein A is the origin of the pixel coordinate, and the farthest point from the point A is the point when K is the maximum value in the projection track of the calibration point P under the pixel coordinate system in the rotation process(ii) a When K takes the minimum value, the point closest to point A isPoint of contactPoint, pointPoint A and true optical center pointOn the same straight line, the real optical center is obtained by calculationOf (2)Is composed of;
(2) Adjusting the position of the underwater camera to adjust the projection of the centre of a circle B of the calibration disc to the pixel coordinate systemA location;
(3) to Cx,CyThe values are modified as follows:
in the above scheme, in step S6, the distortion correction is implemented by the curve k (d) as follows:
a certain distortion point is shown by curve K (D)The initial pixel coordinates are converted into corrected pixel coordinates to form corrected pixel pointsThe calculation formula is as follows:
wherein
For an image with resolution M N, all pixels in the image are traversed in sequence starting from the pixel with coordinates (1,1)Calculating new coordinates of each pixel point by formula (7)Newly building a basic image storage matrix, and then transferring the pixel content on the coordinate to the new coordinate after correction; and when all the points are traversed, the new matrix has points without pixel content, the points are filled in an interpolation mode, and then a new corrected image is formed by cutting.
Through the technical scheme, the underwater camera image radial distortion correction device and method provided by the invention have the following beneficial effects:
1. the invention designs a set of correction device to be arranged under water, K values of the same calibration point at different angles can be measured by controlling the calibration disc to automatically rotate, and K mean values at the calibration point can be obtained by data fitting;
2. according to the invention, by setting a plurality of calibration points, K values of the calibration points under different angles can be obtained by the same method, and an expression of a general curve K (D) in a pixel plane is obtained by fourth-order curve fitting;
3. the method can improve the automation degree of calibration and the accuracy of the calibration result.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of radial distortion, (a) for a normal image, (b) for barrel distortion, and (c) for pincushion distortion;
FIG. 2 is a schematic diagram of an image radial distortion correction apparatus for an underwater camera according to an embodiment of the present invention;
FIG. 3 is a flow chart of the method for correcting radial distortion of an image of an underwater camera according to the present invention;
FIG. 4 is a schematic view of a camera radial distortion map;
FIG. 5 is a schematic diagram of optical center correction;
FIG. 6 is K1Fitting a curve;
FIG. 7 is a diagram of a multi-point K-value fit.
In the figure, 1, a base I; 2. a second base; 3. a sliding shaft; 4. a scale; 5. an underwater camera; 6. a servo motor; 7. a rotating shaft; 8. a calibration tray; 9. calibrating points; 10. a vertical rod; 11. a cross beam; 12. a slider; 13. a support bar; 14. a support; 15. an optical axis.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
The invention provides an image radial distortion correcting device of an underwater camera 5, which comprises a first base 1 and a second base 2 which are connected through a sliding shaft 3, wherein a scale 4 is arranged on the sliding shaft 3, as shown in figure 2. The base I1 and the base II 2 can move on the sliding shaft 3, and the distance between the two is adjusted. The distance between the two can be measured by means of the scale 4. But install the camera 5 under water that oscilaltion and left-right movement on base 1, install servo motor 6 on the base two 2, servo motor 6 connects calibration disk 8 through pivot 7, be provided with 5 calibration points 9 on the calibration disk 8, calibration point 9 is red emitting diode, 5 calibration point 9 evenly distributed is on crossing a radius of 8 centre of a circle B of calibration disk, 5 calibration point 9 is 80mm apart from the distance in the centre of a circle respectively, 160mm, 240mm, 320mm, 400 mm. The optical axis 15 of the underwater camera 5 is opposite to the calibration disc 8. The resolution of the return image of the underwater camera 5 is 800 x 600, with a focal length of 20 mm.
Specifically, two vertical rods 10 are installed on a base 1, a cross beam 11 is installed between the two vertical rods 10 through bolts, a sliding block 12 is installed on the cross beam 11, the underwater camera 5 is installed on the sliding block 12, the horizontal position of the underwater camera 5 on the cross beam 11 can be adjusted through adjusting the sliding block 12, and the height of the underwater camera 5 can be adjusted through adjusting the position of the cross beam 11 on the vertical rods 10.
The servo motor 6 is installed on the second base 2 through the supporting rod 13, the second base 2 is further provided with a support 14, an arc-shaped groove is formed in the upper end of the support 14, and the rotating shaft 7 is erected in the arc-shaped groove in the support 14. When the servo motor 6 rotates, the rotary shaft 7 can drive the calibration disc 8 to rotate around the center of a circle.
A method for correcting radial distortion of an image of an underwater camera 5 adopts the device for correcting radial distortion of an image of an underwater camera 5, as shown in FIG. 3, and comprises the following steps:
s1: adjusting the distance between the first base 1 and the second base 2 to enable the calibration disc 8 to completely appear in the visual field range of the underwater camera 5 in the rotating process, adjusting the position of the underwater camera 5 to enable an optical axis 15 of the underwater camera to be over against the circle center of the calibration disc 8, and then placing the correcting device under water;
s2: as shown in fig. 4, the plane M is a pixel plane of the underwater camera 5, i.e., a lens plane of the underwater camera 5, and a projection point on the plane is represented by a pixel coordinate; the plane N is the plane on which the surface of the calibration disc 8 lies, and the calibration points 9 on this plane are represented by camera coordinates. In fig. 4, O is the optical center of the underwater camera 5, a is the origin of pixel coordinates in the pixel plane, point B is the center of the calibration disk 8, point P is a calibration point 9 on the calibration disk 8,the corrected imaging point is p, which is the imaging point after the distortion occurs.
When the test is started, the servo motor 6 is controlled to enable the calibration point 9 on the calibration disc 8 to be in a position with the azimuth of 0 degrees, the first calibration point 9 is selected, the system automatically collects the pixel coordinates of the first calibration point, the pixel coordinates are converted into the coordinates of the underwater camera 5, and the correction proportion K of the calibration point 9 under the azimuth of 0 degrees is obtained through calculation1A value;
the method of converting the pixel coordinates to the coordinates of the underwater camera 5 is as follows:
the plane M is the pixel plane of the underwater camera 5, the plane N is the plane where the disc surface of the calibration disc 8 is located, O is the optical center of the underwater camera 5, A is the pixel coordinate origin in the pixel plane, B is the circle center of the calibration disc 8, P is a calibration point on the calibration disc 8,is an imaging point where the index point 9P is distorted, and P is a corrected imaging pointThe reduction point on the calibration disk 8 is a pointPoint of contactThe coordinates areImaging pointHas pixel coordinates ofThe transformation formula of the two is as follows:
wherein the content of the first and second substances,
wherein S is a scale factor representing the scaling of the image display;,referred to as an internal reference, respectively represent the transformation ratios from the coordinates of the underwater camera 5 in the x-direction and the y-direction to the pixel coordinates,C x ,C y the offset of the inside of the pixel coordinate system is the pixel offset of the first point at the upper left corner in the pixel plane translated to the x and y directions of the pixel coordinate origin A; dx represents the width of 1 pixel representation in the lateral direction of the image, dy represents the width of 1 pixel representation in the longitudinal direction of the image, O is the optical center of the underwater camera 5, a is the origin of pixel coordinates in the pixel plane,in order to be the focal length of the underwater camera 5,is the horizontal distance between the pixel plane of the underwater camera 5 and the calibration disk 8, M x N is the resolution of the image,represents rounding up;
the calculation formula of the correction proportion K value is as follows:
wherein the content of the first and second substances,the distance from the index point 9P to the center B,is a pointDistance to center B.
S3: the servo motor 6 is controlled by the system to rotate clockwise/counterclockwise for a certain angle, and the step S2 is repeated to obtain K of the index point 9 at the angle1A value; the process is cycled until the index point 9 returns to the 0 degree position, and a plurality of groups K of the index point 9 under different angles are obtained1The value is calculated, and K at the calibration point 9 is calculated by means of mean value fitting1Mean value;
s4: according to K1If the deviation is within the range of the set threshold value, the optical center correction is not needed, and if the deviation exceeds the set threshold value, the optical center correction is carried out;
the optical center correction method comprises the following steps:
(1) as shown in fig. 5, a pixel coordinate system XAY is established in the pixel plane, where a is the origin of the pixel coordinate, and when K is the maximum value, the farthest point from point a is the point in the projection trajectory of the calibration point 9P in the pixel coordinate system during rotation(ii) a When K takes the minimum value, the point closest to point A isPoint of contactPoint, pointPoint A and true optical center pointOn the same straight line, the real optical center is obtained by calculationHas the coordinates of;
If the four points are not collinear, the tangential distortion of the underwater camera lens is shown, the tangential distortion is the physical defect of the camera lens, and the underwater camera with the tangential distortion cannot be used for quantitative observation.
(2) Adjusting the position of the underwater camera 5 to adjust the projection of the centre of a circle B of the calibration disc 8 to the pixel coordinate systemA location;
(3) to Cx,CyThe values are modified as follows:
s5: selecting the second index point 9, repeating the steps S2-S4 to obtain K of the second index point 92Mean value; this process is repeated to obtain K for the nth index point 9nMean value; and performing fourth-order curve fitting on the K values of the n calibration points 9 to obtain an expression of a general curve K (D) in the pixel plane, wherein D is the distance from the imaging point to the pixel coordinate origin A.
In practice, the number of calibration points may be more than five, and the more calibration points, the more K values used for fitting, the easier it is to obtain a more accurate curve. When the calibration points are only five, the order of curve fitting should not be too large, and the order should be controlled to be 2-4. As the number of calibration points increases, the curve fitting order can be increased appropriately to obtain a better fitting result. The value range of the curve fitting abscissa is determined according to the image resolution of the underwater camera to be corrected, and if the resolution is M x N, the value range of D isE.g. an 800 x 600 resolution numerical image, of DThe value range is [0,500 ]]。
S6: the radial distortion correction is carried out on the underwater image shot by the underwater camera 5 by using a K (D) expression, and the correction method comprises the following steps:
a certain distortion point is defined by curve K (D)The initial pixel coordinates are converted into corrected pixel coordinates to form corrected pixel pointsThe calculation formula is as follows:
wherein
For the image with the resolution of M x N, all pixel points in the image are sequentially traversed from the pixel with the coordinate of (1,1), and new coordinates of all the pixel points are calculated through the formula (7)Newly building a basic image storage matrix, and then transferring the pixel content on the coordinate to the corrected new coordinate; and when all the points are traversed, the new matrix has points without pixel content, the points are filled in an interpolation mode, and then a new corrected image is formed by cutting.
Example 1
As shown in fig. 2, the underwater camera to be calibrated is fixed on the slide block by bolts. The resolution of the return image of the underwater camera is 800 x 600, and the focal length is 20 mm. On the calibration disc, the positions which are respectively 80mm, 160mm, 240mm, 320mm and 400mm away from the circle center B of the calibration disc are respectively provided with 1 red light as a calibration point, 5 calibration points are collinear with the circle center of the calibration disc, and the red light needs to work underwater. And reading the reading of the scale at the same time through the sliding of the sliding shaft to adjust the position of the first base, so that the horizontal distance between the lens plane of the underwater camera to be corrected and the plane of the calibration disc is 430 mm. The optical axis of the underwater camera to be corrected is enabled to be opposite to the circle center B of the calibration disc through the positions of the sliding block and the cross beam, namely the circle center of the calibration disc is located at the (400,300) coordinate position in the image. The entire device was placed in water.
The test is started, the connecting line of the calibration points on the calibration disc is at the position of 0 degree in the azimuth, the red light of the calibration point 80mm away from the circle center is lighted, the system automatically acquires the pixel coordinates of the calibration point as (400,248), and the pixel coordinates are converted into the coordinates of the camera by the formula (1): firstly, the coordinates of the origin of coordinates at the center of the image are converted into (0,52), and then the coordinates of the camera at the calibration disk corresponding to the point are calculated to be (0,78) by the formulas (2) and (3), so that the K value of the point with the distance of 80mm at the azimuth of 0 DEG is 1.025. The system records the point orientation 0 °, the point pixel coordinates (0,52), and the point K value 1.025 in a buffer. The system controls the servo motor to rotate 1 degree clockwise, and records the data of the index point at 1 degree of azimuth through the process. The process is circulated until the connection line orientation of the calibration points returns to the 0 degree position, and 360 groups of data corresponding to the calibration points from 0 degree to 359 degrees can be obtained. The system calculates K of the point set at the calibration point (distance is 80 mm) by mean fitting according to the mode of FIG. 61The mean value is 1.02 (shown by the dotted line). In fig. 6, the abscissa indicates the orientation of the index point, and the ordinate indicates the orientation corresponding to each orientation K1The magnitude of the value. As can be seen from FIG. 6, K1The values will fluctuate slightly in the 0 to 360 azimuth, which is caused by errors. The K can be calculated by means of a weighted mean1Fitting of the value curve K1Values characterizing a satisfied distance in the underwater camera pixel coordinate system asThe exact K value of the point set of (a). Obtaining K according to the relation between the K value and the direction1The deviation of the maximum value and the minimum value is not large, so that the underwater camera lens is proved to have no optical center deviation and does not need to be corrected.
From the above-mentioned processesK for the first index point (80 mm) is obtained1The value is 1.02, the red light is turned off, a second calibration point red light which is 160mm away from the center of the calibration disc is turned on, and the calibration process of 0-359 degrees is repeated to obtain the K of the second calibration point (160 mm)2The mean value was 1.05. Repeating the above steps in sequence to obtain a third calibration point (240 mm) K3Mean value 1.15, fourth calibration point (320 mm) K4Mean value 1.3, fifth calibration point (400 mm) K5The mean value is 1.5. The system performs a fourth-order curve fitting through six points (0,0), (80,1.02), (160,1.05), (240,1.15), (320,1.3), (400,1.5) to obtain a general K value curve K (D) in a pixel plane, wherein the polynomial is as follows:
the fitted curve is shown in fig. 7, the abscissa represents the distance D of the imaging point from the pixel coordinate origin a in pixels (pixels), and the ordinate represents the K value. K0The value of K at the origin is shown, when D =0, namely, the value of K projected at the origin is 1, which indicates that there is no distortion; k1To K5The K values correspond to five calibration points respectively, and as can be seen from fig. 7, the K values increase nonlinearly with the increase of D, which is consistent with the radial distortion trend of the underwater camera. By curve fitting, a curve K (D) can be obtained, which represents the K value at any point in the interval D from 0 to 500. By fitting the curve K (D) and the curve D, any point in the whole image range can be easily calculatedK value of (3).
And completing the calibration of the radial distortion of the underwater camera.
When the underwater camera is used, an image with the resolution of 800 x 600 is shot, the distance D =499pixel between the point and a central point (400,300) is calculated by the formula (8) from the first pixel (1,1) at the upper left corner, the value K of the point is 1.72 by the expression (K) (D), the corrected coordinate of the point is (-286, -214) is calculated by the formula (7) and represents the pixel coordinate where the corrected pixel point (1,1) is located, and the system automatically transfers the image information of the point to a new image matrix. Since K >1 the image is stretched after distortion correction and the resolution is increased. The system generates a new image matrix by traversing all pixel points of the image in the above mode, and inserts image information into unfilled matrix units in an interpolation mode, so as to generate a corrected image. The image can correctly reflect the projection information of the real position of the underwater object, and can be used for quantitative measurement of the position of the underwater object.
Example 2
As shown in fig. 2, the underwater camera to be calibrated is fixed on the slide block by bolts. The resolution of the return image of the underwater camera is 800 x 600, and the focal length is 20 mm. On the calibration disc, the positions which are respectively 80mm, 160mm, 240mm, 320mm and 400mm away from the circle center B of the calibration disc are respectively provided with 1 red light as a calibration point, 5 calibration points are collinear with the circle center of the calibration disc, and the red lights need to work underwater. And reading the reading of the scale at the same time through the sliding of the sliding shaft to adjust the position of the first base, so that the horizontal distance between the lens plane of the underwater camera to be corrected and the plane of the calibration disc is 430 mm. The optical axis of the underwater camera to be corrected is enabled to be opposite to the circle center B of the calibration disc through the positions of the sliding block and the cross beam, namely the circle center of the calibration disc is located at the (400,300) coordinate position in the image. The entire device was placed in water.
The test is started, the connecting line of the calibration points on the calibration disc is at the position of 0 degree in the azimuth, the red light of the calibration point 80mm away from the circle center is lighted, the system automatically acquires the pixel coordinates of the calibration point as (400,248), and the pixel coordinates are converted into the coordinates of the camera by the formula (1): firstly, the coordinates of the origin of coordinates at the center of the image are converted into (0,52), and then the coordinates of the camera at the calibration disk corresponding to the point are calculated to be (0,78) by the formulas (2) and (3), so that the K value of the point with the distance of 80mm at the azimuth of 0 DEG is 1.025. The system records the point orientation 0 °, the point pixel coordinates (0,52), and the point K value 1.025 in a buffer. The system controls the servo motor to rotate 1 degree clockwise, and records the data of the index point at 1 degree of azimuth through the process. The process is circulated until the connection line orientation of the calibration point returns to the 0 degree position, and 360 groups of data corresponding to the calibration points of 0 degree to 359 degrees can be obtained. The system passes through in the manner of fig. 6Calculating K of the point set at the calibration point (with the distance of 80 mm) by means of mean value fitting1The mean value is 1.02. Obtaining K according to the relation between the K value and the direction1The deviation of the maximum value and the minimum value is not large, so that the underwater camera lens is proved to have no optical center deviation and does not need to be corrected.
K of the first index point (80 mm) is obtained by the above process1The value is 1.02, the red light is turned off, a second calibration point red light which is 160mm away from the center of the calibration disc is turned on, and the calibration process of 0-359 degrees is repeated to obtain the K of the second calibration point (160 mm)2The mean value was 1.05. Repeating the above steps in sequence to obtain a third calibration point (240 mm) K3Mean value 1.15, fourth calibration point (320 mm) K4Mean value 1.3, but K4The maximum value of the value curve is 1.35 and the minimum value is 1.27, when D is calculated to be 213 and the optical centre shift threshold 10/D =0.047, so K4The value maximum offset 0.05 exceeds the threshold 0.047, so there is an optical center offset. By querying K4Maximum point of value curveHas the coordinate of (254,410), the minimum value pointIs determined by calculation (570,173)Andthe connecting line passes through the point O, so that the optical center deviation is not the tangential distortion, and the optical center correction can be carried out. By passing,C is obtained by calculating coordinates and equations (5) and (6)xCorrection value 412, CyCorrectionThe value is 291. According to new Cx,CyRe-calibrating the fourth calibration point to obtain K4The average value of the distance is 1.31, the maximum value is 1.32, and the minimum value is 1.29, which proves that the optical center of the underwater camera lens at the distance is corrected completely without optical center deviation. Continued use of Cx,CyCalibrating a fifth calibration point, the fifth calibration point (400 mm) K5The mean value was 1.5. The system performs four-order curve fitting through six points (0,0), (80,1.02), (160,1.05), (240,1.15), (320,1.31) and (400,1.5) to obtain a general K value curve K (D) polynomial in a pixel plane, wherein the general K value curve K (D) polynomial is as follows:
and completing the calibration of the radial distortion of the underwater camera.
When the underwater camera is used, an image with the resolution of 800 × 600 is shot, the distance D =504pixel between the point and a central point (412,291) is calculated by an expression (8) from the first pixel (1,1) at the upper left corner, the value K of the point is 1.73 by an expression (K) (D) expression (10), the corrected coordinate of the point is calculated by an expression (7) and is (-299, -210), the coordinate represents the pixel coordinate where the corrected pixel point (1,1) is located, and the system automatically transfers the image information of the point to a new image matrix. Since K >1 the image is stretched after distortion correction and the resolution is increased.
The system generates a new image matrix by traversing all pixel points of the image in the above mode, and inserts image information into unfilled matrix units in an interpolation mode, so as to generate a corrected image. The image can correctly reflect the projection information of the real position of the underwater object, and can be used for quantitative measurement of the position of the underwater object.
The calibration process of the device and the method for correcting the radial distortion of the image of the underwater camera is finished in water. Because the components of the correcting device can be found in the type which can be used underwater, the assembly and the realization difficulty do not exist. The image algorithm used by the device and the method comprises the steps of identifying the calibration point according to the image content, obtaining the pixel coordinate of the point, and traversing, interpolating and cutting image pixel points which are common computer image processing methods, and has no difficulty in the system implementation process. The device and the method are also suitable for correcting the radial distortion of the camera used in the air, the radial distortion correcting process of the camera used in the air is completely the same as that of the underwater camera, and the correcting process needs to be completed in the air.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. The utility model provides a radial distortion correcting unit of camera image under water, its characterized in that includes base one and base two through the slip hub connection, but install the camera under water that oscilaltion and left-right removal on the base one, install servo motor on the base two, servo motor passes through the pivot and connects the calibration disc, be provided with a plurality of calibration points on the calibration disc, a plurality of calibration points evenly distributed is on crossing a radius of calibration disc centre of a circle, the camera under water is just to the calibration disc.
2. The device for correcting radial distortion of images of an underwater camera according to claim 1, wherein two vertical rods are mounted on the first base, a cross beam is mounted between the two vertical rods through bolts, a sliding block is mounted on the cross beam, and the underwater camera is mounted on the sliding block.
3. The device for correcting radial distortion of an image of an underwater camera according to claim 1, wherein the servo motor is mounted on the second base through a support rod, a support is further arranged on the second base, and the rotating shaft is erected on the support.
4. The device for correcting radial distortion of an underwater camera image according to claim 1, wherein a scale is provided on the sliding shaft.
5. An underwater camera image radial distortion correction method using the underwater camera image radial distortion correction apparatus according to claim 1, characterized by comprising the steps of:
s1: adjusting the distance between the first base and the second base to enable the calibration disc to completely appear in the visual field range of the underwater camera in the rotating process, adjusting the position of the underwater camera to enable the optical axis of the underwater camera to be over against the circle center of the calibration disc, and then placing the correction device under water;
s2: when the test is started, the servo motor is controlled to enable the connecting line of the calibration points on the calibration disc to be located at the position of 0 degree in the azimuth, the first calibration point is selected, the system automatically collects the pixel coordinates of the first calibration point, the pixel coordinates are converted into the coordinates of the underwater camera, and the correction proportion K of the calibration point under the position of 0 degree is obtained through calculation1A value;
s3: the servo motor is controlled by the system to rotate a certain angle clockwise/anticlockwise, the step S2 is repeated, and K of the index point under the angle is obtained1A value; the process is circulated until the calibration point returns to the 0 DEG position, and a plurality of groups of K of the calibration point under different angles are obtained1Value and calculating K at the calibration point by mean fitting1Mean value;
s4: according to K1If the deviation is within the range of the set threshold value, the optical center correction is not needed, and if the deviation exceeds the set threshold value, the optical center correction is carried out;
s5: selecting a second index point, repeating steps S2-S4 to obtain K of the second index point2Mean value; repeating the process to obtain K of the nth calibration pointnMean value; performing curve fitting on the K values of the n calibration points to obtain an expression of a general curve K (D) in the pixel plane, wherein D is the distance between an imaging point and the origin of pixel coordinates ASeparating;
s6: and performing radial distortion correction on the underwater image shot by the underwater camera by using a K (D) expression.
6. The method for correcting radial distortion of an underwater camera image according to claim 5, wherein the method for converting pixel coordinates into underwater camera coordinates in step S2 is as follows:
the plane M is a pixel plane of the underwater camera, the plane N is a plane where the surface of the calibration disc is located, O is the optical center of the underwater camera, A is the origin of pixel coordinates in the pixel plane, B is the center of the calibration disc, P is a calibration point on the calibration disc,an imaging point with the calibration point P distorted, and P is a corrected imaging pointThe reduction point on the calibration disk is a pointPoint of contactThe coordinates areImaging pointHas pixel coordinates ofThe transformation formula of the two is as follows:
wherein the content of the first and second substances,
wherein S is a scale factor representing the scaling of the image display;,referred to as an internal reference, respectively represent the transformation ratios from the coordinates of the underwater camera in the x-direction and the y-direction to the coordinates of the pixels,C x ,C y the offset of the inside of the pixel coordinate system is the pixel offset of the first point at the upper left corner in the pixel plane translated to the x and y directions of the pixel coordinate origin A; dx represents the width of the image expressed by 1 pixel in the horizontal direction, dy represents the width of the image expressed by 1 pixel in the vertical direction, O is the optical center of the underwater camera, a is the origin of pixel coordinates in the pixel plane,is the focal length of the underwater camera and,is the horizontal distance between the underwater camera pixel plane and the calibration disc, M N is the resolution of the image,represents rounding up;
7. the method for correcting radial distortion of an underwater camera image as claimed in claim 6, wherein in step S2, the calculation formula of the correction ratio K value is as follows:
8. The method for correcting radial distortion of an underwater camera image according to claim 6, wherein the optical center correction method of step S4 is as follows:
(1) establishing a pixel coordinate system XAY in a pixel plane, wherein A is the origin of the pixel coordinate, and the farthest point from the point A is the point when K is the maximum value in the projection track of the calibration point P under the pixel coordinate system in the rotation process(ii) a When K is minimizedAt the value, the point closest to point A isPoint of contactPoint, pointPoint A and true optical center pointOn the same straight line, the real optical center is obtained by calculationHas the coordinates of;
(2) Adjusting the position of the underwater camera to adjust the projection of the centre B of the calibration disc to the pixel coordinate systemA location;
(3) to Cx,CyThe values are modified as follows:
9. the method for correcting radial distortion of an underwater camera image according to claim 5, wherein in step S6, the distortion correction is realized through curve k (d) as follows:
a certain distortion point is shown by curve K (D)The initial pixel coordinates are converted into corrected pixel coordinates to form corrected pixel pointsThe calculation formula is as follows:
wherein
For the image with the resolution of M x N, all pixel points in the image are sequentially traversed from the pixel with the coordinate of (1,1), and new coordinates of all the pixel points are calculated through the formula (7)Newly building a basic image storage matrix, and then transferring the pixel content on the coordinate to the corrected new coordinate; and when all the points are traversed, the new matrix has points without pixel content, the points are filled in an interpolation mode, and then a new corrected image is formed by cutting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210541076.XA CN114640781B (en) | 2022-05-19 | 2022-05-19 | Underwater camera image radial distortion correction device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210541076.XA CN114640781B (en) | 2022-05-19 | 2022-05-19 | Underwater camera image radial distortion correction device and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114640781A true CN114640781A (en) | 2022-06-17 |
CN114640781B CN114640781B (en) | 2022-08-23 |
Family
ID=81953384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210541076.XA Active CN114640781B (en) | 2022-05-19 | 2022-05-19 | Underwater camera image radial distortion correction device and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114640781B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016070318A1 (en) * | 2014-11-04 | 2016-05-12 | SZ DJI Technology Co., Ltd. | Camera calibration |
CN105678742A (en) * | 2015-12-29 | 2016-06-15 | 哈尔滨工业大学深圳研究生院 | Underwater camera calibration method |
CN109040741A (en) * | 2018-06-15 | 2018-12-18 | 上海应用技术大学 | A kind of calibration and test device and method for NI Vision Builder for Automated Inspection |
CN110033491A (en) * | 2019-04-15 | 2019-07-19 | 南京工程学院 | A kind of camera calibration method |
CN110807815A (en) * | 2019-10-30 | 2020-02-18 | 扬州大学 | Rapid underwater calibration method based on two groups of mutually orthogonal parallel lines corresponding vanishing points |
WO2020235110A1 (en) * | 2019-05-23 | 2020-11-26 | 株式会社ソニー・インタラクティブエンタテインメント | Calibration device, chart for calibration, and calibration method |
CN113137920A (en) * | 2021-05-19 | 2021-07-20 | 重庆大学 | Underwater measurement equipment and underwater measurement method |
CN113960564A (en) * | 2021-09-17 | 2022-01-21 | 上海大学 | Laser comprehensive reference system for underwater detection and distance measurement and calibration method |
CN114326258A (en) * | 2020-09-25 | 2022-04-12 | 山东省科学院海洋仪器仪表研究所 | Underwater camera device and adjusting method thereof |
-
2022
- 2022-05-19 CN CN202210541076.XA patent/CN114640781B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016070318A1 (en) * | 2014-11-04 | 2016-05-12 | SZ DJI Technology Co., Ltd. | Camera calibration |
CN105981074A (en) * | 2014-11-04 | 2016-09-28 | 深圳市大疆创新科技有限公司 | Camera calibration |
US20170221226A1 (en) * | 2014-11-04 | 2017-08-03 | SZ DJI Technology Co., Ltd. | Camera calibration |
CN105678742A (en) * | 2015-12-29 | 2016-06-15 | 哈尔滨工业大学深圳研究生院 | Underwater camera calibration method |
CN109040741A (en) * | 2018-06-15 | 2018-12-18 | 上海应用技术大学 | A kind of calibration and test device and method for NI Vision Builder for Automated Inspection |
CN110033491A (en) * | 2019-04-15 | 2019-07-19 | 南京工程学院 | A kind of camera calibration method |
WO2020235110A1 (en) * | 2019-05-23 | 2020-11-26 | 株式会社ソニー・インタラクティブエンタテインメント | Calibration device, chart for calibration, and calibration method |
CN110807815A (en) * | 2019-10-30 | 2020-02-18 | 扬州大学 | Rapid underwater calibration method based on two groups of mutually orthogonal parallel lines corresponding vanishing points |
CN114326258A (en) * | 2020-09-25 | 2022-04-12 | 山东省科学院海洋仪器仪表研究所 | Underwater camera device and adjusting method thereof |
CN113137920A (en) * | 2021-05-19 | 2021-07-20 | 重庆大学 | Underwater measurement equipment and underwater measurement method |
CN113960564A (en) * | 2021-09-17 | 2022-01-21 | 上海大学 | Laser comprehensive reference system for underwater detection and distance measurement and calibration method |
Non-Patent Citations (4)
Title |
---|
LONGXIANG HUANG等: "Underwater camera model and its use in calibration", 《2015 IEEE INTERNATIONAL CONFERENCE ON INFORMATION AND AUTOMATION》 * |
张阳等: "水下视觉SLAM相机成像畸变纠正研究", 《海洋技术学报》 * |
李永龙等: "水电枢纽水下摄像数据的畸变机理及标定研究", 《自动化与仪表》 * |
李洪生: "水下摄像机标定技术的研究", 《中国优秀硕士学位论文全文数据库》 * |
Also Published As
Publication number | Publication date |
---|---|
CN114640781B (en) | 2022-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109598762B (en) | High-precision binocular camera calibration method | |
CN111486802B (en) | Rotating shaft calibration method based on self-adaptive distance weighting | |
CN106296711A (en) | A kind of multiaxis active alignment method of mobile phone camera module | |
CN106157246A (en) | A kind of full automatic quick cylinder panoramic image joining method | |
CN112254663B (en) | Plane deformation monitoring and measuring method and system based on image recognition | |
CN109934878A (en) | A kind of linear calibration's system and method based on camera coordinates system | |
CN114283203B (en) | Calibration method and system of multi-camera system | |
CN113205603A (en) | Three-dimensional point cloud splicing reconstruction method based on rotating platform | |
CN112927133B (en) | Image space projection splicing method based on integrated calibration parameters | |
CN112381847A (en) | Pipeline end head space pose measuring method and system | |
CN115187612A (en) | Plane area measuring method, device and system based on machine vision | |
CN114359405A (en) | Calibration method of off-axis Samm 3D line laser camera | |
CN112598747A (en) | Combined calibration method for monocular camera and projector | |
CN114279324B (en) | All-dimensional intelligent detection method for appearance quality of prefabricated part | |
CN209820422U (en) | Lens distortion calibration turntable device based on four-quadrant boundary | |
CN114792345A (en) | Calibration method based on monocular structured light system | |
CN114640781B (en) | Underwater camera image radial distortion correction device and method | |
CN116957943B (en) | Microscope stitching calibration method based on image fusion | |
CN107976146B (en) | Self-calibration method and measurement method of linear array CCD camera | |
CN113409395B (en) | High-precision detection and positioning method for catheter end | |
CN108898585B (en) | Shaft part detection method and device | |
CN111964604B (en) | Plane deformation monitoring and measuring method based on image recognition | |
CN112489141B (en) | Production line calibration method and device for single-board single-image strip relay lens of vehicle-mounted camera | |
CN115482276A (en) | High-precision calibration method based on phase shift deflection measurement system | |
CN111968182B (en) | Calibration method for nonlinear model parameters of binocular camera |
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 |