A joint calibration method for camera and turntable
By establishing a three-dimensional coordinate system and calculating the degree of image offset, similar images are screened and adaptively enhanced, which solves image quality problems caused by uneven illumination and improves the accuracy of joint calibration of the camera and turntable.
Patent Information
- Application Number
- CN202410895776.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-05
AI Technical Summary
During the joint calibration process of the camera and the turntable, the calibration plate image quality is poor due to uneven illumination, which affects the accuracy of subsequent calibration. The traditional enhancement algorithm may cause excessive or insufficient local enhancement.
By acquiring images of the turntable in different postures, a three-dimensional coordinate system is established, the coordinate offset between images and the influence of multi-directional offsets are calculated, similar images are screened, areas are divided according to the degree of grayscale change of pixels, and adaptive histogram is used Graph equalization algorithm for image enhancement.
The image quality of the calibration plate is improved, the accuracy of the subsequent joint calibration of the camera and the turntable is enhanced, and the possible excessive enhancement problem of the traditional method is avoided.
Smart Images

Figure CN118429445B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a joint calibration method of a camera and a turntable. Background Art
[0002] At present, the joint calibration of camera and turntable is mainly used to determine the geometric relationship between camera and turntable and their internal parameters to achieve accurate visual measurement and positioning tasks. It has important applications in the fields of industrial vision and computer vision. Through joint calibration, the internal parameters of the camera, such as focal length, principal point position, distortion coefficient, and the external geometric relationship such as relative position and posture between the camera and turntable can be determined, thereby achieving accurate three-dimensional measurement, visual navigation, robot vision and other applications. With the development of technologies such as automated manufacturing, unmanned driving, and augmented reality, the demand for accurate visual positioning and measurement is increasing, and the joint calibration of turntable and camera has become one of the key technologies to achieve these needs.
[0003] In the process of joint calibration of the camera and the turntable, the position of the turntable at different rotation angles is usually obtained by adjusting the turntable's posture, and then the calibration plate images at different angles are obtained through the camera. When the turntable rotates, the position and direction of the calibration plate in the camera's field of view will change relative to the light source. Therefore, the adjustment of the turntable's posture will change the illumination angle of the light source relative to the calibration plate, so that some parts of the calibration plate receive more or less light, resulting in uneven lighting. Therefore, there are differences in the light of the calibration plate images obtained under different postures, resulting in poor quality of the collected calibration plate images. In the current initial stage, the image quality of the calibrated object is poor, which will have a negative impact on the accuracy of subsequent calibration. When enhancing the image to eliminate the negative impact, the traditional enhancement algorithm performs global processing on the image, resulting in excessive or insufficient local enhancement. Summary of the invention
[0004] The invention provides a joint calibration method of a camera and a turntable to solve the existing problems.
[0005] A joint calibration method of a camera and a turntable of the present invention adopts the following technical solution:
[0006] An embodiment of the present invention provides a joint calibration method of a camera and a turntable, the method comprising the following steps:
[0007] Acquire the images of the calibration plate of the turntable in different postures, establish a three-dimensional coordinate system with the initial posture of the turntable, and obtain the turntable angle in the x direction, the turntable angle in the y direction, and the turntable angle in the z direction of each calibration plate image;
[0008] According to the turntable angle difference between each image and other images in the same direction, the turntable coordinate offset degree of each image and other images is obtained; according to the turntable angle difference between each image and other images in multiple directions, the multi-directional offset influence degree of each image and other images is obtained; according to the turntable coordinate offset degree between each image and other images and the multi-directional offset influence degree, the proximity degree of the turntable coordinate offset between each image and other images is obtained, and further all similar images of each image are obtained;
[0009] According to the proximity of the turntable coordinate offset between each image and similar images and the grayscale change of the pixel at the same position, the grayscale change degree of each pixel in each image is obtained;
[0010] According to the grayscale change degree of each pixel in each image, each image is divided into several regions, and image enhancement is performed on all regions of each image to obtain the enhanced image, completing the joint calibration of the camera and the turntable.
[0011] Furthermore, establishing a three-dimensional coordinate system with the initial posture of the turntable includes:
[0012] A three-dimensional coordinate system is constructed with the spatial angle under the initialization posture of the turntable as the coordinate axis, wherein a rectangular plane coordinate system is constructed in the horizontal plane direction of the turntable as the x-axis and y-axis, and the vertical upward direction perpendicular to the horizontal plane of the turntable is used as the z-axis of the turntable.
[0013] Furthermore, obtaining the turntable coordinate offset degree between each image and other images includes:
[0014] For the calibration plate image The image and Image, The image and The calculation formula for the turntable coordinate offset of an image is:
[0015]
[0016] in, Indicates The image and The degree of turntable coordinate offset of the image; Indicates The image and Image Difference in direction turntable angle; Indicates The image and Image Difference in direction turntable angle; Indicates The image and Image Difference in direction turntable angle; represents the absolute value function.
[0017] Furthermore, obtaining the multi-directional offset influence degree of each image on other images includes:
[0018] No. The image and The calculation formula for the influence degree of multi-directional offset of an image is:
[0019]
[0020] in, Indicates The image and The degree of influence of multi-directional offset of an image; Indicates The image and The image is Difference in direction turntable angle; Indicates The image and The image turntable is The average of the differences in the turntable angles in the other two directions outside the direction; represents the linear normalization function; represents the absolute value function; for All directions are within the x, y, and z directions. The maximum value in The function is a maximum value function; Represents the x, y, and z directions of a three-dimensional coordinate system.
[0021] Furthermore, the obtaining of the proximity of the turntable coordinate offsets of each image to other images includes:
[0022] The product of the turntable coordinate offset degree of each image and the multi-directional offset influence degree is normalized, and the normalized result is recorded as the proximity degree of the turntable coordinate offset of each image and other images.
[0023] Furthermore, the obtaining of all similar images of each image includes:
[0024] When The image and When the proximity of the turntable coordinate offset of the first image is greater than or equal to the preset proximity threshold, the The image is recorded as Similar images to the previous image.
[0025] Furthermore, obtaining the grayscale change degree of each pixel in each image includes:
[0026] No. In the image The grayscale change of each pixel:
[0027]
[0028] in, Indicates In the image The grayscale change degree of each pixel; Indicates The image and The consistency index of similar images; Indicates The image and of similar images The grayscale change of each pixel; Indicates The number of similar images to an image.
[0029] Furthermore, the specific method for obtaining the consistency index is:
[0030] The first The image and The ratio of the proximity of the turntable coordinate offset of the first similar image to the proximity of the turntable coordinate offset of all similar images is recorded as The image and The consistency index of similar images.
[0031] Furthermore, the specific method for obtaining the grayscale variation is:
[0032] The first In the image The gray value of the pixel is of similar images The absolute value of the difference in the grayscale values of pixels is recorded as The image and of similar images The grayscale change of each pixel.
[0033] Furthermore, each image is divided into a plurality of regions according to the grayscale variation degree of each pixel in each image, and image enhancement is performed on all regions of each image to obtain an enhanced image, and the joint calibration of the camera and the turntable is completed, including:
[0034] According to the grayscale change degree of each pixel in each image, several initial seed points are preset for each image, and all initial seed points are grown by the region growing algorithm to divide each image into several regions; Adaptive histogram equalization algorithm is used to enhance the image in all regions of the image to obtain the enhanced image, and the enhanced image and the turntable are calibrated in three dimensions using Zhang-style calibration method.
[0035] The beneficial effects of the technical solution of the present invention are as follows: obtaining images of the calibration plate of the turntable in different postures, establishing a three-dimensional coordinate system with the initial posture of the turntable, and obtaining the turntable angles in the x, y, and z directions of each calibration plate image; obtaining the degree of turntable coordinate offset of each image and other images and the degree of influence of multi-directional offset, obtaining the proximity of the turntable coordinate offset, and then obtaining all similar images of each image. Since images with a deflection angle that is too large from the current image have no reference value to the current image and do not affect it, it is necessary to calculate the proximity of the turntable coordinate offsets of the current image and other images, and filter out images that are close to the current image. The closer they are, the higher the similarity. According to the proximity of the turntable coordinate offset between each image and similar images and the grayscale change of the pixel at the same position, the grayscale change degree of each pixel in each image is obtained, the purpose is to distinguish the different areas of the calibration plate image caused by the illumination and the different postures of the turntable, and then the different areas can be enhanced adaptively; according to the grayscale change degree of each pixel in each image, each image is divided into several areas, and all areas of each image are enhanced to obtain the enhanced image, complete the joint calibration of the camera and the turntable, and determine each area in each image, in order to avoid the problems of excessive enhancement that may occur when the traditional histogram is enhanced. The present invention aims to improve the quality of the calibration plate image and improve the accuracy of the subsequent joint calibration of the camera and the turntable. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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 work.
[0037] Figure 1 The present invention is a flowchart of the steps of a joint calibration method of a camera and a turntable. DETAILED DESCRIPTION
[0038] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the joint calibration method of a camera and a turntable proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0039] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0040] The specific scheme of the joint calibration method of a camera and a turntable provided by the present invention is described in detail below with reference to the accompanying drawings.
[0041] See also Figure 1 , which shows a flowchart of a method for joint calibration of a camera and a turntable provided by an embodiment of the present invention, the method comprising the following steps:
[0042] Step S001, obtain images of the calibration plate with a turntable in different postures, establish a three-dimensional coordinate system with the initial posture of the turntable, and obtain the turntable angle in the x direction, the turntable angle in the y direction, and the turntable angle in the z direction of each calibration plate image.
[0043] A three-dimensional coordinate system is constructed with the spatial angle under the initialization posture of the turntable as the coordinate axis, wherein a rectangular plane coordinate system is constructed in the horizontal plane direction of the turntable as the x-axis and y-axis, and the vertical upward direction perpendicular to the horizontal plane of the turntable is used as the z-axis of the turntable. By adjusting the turntable to different postures, the calibration plate images under different postures are collected by the camera, and the x-direction turntable angle, y-direction turntable angle and z-direction turntable angle of each calibration plate image are obtained in combination with the three-dimensional coordinate system. It should be noted that the calibration plate image collected in this embodiment is a grayscale image after the camera capture image is grayscaled, wherein the grayscale processing is a known technology, and this embodiment implements grayscale with an existing weighted grayscale algorithm.
[0044] Step S002: Obtain the degree of turntable coordinate offset between each image and other images according to the turntable angle difference between each image and other images in the same direction; obtain the degree of multi-directional offset influence between each image and other images according to the turntable angle difference between each image and other images in multiple directions; obtain the degree of proximity of turntable coordinate offset between each image and other images according to the turntable coordinate offset degree between each image and other images and the degree of multi-directional offset influence, and further obtain all similar images of each image.
[0045] It should be noted that in the joint calibration process of the camera and the turntable, the turntable posture is adjusted to obtain calibration plate images of multiple angles. According to the calibration plate images obtained by the turntable at different postures, similar turntable postures correspond to similar camera shooting angles. Since the calibration plate is fixed, the calibration plate images under similar postures have certain similarities. For the calibration plate images, each calibration plate image corresponds to a specific turntable angle. The closer the turntable angles of different calibration plate images are, the more similar their turntable postures are, and the more similar the calibration plate image characteristics presented are. Therefore, when analyzing each calibration plate image, the turntable angles of each calibration plate image and other images can be analyzed to obtain the proximity of the turntable angles of each calibration plate image and other images.
[0046] For the calibration plate image The image and Image, The image and The calculation formula for the turntable coordinate offset of an image is:
[0047]
[0048] in, Indicates The image and The degree of turntable coordinate offset of the image; Indicates The image and Image Difference in direction turntable angle; Indicates The image and Image Difference in direction turntable angle; Indicates The image and Image Difference in direction turntable angle; represents the absolute value function.
[0049] It should be further explained that, in the three-dimensional angle analysis, the multi-directional offset of the turntable may cause complex rotation and deformation of the projection of the calibration plate in the image, so the degree of turntable coordinate offset cannot directly reflect the proximity of the turntable between the calibration plate images. Multi-directional offset may also introduce more complex lighting changes. Since different parts of the calibration plate will be in different lighting conditions under different turntable postures, there will be certain differences in the grayscale balance of the calibration plate in the captured image, affecting the overall grayscale balance of the calibration plate image. Therefore, in addition to measuring the approximation of the calibration plate image by the degree of turntable coordinate offset corresponding to the calibration plate image, this embodiment also measures the impact of the multi-directional offset of the turntable corresponding to the calibration plate image on the result.
[0050] No. The image and The calculation formula for the influence degree of multi-directional offset of an image is:
[0051]
[0052] in, Indicates The image and The degree of influence of multi-directional offset of an image; Indicates The image and The image is Difference in direction turntable angle; Indicates The image and The image turntable is The average of the differences in the turntable angles in the other two directions outside the direction; Represents a linear normalization function that normalizes the data value to within the interval; represents the absolute value function; for All directions are within the x, y, and z directions. The maximum value in The function is a maximum value function; Represents the x, y, and z directions of a three-dimensional coordinate system.
[0053] Indicates The image and The image turntable is The larger the value, the greater the deviation in the direction. The image and The image turntable is The more obvious the deviation in the direction, the more obvious the deviation in the direction. The formula performs a reverse analysis, which aims to evaluate the impact of multi-directional deviations to reveal the significance of the deviation in a single direction. A significant deviation in a single direction indicates that the overall deviation trend is unbalanced. By analyzing the direction of the turntable on the x, y, and z axes, the deviation significance of each direction is evaluated; in the analysis of the direction on the x, y, and z axes, the current direction is compared with the other two directions. If The larger the value, the smaller the sum of the angle differences in the other two directions and their difference approaches zero, indicating that the deviation in the current direction is more significant. function to select the maximum value of the offset significance in the x, y, and z directions, using The function normalizes the maximum shift significance as the first The image and The maximum value is small, which indicates that the multi-directional offset equalization has a greater impact.
[0054] For The image and The product of the turntable coordinate offset of the image and the multi-directional offset influence is normalized, and the normalized result is recorded as The image and The proximity of the turntable coordinate offsets of the two images.
[0055] The proximity threshold preset in this embodiment , which is described as an example, can be set to other values in other implementations, and this embodiment does not limit it. The image and The proximity of the turntable coordinate offset of the image is greater than or equal to the preset proximity threshold , explain The turntable posture of the first image is the same as the The turntable posture of the first image is similar; The image is recorded as Similarly, we can obtain the similar images of the first image. All similar images of an image constitute the A set of similar images to an image.
[0056] At this point, a set of similar images for each image is obtained.
[0057] Step S003: Obtain the grayscale change degree of each pixel in each image according to the proximity of the turntable coordinate offset between each image and similar images and the grayscale change of the pixel at the same position.
[0058] It should be noted that, through the above steps, each image is analyzed to determine the image set with similar turntable posture. Since the turntable coordinate offset of the images in the image set is small, they have highly consistent turntable angles under similar lighting conditions. Through similarity analysis, the common areas in the image set under the current lighting environment are determined, indicating that the turntable angles corresponding to the images in the image set are highly similar. Even if there are slight lighting changes, the grayscale changes of the images in the image set are relatively consistent; on the other hand, the difference analysis helps determine the individual areas of the image set under the current lighting environment. Although the images in the image set have similar turntable angles, the grayscale changes of each image in the image set are still quite different.
[0059] Specifically, according to The grayscale change of the pixel at the same position in the first image and each similar image can be obtained. In the image The grayscale change of each pixel:
[0060]
[0061] in, Indicates In the image The grayscale change degree of each pixel; Indicates The image and The consistency index of similar images is obtained by: The image and The ratio of the proximity of the turntable coordinate offset of the first similar image to the proximity of the turntable coordinate offset of all similar images is recorded as The image and A consistency index for similar images; Indicates The image and of similar images The grayscale change of the pixel point is obtained by: In the image The gray value of the pixel is of similar images The absolute value of the difference in the grayscale values of pixels is recorded as The image and of similar images The grayscale change of each pixel; Indicates The number of similar images to an image.
[0062] By passing the The consistency index of the first image and each similar image is used as the weight, and the grayscale change of the pixel at the same position is used to determine the The grayscale change degree of each pixel in the image. The larger the consistency index value between the first image and each similar image, the closer their turntable coordinate offsets are and the more consistent the impacts are. Therefore, the grayscale change weight of the pixel at the same position is greater, and the result is finally determined by weighted average.
[0063] Step S004: Divide each image into several regions according to the grayscale change degree of each pixel in each image, perform image enhancement on all regions of each image to obtain an enhanced image, and complete the joint calibration of the camera and the turntable.
[0064] Through the above process, the grayscale change degree of each pixel in each image is determined. The grayscale change degree of different pixels reflects the degree to which they are affected by the changes in illumination and turntable posture. Several initial seed points are preset for each image, and all initial seed points are grown using the region growing algorithm. Each image is divided into several regions. The adaptive histogram equalization algorithm is used to perform image enhancement in all areas of the image to obtain the enhanced image in order to improve the image quality.
[0065] Through the above process, each image is enhanced, which effectively improves the accuracy and reliability of the joint calibration of the camera and the turntable. At this point, the enhanced image and the turntable are three-dimensionally calibrated by the Zhang-style calibration method for industrial use of the turntable. The Zhang-style calibration method is a well-known technology and the specific method is not introduced here.
[0066] This is the end of the present invention.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A joint calibration method of a camera and a turntable, characterized in that: The method comprises the following steps: Acquire the images of the calibration plate of the turntable in different postures, establish a three-dimensional coordinate system with the initial posture of the turntable, and obtain the turntable angle in the x direction, the turntable angle in the y direction, and the turntable angle in the z direction of each calibration plate image; According to the turntable angle difference between each image and other images in the same direction, the turntable coordinate offset degree of each image and other images is obtained; according to the turntable angle difference between each image and other images in multiple directions, the multi-directional offset influence degree of each image and other images is obtained; according to the turntable coordinate offset degree between each image and other images and the multi-directional offset influence degree, the proximity degree of the turntable coordinate offset between each image and other images is obtained, and further all similar images of each image are obtained; According to the proximity of the turntable coordinate offset between each image and similar images and the grayscale change of the pixel at the same position, the grayscale change degree of each pixel in each image is obtained; According to the grayscale change degree of each pixel in each image, each image is divided into several regions, and image enhancement is performed on all regions of each image to obtain the enhanced image, completing the joint calibration of the camera and the turntable; The acquisition of the turntable coordinate offset degree of each image and other images includes: For the calibration plate image The image and Image, The image and The calculation formula for the turntable coordinate offset of an image is: in, Indicates The image and The degree of turntable coordinate offset of the image; Indicates The image and Image Difference in direction turntable angle; Indicates The image and Image Difference in direction turntable angle; Indicates The image and Image Difference in direction turntable angle; represents the absolute value function; The acquisition of the multi-directional offset influence degree of each image on other images includes: No. The image and The calculation formula for the influence degree of multi-directional offset of an image is: in, Indicates The image and The degree of influence of multi-directional offset of an image; Indicates The image and The image is Difference in direction turntable angle; Indicates The image and The image turntable is The average of the differences in the turntable angles in the other two directions outside the direction; represents the linear normalization function; represents the absolute value function; for All directions within the x, y, and z directions The maximum value in The function is a maximum value function; Represents the x, y, and z directions of a three-dimensional coordinate system; The step of obtaining the grayscale variation degree of each pixel in each image comprises: No. In the image The calculation formula for the grayscale change degree of a pixel is: in, Indicates In the image The grayscale change degree of each pixel; Indicates The image and The consistency index of similar images; Indicates The image and of similar images The grayscale change of each pixel; Indicates The number of similar images to an image; The specific method for obtaining the consistency index is: The first The image and The ratio of the proximity of the turntable coordinate offset of the first similar image to the proximity of the turntable coordinate offset of all similar images is recorded as The image and The consistency index of similar images; The specific method for obtaining the grayscale variation is: The first In the image The gray value of the pixel is of similar images The absolute value of the difference in the grayscale values of pixels is recorded as The image and of similar images The grayscale change of each pixel; The step of performing image enhancement on all regions of each image to obtain an enhanced image and completing the joint calibration of the camera and the turntable includes: For Adaptive histogram equalization algorithm is used to enhance the image in all regions of the image to obtain the enhanced image, and the enhanced image and the turntable are calibrated in three dimensions using Zhang-style calibration method.
2. The joint calibration method of a camera and a turntable according to claim 1, characterized in that: The establishment of a three-dimensional coordinate system with the initial posture of the turntable includes: A three-dimensional coordinate system is constructed with the spatial angle under the initialization posture of the turntable as the coordinate axis, wherein a rectangular plane coordinate system is constructed in the horizontal plane direction of the turntable as the x-axis and y-axis, and the vertical upward direction perpendicular to the horizontal plane of the turntable is used as the z-axis of the turntable.
3. The joint calibration method of a camera and a turntable according to claim 1, characterized in that: The acquisition of the proximity of the turntable coordinate offset of each image to other images includes: The product of the turntable coordinate offset degree of each image and the multi-directional offset influence degree is normalized, and the normalized result is recorded as the proximity degree of the turntable coordinate offset of each image and other images.
4. The joint calibration method of a camera and a turntable according to claim 1, characterized in that: The obtaining of all similar images of each image comprises: When The image and When the proximity of the turntable coordinate offset of the first image is greater than or equal to the preset proximity threshold, the The image is recorded as Similar images to the previous image.
5. The joint calibration method of a camera and a turntable according to claim 1, characterized in that: The step of dividing each image into a plurality of regions according to the grayscale variation degree of each pixel in each image includes: According to the grayscale change degree of each pixel in each image, several initial seed points are preset for each image, and all the initial seed points are grown by the region growing algorithm to divide each image into several regions.
