Camera calibration method and related apparatus

By placing a target calibration object at the center of the camera's field of view and using its scale and orientation features to establish a world coordinate system, the accuracy problem of existing camera calibration methods in complex scenes is solved, and efficient camera parameter calibration is achieved.

CN120339408BActive Publication Date: 2026-04-10深圳睿像技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing camera calibration methods, such as the Zhang Zhengyou calibration method and camera motion-based calibration methods, are difficult to calibrate accurately in complex scenes, especially with fixed cameras and objects with similar textures, which are prone to mismatches and inaccurate parameters.

Method used

By placing the target calibration object at the center of the camera's field of view, and utilizing the scale and orientation characteristics of the target calibration object, a world coordinate system is established to determine the camera's first and second calibration parameters, thus avoiding the effects of distortion.

Benefits of technology

It improves the efficiency and accuracy of camera calibration and is suitable for camera calibration in various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339408B_ABST
    Figure CN120339408B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a camera calibration method and related device, the method comprising: acquiring a first image of a target calibration object photographed by a target camera; determining a target position when judging that the center of the target calibration object is imaged at the center of the first image, and establishing a world coordinate system with the target position as the origin of the coordinate system; determining first calibration parameters according to first coordinates and second coordinates; and determining second calibration parameters according to first scale features and first direction features. By placing the target calibration object at the center of the field of view of the target camera, setting the principal point coordinates as the image center, determining the first calibration parameters of the target camera according to the first coordinates and the second coordinates, and determining the second calibration parameters of the target camera according to the first scale features and the first direction features of the target calibration object, the efficiency of camera calibration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of machine vision, and particularly relates to a camera calibration method and a related device. BACKGROUND

[0002] The calibration parameter of a camera is a key parameter for describing the internal optical characteristics and external spatial position relationship of the camera. It can accurately project an object in a three-dimensional world coordinate system to a two-dimensional image plane, so as to reflect the spatial position, shape and performance of the object in the image. Camera calibration is usually required before a measurement task starts, so as to accurately convert coordinates in subsequent image processing and calculation.

[0003] At present, a commonly used camera calibration method is Zhang Zhengyou calibration method. The Zhang Zhengyou calibration method uses a camera to shoot multiple checkerboard photos, calculates the intrinsic parameter of the camera through homographic transformation of the multiple photos, and then uses a PnP (Perspective-n-Point) method to obtain the extrinsic parameter of the camera. However, the Zhang Zhengyou method is relatively complex and it is difficult to find a suitable size of the checkerboard when the field of view is large. There is also a camera calibration method based on camera motion, such as SFM (Structure from Motion). The calibration method matches feature points in camera views at two different angles, uses epipolar geometry to restore the Euclidean structure, can obtain the fundamental matrix at two views, and decomposes the intrinsic and extrinsic parameters of the camera. However, the camera calibration method based on camera motion is suitable for mobile platforms such as unmanned aerial vehicles whose attitude can be freely changed, and needs to shoot scenes with obvious textures for feature point extraction. If the object to be measured has similar textures in multiple places, the feature point matching process is prone to mismatch, resulting in inaccurate intrinsic and extrinsic parameters of the camera. At the same time, the calibration method is not suitable for most fixed camera calibration tasks. SUMMARY

[0004] The embodiments of the application provide a camera calibration method and a related device. The target calibration object is placed at the center of the field of view of the target camera, the principal point coordinates are set as the image center, the distortion of the point is not considered, the first calibration parameter of the target camera is determined according to the first coordinates and the second coordinates, and the second calibration parameter of the target camera is determined according to the first scale feature and the first direction feature of the target calibration object, so as to improve the efficiency of camera calibration.

[0005] In a first aspect, the embodiments of the application provide a camera calibration method, which comprises:

[0006] obtaining a first image of a target calibration object shot by a target camera, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature;

[0007] determining whether a center of the target calibration object is imaged at a center of the first image;

[0008] when it is determined that the center of the target calibration object is imaged at the center of the first image, determining a target position, and establishing a world coordinate system with the target position as an origin of a coordinate system;

[0009] determining a first coordinate of the target calibration object in the world coordinate system, and determining a second coordinate of the target camera in the world coordinate system;

[0010] determining a first calibration parameter of the target camera according to the first coordinate and the second coordinate;

[0011] determining a second calibration parameter of the target camera according to the first scale feature and the first direction feature.

[0012] In one possible example, the determining the target position comprises:

[0013] determining a first distance between the target calibration object and the target camera in a vertical direction;

[0014] determining a first position of the target camera;

[0015] determining the target position according to the first position and the first distance.

[0016] In one possible example, the determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate comprises:

[0017] determining a second distance of the target calibration object to an origin of a coordinate system of the world coordinate system in an X-axis direction and a third distance in a Z-axis direction according to the first coordinate;

[0018] determining the first distance of the target camera to the origin of the coordinate system of the world coordinate system according to the second coordinate;

[0019] determining a pitch angle of the target camera according to the first distance and the third distance;

[0020] determining a yaw angle of the target camera according to the second distance and the third distance.

[0021] In one possible example, the determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature comprises:

[0022] determining a second scale feature and a second direction feature between the first sub-marker and the second sub-marker in the first image;

[0023] determining an equivalent focal length of the target camera according to the first scale feature and the second scale feature;

[0024] determining a roll angle of the target camera according to the first direction feature and the second direction feature.

[0025] In one possible example, the determining the equivalent focal length of the camera according to the first scale feature and the second scale feature comprises:

[0026] determining a fourth distance according to the first scale feature;

[0027] determining a fifth distance according to the second scale feature;

[0028] calculating the equivalent focal length of the camera by bringing the first distance, the second distance, the third distance, the fourth distance and the fifth distance into an equivalent focal length formula.

[0029] In one possible example, the judging whether the center of the target calibration object is imaged at the center of the first image comprises:

[0030] drawing a graphic frame at the center of the first image;

[0031] determining a first center coordinate of the center of the first sub-marker;

[0032] determining a second center coordinate of the center of the second sub-marker;

[0033] determining a third center coordinate of the center of the target calibration object according to the first center coordinate and the second center coordinate;

[0034] if it is judged that the point corresponding to the third center coordinate falls into the graphic frame, determining that the center of the target calibration object is imaged at the center of the first image;

[0035] if it is judged that the point corresponding to the third center coordinate does not fall into the graphic frame, determining that the center of the target calibration object is not imaged at the center of the first image.

[0036] In one possible example, the first sub-marker and the second sub-marker are circles, the first scale feature is that the distance between the center of the first sub-marker and the center of the second sub-marker is equal to a preset distance, and the first direction feature is that the first sub-marker and the second sub-marker are arranged in a vertical direction or in a horizontal direction.

[0037] In a second aspect, an embodiment of the present application provides a camera calibration device, the device comprising an acquisition unit, a judgment unit and a determination unit, wherein

[0038] The acquisition unit is configured to acquire a first image of a target calibration object photographed by a target camera, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature.

[0039] The judgment unit is configured to judge whether a center of the target calibration object is imaged at a center of the first image.

[0040] The judgment unit is configured to, when judging that the center of the target calibration object is imaged at the center of the first image, determine a target position and establish a world coordinate system with the target position as an origin of the coordinate system.

[0041] The determination unit is configured to determine a first coordinate of the target calibration object in the world coordinate system and a second coordinate of the target camera in the world coordinate system.

[0042] The determination unit is configured to determine a first calibration parameter of the target camera according to the first coordinate and the second coordinate.

[0043] The determination unit is configured to determine a second calibration parameter of the target camera according to the first scale feature and the first direction feature.

[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; and one or more programs, stored in the memory and configured to be executed by the processor, the program comprising instructions for some or all of the steps described in the first aspect.

[0045] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium is configured to store a computer program, and the computer program is configured to make a computer execute instructions for some or all of the steps described in the first aspect of the present application.

[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the present application. The computer program product can be a software installation package.

[0047] It can be seen that, in the embodiment of the application, the first image of the target calibration object photographed by the target camera can be acquired first, the target calibration object includes a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker have first scale features and first direction features, then it is determined whether the target calibration object is imaged at the center of the first image, then when it is determined that the center of the target calibration object is imaged at the center of the first image, the target position is determined, and a world coordinate system is established with the target position as the origin of the coordinate system, further, the first coordinate of the target calibration object in the world coordinate system is determined, and the second coordinate of the target camera in the world coordinate system is determined, further, the first calibration parameter of the target camera is determined according to the first coordinate and the second coordinate, finally, the second calibration parameter of the target camera is determined according to the first scale features and the first direction features. By placing the target calibration object at the center of the field of view of the target camera, setting the principal point coordinate as the image center, and not considering the distortion of the point, the first calibration parameter of the target camera is determined according to the first coordinate and the second coordinate, and the second calibration parameter of the target camera is determined according to the first scale features and the first direction features of the target calibration object, which is beneficial to improve the efficiency of camera calibration. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0049] Figure 1 is a schematic diagram of a camera calibration system architecture provided by an embodiment of the present application;

[0050] Figure 2 is a flowchart of a camera calibration method provided by an embodiment of the present application;

[0051] Figure 3 is a schematic diagram of a target calibration object provided by an embodiment of the present application;

[0052] Figure 4 is a schematic diagram of another target calibration object provided by an embodiment of the present application;

[0053] Figure 5 is a schematic diagram of another target calibration object provided by an embodiment of the present application;

[0054] Figure 6 is a schematic diagram of another target calibration object provided by an embodiment of the present application;

[0055] Figure 7is a schematic diagram of a position relationship among a target camera, a world coordinate system and a target calibration object provided by an embodiment of the present application.

[0056] Figure 8 is a schematic diagram of a target calibration object imaged in a first image provided by an embodiment of the present application.

[0057] Figure 9 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.

[0058] Figure 10 is a functional unit composition block diagram of a camera calibration device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work fall within the scope of protection of the present application.

[0060] The terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, and are not used to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.

[0061] In this document, the term "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor is it independent or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0062] In the embodiments of the present application, "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships. For example, A and / or B can represent the following three cases: A exists alone; A and B exist simultaneously; B exists alone. Wherein, A and B can be singular or plural.

[0063] In the embodiments of this application, the symbol " / " can represent that the front and rear associated objects are in an "or" relationship. In addition, the symbol " / " can also represent the division symbol, that is, performing division operation. For example, A / B can represent A divided by B.

[0064] In the embodiments of this application, "at least one" or similar expressions refer to any combination of these items, including any combination of single item or multiple items, refer to one or more, and multiple refers to two or more. For example, at least one of a, b or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b and c. Wherein, each of a, b and c can be an element or a set containing one or more elements.

[0065] In the embodiments of this application, "equal to" can be used with greater than, which is applicable to the technical solutions adopted when greater than, or can be used with less than, which is applicable to the technical solutions adopted when less than. When equal to is used with greater than, it is not used with less than; when equal to is used with less than, it is not used with greater than.

[0066] In order to better understand the scheme of the embodiments of this application, the electronic device, related concepts and background that may be involved in the embodiments of this application will be introduced first.

[0067] The electronic device of the embodiments of the present application is a device with wireless communication function, which can be referred to as terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal device, vehicle-mounted terminal device, industrial control terminal device, UE unit, UE station, mobile station, remote station, remote terminal device, mobile device, UE terminal device, wireless communication device, UE agent or UE apparatus, etc. The terminal device can be fixed or mobile. It should be noted that the terminal device can support at least one wireless communication technology, such as LTE, new radio (NR), wideband code division multiple access (WCDMA), etc. For example, the terminal device can be a mobile phone, a pad, a desktop computer, a notebook computer, an all-in-one machine, a vehicle-mounted terminal, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, an electronic device or other processing device connected to a wireless modem, a wearable device, a terminal device in future mobile communication network or a terminal device in future evolved public land mobile network (PLMN), etc. The electronic device can be a processing device in a camera calibration system.

[0068] Please refer to Figure 1 , Figure 1 is an architecture schematic diagram of a camera calibration system provided by the embodiments of the present application. As Figure 1As shown, the camera calibration system 1 comprises a processing device 10, a target camera 20 and a target calibration object 30, and the processing device 10 and the target camera 20 are connected.

[0069] The target camera 20 is configured to capture an image of the target calibration object and transmit the captured image to the processing device 10.

[0070] The processing device 10 can be a server or a processor, which is not limited herein.

[0071] The target calibration object 30 can include, but is not limited to, a scene natural feature, a light-emitting light source mark, a reflective mark, a planar plate with a regular pattern, etc. The scene natural feature can be a lane line or a rail. The target calibration object 30 comprises a first sub-marker and a second sub-marker, and the first sub-marker and the second sub-marker have a first scale feature and a first direction feature.

[0072] The camera calibration system 1 can comprise a memory connected to the processing device 10, and the memory is configured to store the first calibration parameter and the second calibration parameter determined by the processing device 10.

[0073] In one possible example, the processing device 10 can first acquire a first image of the target calibration object 30 captured by the target camera 20, the target calibration object 30 comprises a first sub-marker and a second sub-marker, and the first sub-marker and the second sub-marker have a first scale feature and a first direction feature. Then, the processing device 10 determines whether the target calibration object 30 is imaged at the center of the first image. Then, the processing device 10 determines a target position when it is determined that the center of the target calibration object 30 is imaged at the center of the first image, and establishes a world coordinate system with the target position as the origin of the coordinate system. Further, the processing device 10 determines a first coordinate of the target calibration object 30 in the world coordinate system and a second coordinate of the target camera 20 in the world coordinate system. Further, the processing device 10 determines the first calibration parameter of the target camera 20 according to the first coordinate and the second coordinate. Finally, the processing device 10 determines the second calibration parameter of the target camera 20 according to the first scale feature and the first direction feature. By placing the target calibration object 30 at the center of the field of view of the target camera 20, setting the principal point coordinate as the image center, and not considering the distortion of the point, the first calibration parameter of the target camera 20 is determined according to the first coordinate and the second coordinate, and the second calibration parameter of the target camera 20 is determined according to the first scale feature and the first direction feature of the target calibration object 30, which is beneficial to improve the efficiency of camera calibration.

[0074] Please refer to Figure 2 , Figure 2 is a flowchart of a camera calibration method provided by the embodiments of the present application, and the method comprises:

[0075] In step S201, a first image of a target calibration object photographed by a target camera is acquired, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature.

[0076] wherein the target calibration object can be placed at the center of the field of view of the target camera, and if the target calibration object is actually at the center of the field of view of the target camera, the imaging point of the center of the target calibration object should be at the center of the photographed first image.

[0077] wherein the scale feature includes but is not limited to the distance between points, the distance between a point and a line, the distance between lines, the scale of a line, the size of a shape, the distance between the centroids of shapes, etc., and is not limited herein, wherein the point includes but is not limited to a corner point, a centroid, a center of mass, a center, etc., the line includes but is not limited to a straight line, a curve, a dashed line, etc., and the shape includes but is not limited to a circle, an ellipse, a polygon, an irregular figure, etc. For example, the first sub-marker and the second sub-marker are circles, and the first scale feature is that the distance between the centers of the first sub-marker and the second sub-marker is equal to a preset distance, which can be artificially set or defaulted by the system, and is not limited herein.

[0078] wherein the direction feature includes but is not limited to a horizontal direction, a vertical direction, or other angle-determining directions. For example, the first direction feature is that the first sub-marker and the second sub-marker are arranged in a vertical direction or in a horizontal direction.

[0079] wherein when the first sub-marker and the second sub-marker are circles, the diameter of the first sub-marker is equal to a first preset threshold value, and the diameter of the second sub-marker is equal to a second preset threshold value.

[0080] wherein the first preset value and the second preset value can be artificially set or defaulted by the system, and are not limited herein.

[0081] wherein the first preset threshold value and the second preset threshold value are equal or not equal.

[0082] wherein the first sub-marker and the second sub-marker can not have an overlapping area, or can have an overlapping area, and are not limited herein.

[0083] Please refer to Figure 3 , Figure 3 is a schematic diagram of a target calibration object provided by an embodiment of the present application, as Figure 3As shown, the target marker includes a first sub-marker and a second sub-marker. The first sub-marker is a circle, and the second sub-marker is also a circle. The first and second sub-markers do not overlap. The diameter of the first sub-marker is D1, and the diameter of the second sub-marker is D2. The first and second sub-markers are arranged vertically, and the distance between the centers of the first and second sub-markers is a preset distance l. In this case, the first scale feature is that the distance between the centers of the first and second sub-markers is the preset distance l, and the first directional feature is that the first and second sub-markers are arranged vertically.

[0084] Please see Figure 4 , Figure 4 This is a schematic diagram of another target calibrator provided in the embodiments of this application, such as... Figure 4 As shown, the target marker includes a first sub-marker and a second sub-marker. The first sub-marker is a circle, and the second sub-marker is also a circle. The first and second sub-markers do not overlap. The diameter of the first sub-marker is D1, and the diameter of the second sub-marker is D2. The first and second sub-markers are arranged horizontally, and the distance between the centers of the first and second sub-markers is a preset distance l. In this case, the first scale feature is that the distance between the centers of the first and second sub-markers is the preset distance l, and the first directional feature is that the first and second sub-markers are arranged horizontally.

[0085] Please see Figure 5 , Figure 5 This is a schematic diagram of another target marker provided in the embodiments of this application, such as... Figure 5 As shown, the target marker includes a first sub-marker and a second sub-marker. The first sub-marker is rectangular, and the second sub-marker is also rectangular. The first and second sub-markers do not overlap. The length of the first sub-marker is M1 and the width is N1, while the length of the second sub-marker is M2 and the width is N2. The first and second sub-markers are arranged vertically, and the distance between the centers of the first and second sub-markers is a preset distance l. Therefore, the first scale feature is that the distance between the centers of the first and second sub-markers is the preset distance l, and the first directional feature is that the first and second sub-markers are arranged vertically.

[0086] Please see Figure 6 , Figure 6 This is a schematic diagram of another target calibrator provided in the embodiments of this application, such as... Figure 6As shown, the target calibration object includes a first sub-marker and a second sub-marker, the first sub-marker is a circle, the second sub-marker is also a circle, the first sub-marker and the second sub-marker have an overlapping area, the diameter of the first sub-marker is D3, the diameter of the second sub-marker is D4, the first sub-marker and the second sub-marker are arranged in a vertical direction, the distance between the center of the first sub-marker and the center of the second sub-marker is a preset distance l. At this time, the first scale feature is the distance between the center of the first sub-marker and the center of the second sub-marker, which is the preset distance l, and the first direction feature is that the first sub-marker and the second sub-marker are arranged in a vertical direction.

[0087] Step S202, judging whether the center of the target calibration object is imaged at the center of the first image.

[0088] Wherein, considering that the prerequisite for subsequent calibration parameter determination is that the principal point coordinate is located at the image center of the target camera and the distortion of the point is not considered, thus the image processing software designed in advance can be run to identify the features of the calibration object in the camera image in real time, and whether the imaging point of the center of the calibration object is at the image center is judged.

[0089] Step S203, when it is judged that the center of the target calibration object is imaged at the center of the first image, the target position is determined, and a world coordinate system is established with the target position as the origin of the coordinate system.

[0090] Wherein, the target calibration object is in the plane where the X axis and the Z axis of the world coordinate system are located.

[0091] Step S204, determining the first coordinate of the target calibration object in the world coordinate system, and determining the second coordinate of the target camera in the world coordinate system.

[0092] Step S205, determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate.

[0093] Wherein, the first calibration parameter includes the pitch angle and the yaw angle of the target camera, and the first calibration parameter is calculated by using the triangular geometric relationship formed by the target calibration object in the field of view of the target camera.

[0094] Step S206, determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature.

[0095] Wherein, the second calibration parameter includes the equivalent focal length and the roll angle of the target camera.

[0096] It can be seen that in the embodiments of the present application, the first image of the target calibration object photographed by the target camera can be acquired first, the target calibration object includes a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker have first scale features and first direction features, then it is determined whether the target calibration object is imaged at the center of the first image, then when it is determined that the center of the target calibration object is imaged at the center of the first image, the target position is determined, and a world coordinate system is established with the target position as the coordinate system origin, further, the first coordinate of the target calibration object in the world coordinate system is determined, and the second coordinate of the target camera in the world coordinate system is determined, still further, the first calibration parameter of the target camera is determined according to the first coordinate and the second coordinate, and finally, the second calibration parameter of the target camera is determined according to the first scale features and the first direction features. By placing the target calibration object at the center of the field of view of the target camera, setting the principal point coordinate as the image center, and not considering the distortion of the point, the first calibration parameter of the target camera is determined according to the first coordinate and the second coordinate, and the second calibration parameter of the target camera is determined according to the first scale features and the first direction features of the target calibration object, which is beneficial to improve the efficiency of camera calibration.

[0097] In one possible example, in the aspect of determining the target position, the above method can include the following steps: determining a first distance between the target calibration object and the target camera in the vertical direction; determining a first position of the target camera; and determining the target position according to the first position and the first distance.

[0098] In the above example, the coordinate system origin of the world coordinate system can be set at the position directly below the target camera, and the distance between the coordinate system origin and the target camera is equal to the first distance, and the world coordinate system is established so that the target calibration object is located in the XOZ plane formed by the X axis and the Z axis of the world coordinate system.

[0099] In the above example, the target position is the position directly below the first position in the vertical direction and spaced apart by the first distance.

[0100] For example, referring to Figure 7 , Figure 7 is a schematic diagram of the positional relationship between a target camera, a world coordinate system and a target calibration object provided by the embodiments of the present application, as shown in Figure 7 , the target camera and the target calibration object are spaced apart by a first distance in the vertical direction , the coordinate system origin O of the world coordinate system is located directly below the target camera, and the distance between the coordinate system origin O and the target camera is equal to the first distance , and the target calibration object is located in the XOZ plane of the world coordinate system.

[0101] It can be seen that in the present example, by placing the target marker in the center of the field of view of the target camera, establishing the world coordinate system directly below the target camera, and making the target marker in the XOZ plane of the world coordinate system, the first calibration parameter is calculated by the triangular geometric relationship formed by the target marker in the field of view of the target camera, so as to improve the efficiency of camera parameter calibration.

[0102] In one possible example, in the aspect of determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate, the above method can include the following steps: determining a second distance of the target marker to the coordinate system origin of the world coordinate system in the X-axis direction and a third distance in the Z-axis direction according to the first coordinate; determining the first distance of the target camera to the coordinate system origin of the world coordinate system according to the second coordinate; determining the pitch angle of the target camera according to the first distance and the third distance; and determining the yaw angle of the target camera according to the second distance and the third distance.

[0103] Wherein, the yaw angle represents the angle of rotation of the target camera around its vertical axis, and the pitch angle represents the angle of rotation of the target camera around its horizontal axis.

[0104] Wherein, the second distance is the distance of the target marker to the X-axis of the world coordinate system, the third distance is the distance of the target marker to the Z-axis of the world coordinate system, and the first distance is the distance of the target camera to the coordinate system origin of the world coordinate system.

[0105] Wherein, represents the pitch angle of the target camera, represents the distance of the target camera to the coordinate system origin of the world coordinate system, i.e. the first distance, represents the distance of the target marker to the Z-axis of the world coordinate, i.e. the third distance.

[0106] Wherein, the formula of the yaw angle of the target camera to be calibrated is as follows:

[0107] ,

[0108] Wherein, represents the yaw angle of the target camera, represents the distance of the target marker to the X-axis of the world coordinate system, i.e. the second distance.

[0109] Please refer to Figure 7 , Figure 7 The target camera, the target marker and the world coordinate system are shown in , the distance between the target camera and the world coordinate system is , the distance between the target calibration object and the Z axis of the world coordinate system is , the pitch angle is , and the yaw angle is .

[0110] It can be seen that, in the present example, the first calibration parameter is calculated by the triangular geometric relationship formed by the target calibration object in the field of view of the target camera, which is conducive to improving the efficiency of camera parameter calibration.

[0111] In one possible example, the determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature comprises: determining a second scale feature and a second direction feature between the first sub-marker and the second sub-marker in the first image; determining the equivalent focal length of the target camera according to the first scale feature and the second scale feature; and determining the roll angle of the target camera according to the first direction feature and the second direction feature.

[0112] The second scale feature is a scale feature between the first sub-marker and the second sub-marker in the first image, and the first scale feature and the second scale feature are the same in scale feature type, for example: when the first sub-marker and the second sub-marker are both circles, the first scale feature is a feature describing the distance between the center of the first sub-marker and the center of the second sub-marker, and the second scale feature should also be a feature describing the distance between the center of the first sub-marker and the center of the second sub-marker in the first image.

[0113] The second direction feature is a direction feature between the first sub-marker and the second sub-marker in the first image, the first direction feature is a feature describing the arrangement direction of the first sub-marker and the second sub-marker, and the second direction feature is also a feature describing the arrangement direction of the first sub-marker and the second sub-marker in the first image.

[0114] The second calibration parameter comprises the equivalent focal length and the roll angle of the target camera, the equivalent focal length of the target camera comprises the equivalent focal length in the X axis direction of the image plane and the equivalent focal length in the Y axis direction of the image plane, and the roll angle is used to describe the pose of the target camera compared with the world coordinate system.

[0115] For example, if the first sub-marker and the second sub-marker have a vertical direction feature, the included angle between the direction feature between the first sub-marker and the second sub-marker in the first image and the vertical direction is , and the roll angle of the target camera is . If the first sub-marker and the second sub-marker have a horizontal direction feature, the included angle between the direction feature between the first sub-marker and the second sub-marker in the first image and the horizontal direction is Then the roll angle of the target camera is .

[0116] Please see Figure 8 , Figure 8 This is a schematic diagram of a target marker imaged in a first image according to an embodiment of this application. The first sub-marker and the second sub-marker are circles. The second scale feature is the distance between the center of the first sub-marker and the center of the second sub-marker in the first image. The first scale feature is that the distance between the center of the first sub-marker and the center of the second sub-marker is l. The first direction feature is that the first and second sub-markers are arranged vertically. If the coordinates of the center of the first sub-marker are C1(x1,y1) and the coordinates of the center of the second sub-marker are C2(x2,y2), then the following can be calculated: ,Will Substituting l into the equivalent focal length formula, the equivalent focal length is calculated; if the angle between the second directional feature and the vertical direction is... , Then the roll angle of the target camera is .

[0117] As can be seen, in this example, the equivalent focal length and roll angle of the target camera can be calculated based on the scale and orientation features between the first and second sub-markers, which helps to improve the efficiency of camera parameter calibration.

[0118] In one possible example, regarding the determination of the equivalent focal length of the camera based on the first scale feature and the second scale feature, the above method may include the following steps: determining a fourth distance based on the first scale feature; determining a fifth distance based on the second scale feature; and substituting the first distance, the second distance, the third distance, the fourth distance, and the fifth distance into the equivalent focal length formula to calculate the equivalent focal length of the camera.

[0119] Wherein, the fourth distance represents the physical scale characteristics between the first sub-marker and the second sub-marker, and the fifth distance represents the physical scale characteristics between the first sub-marker and the second sub-marker as imaged in the first image; for example, the fourth distance is the distance between the center of the first sub-marker and the center of the second sub-marker, and the fifth distance is the distance between the center of the first sub-marker and the center of the second sub-marker as imaged in the first image.

[0120] For example, if the physical scale between the first sub-marker and the second sub-marker is... Given the characteristics of the first and second sub-markers imaged in the first image, which have a physical scale of , the formula for the equivalent focal length of the target camera is as follows:

[0121] ,

[0122] wherein, represents an equivalent focal length in the X-axis direction of the image plane, represents an equivalent focal length in the Y-axis direction of the image plane.

[0123] It can be seen that in the present example, the equivalent focal length of the target camera can be calculated based on the scale feature and the direction feature between the first sub-marker and the second sub-marker, which is conducive to improving the efficiency of camera parameter calibration.

[0124] In one possible example, in terms of judging whether the center of the target calibration object is imaged at the center of the first image, the above method can include the following steps: drawing a graphic frame at the center of the first image; determining a first center coordinate of the center of the first sub-marker; determining a second center coordinate of the center of the second sub-marker; determining a third center coordinate of the center of the target calibration object according to the first center coordinate and the second center coordinate; if it is judged that the point corresponding to the third center coordinate falls into the graphic frame, it is determined that the center of the target calibration object is imaged at the center of the first image; if it is judged that the point corresponding to the third center coordinate does not fall into the graphic frame, it is determined that the center of the target calibration object is not imaged at the center of the first image.

[0125] wherein, the shape of the graphic frame is not limited, for example, the graphic frame can be a rectangular frame, a circular frame. The area of the graphic frame is sufficient to accommodate a single pixel point, i.e. to accommodate the imaging point of the center of the target calibration object.

[0126] wherein, when the first sub-marker and the second sub-marker are both regular shapes, the coordinates of the center of the first sub-marker and the coordinates of the center of the second sub-marker can be determined first, to obtain the first center coordinate and the second center coordinate, and further based on the first center coordinate and the second center coordinate, the coordinates of the center of the target calibration object are calculated to obtain the third center coordinate; for example, if the first center coordinate of the first sub-marker imaged in the first image is C1(x1, y1), and the second center coordinate of the second sub-marker is C2(x2, y2), the third center coordinate of the center of the target calibration object is calculated as .

[0127] Please refer to Figure 8 , Figure 8 the first sub-marker, the second sub-marker and the graphic frame in the first image are shown, the graphic frame is a rectangular frame, and the center of the target calibration object in the first image falls into the rectangular frame, which indicates that the target calibration object is at the center of the field of view of the target camera.

[0128] Optionally, when both the first and second sub-markers are irregular shapes, the first image can be converted to a grayscale image, and the grayscale image can be binarized to obtain a binarized image. Each non-zero pixel of the first sub-marker in the binarized image is traversed, and the sum of the products of its coordinates and the pixel's grayscale value is calculated. The sum of the grayscale values ​​of all non-zero pixels is then calculated to obtain the first centroid coordinates of the first sub-marker. Similarly, the second centroid coordinates of the second sub-marker are obtained. Based on the first and second centroid coordinates, the third center coordinates of the target marker are calculated. Specifically, the first weight of the first centroid coordinates and the second weight of the second centroid coordinates can be determined. The third center coordinates are then calculated based on the first weight, the second weight, the first centroid coordinates, and the second centroid coordinates. For example, when both the first and second weights are 0.5, the first centroid coordinates are (x3, y3), and the second centroid coordinates are (x4, y4). Therefore, the calculated third center coordinates are... .

[0129] Optionally, edge information in the first image can be extracted using an edge detection algorithm to generate an edge image. The edge image is then binarized to obtain a binarized image. A contour extraction algorithm is used to extract the contours of the binarized image, resulting in the first contour of the first sub-marker and the second contour of the second sub-marker. The minimum bounding rectangle or ellipse fitting is calculated for the extracted first and second contours respectively. Based on the results of the minimum bounding rectangle or ellipse fitting, the center point of the first contour and the center point of the second contour are calculated respectively. Finally, the coordinates of the center point of the target marker are calculated based on the center points of the first and second contours through averaging, weighting, or geometric relationships.

[0130] As can be seen in this example, it can be determined whether the center of the target calibration object is imaged in the center of the first image, which helps to improve the accuracy of camera parameter calibration.

[0131] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 9 As shown, the electronic device includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by the processor according to the following instructions:

[0132] Acquire a first image of a target marker captured by a target camera, wherein the target marker includes a first sub-marker and a second sub-marker, and the first sub-marker and the second sub-marker have a first scale feature and a first orientation feature;

[0133] Determine whether the center of the target calibrator is imaged in the center of the first image;

[0134] determining a target position when a center of the target calibration object is determined to be imaged at a center of the first image, and establishing a world coordinate system with the target position as an origin of the coordinate system;

[0135] determining a first coordinate of the target calibration object in the world coordinate system, and determining a second coordinate of the target camera in the world coordinate system;

[0136] determining a first calibration parameter of the target camera according to the first coordinate and the second coordinate;

[0137] determining a second calibration parameter of the target camera according to the first scale feature and the first direction feature.

[0138] It can be seen that in the embodiments of the present application, the electronic device can first acquire a first image of a target calibration object captured by a target camera, the target calibration object including a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature, then determine whether the target calibration object is imaged at the center of the first image, and then determine a target position when a center of the target calibration object is determined to be imaged at a center of the first image, and establish a world coordinate system with the target position as an origin of the coordinate system. Further, a first coordinate of the target calibration object in the world coordinate system is determined, and a second coordinate of the target camera in the world coordinate system is determined. Further, a first calibration parameter of the target camera is determined according to the first coordinate and the second coordinate. Finally, a second calibration parameter of the target camera is determined according to the first scale feature and the first direction feature. By placing the target calibration object at the center of the field of view of the target camera, setting the principal point coordinate as the image center, determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate, and determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature of the target calibration object, the efficiency of camera calibration is improved.

[0139] In one possible example, in the aspect of determining the target position, the above procedure includes instructions for performing the following steps:

[0140] determining a first distance between the target calibration object and the target camera in a vertical direction;

[0141] determining a first position of the target camera;

[0142] determining the target position according to the first position and the first distance.

[0143] In one possible example, in the aspect of determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate, the above procedure includes instructions for performing the following steps:

[0144] According to the first coordinate, a second distance of the target marker to the coordinate system origin of the world coordinate system in the X-axis direction and a third distance in the Z-axis direction are determined;

[0145] According to the second coordinate, the first distance of the target camera to the coordinate system origin of the world coordinate system is determined;

[0146] According to the first distance and the third distance, the pitch angle of the target camera is determined;

[0147] According to the second distance and the third distance, the yaw angle of the target camera is determined.

[0148] In one possible example, in the aspect of determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature, the above program further includes instructions for performing the following steps:

[0149] Determine the second scale feature and the second direction feature between the first sub-marker and the second sub-marker in the first image;

[0150] According to the first scale feature and the second scale feature, the equivalent focal length of the target camera is determined;

[0151] According to the first direction feature and the second direction feature, the roll angle of the target camera is determined.

[0152] In one possible example, in the aspect of determining the equivalent focal length of the camera according to the first scale feature and the second scale feature, the above program further includes instructions for performing the following steps:

[0153] According to the first scale feature, a fourth distance is determined;

[0154] According to the second scale feature, a fifth distance is determined;

[0155] The first distance, the second distance, the third distance, the fourth distance and the fifth distance are brought into the equivalent focal length formula, and the equivalent focal length of the camera is calculated.

[0156] In one possible example, in the aspect of judging whether the center of the target marker is imaged at the center of the first image, the above program further includes instructions for performing the following steps:

[0157] Draw a graphic frame at the center of the first image;

[0158] Determine the first center coordinate of the center of the first sub-marker;

[0159] determining a second center coordinate of a center of the second sub-marker;

[0160] determining a third center coordinate of a center of the target calibration object according to the first center coordinate and the second center coordinate;

[0161] if it is judged that the point corresponding to the third center coordinate falls into the graphic frame, determining that the center of the target calibration object is imaged at the center of the first image;

[0162] if it is judged that the point corresponding to the third center coordinate does not fall into the graphic frame, determining that the center of the target calibration object is not imaged at the center of the first image.

[0163] In one possible example, the first sub-marker and the second sub-marker are circles, the first scale feature is that a distance between a center of the first sub-marker and a center of the second sub-marker is equal to a preset distance, and the first direction feature is that the first sub-marker and the second sub-marker are arranged in a vertical direction or arranged in a horizontal direction.

[0164] The above mainly introduces the scheme of the embodiments of the present application from the perspective of a method execution process. It can be understood that, in order to implement the above functions, the electronic device contains a hardware structure and / or a software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the unit and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0165] The embodiments of the present application can divide the functional units of the electronic device according to the above method examples. For example, each functional unit can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division manner.

[0166] In the case of dividing each functional module according to each function, Figure 10 A functional unit composition block diagram of a camera calibration device is given, as shown in Figure 10 The device includes an acquisition unit 1001, a judgment unit 1002, and a determination unit 1003; wherein,

[0167] The acquisition unit 1001 is configured to acquire a first image of a target calibration object captured by a target camera, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature.

[0168] The determination unit 1002 is configured to determine whether a center of the target calibration object is imaged at a center of the first image.

[0169] The determination unit 1002 is configured to, when it is determined that the center of the target calibration object is imaged at the center of the first image, determine a target position, and establish a world coordinate system with the target position as an origin of the coordinate system.

[0170] The determination unit 1003 is configured to determine a first coordinate of the target calibration object in the world coordinate system, and determine a second coordinate of the target camera in the world coordinate system.

[0171] The determination unit 1003 is configured to determine a first calibration parameter of the target camera according to the first coordinate and the second coordinate.

[0172] The determination unit 1003 is configured to determine a second calibration parameter of the target camera according to the first scale feature and the first direction feature.

[0173] It can be seen that, in the embodiments of the present application, the camera calibration device can first acquire a first image of a target calibration object captured by a target camera, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature, then determine whether the target calibration object is imaged at the center of the first image, then when it is determined that the center of the target calibration object is imaged at the center of the first image, determine a target position, and establish a world coordinate system with the target position as an origin of the coordinate system, further, determine a first coordinate of the target calibration object in the world coordinate system, and determine a second coordinate of the target camera in the world coordinate system, still further, determine a first calibration parameter of the target camera according to the first coordinate and the second coordinate, and finally, determine a second calibration parameter of the target camera according to the first scale feature and the first direction feature. By placing the target calibration object at the center of the field of view of the target camera, setting the principal point coordinate as the image center, determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate, and determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature of the target calibration object, the efficiency of camera calibration can be improved.

[0174] In one possible example, in the aspect of determining the target position, the determination unit 1003 is specifically configured to:

[0175] determine a first distance between the target marker and the target camera in a vertical direction;

[0176] determine a first position of the target camera;

[0177] determine the target position according to the first position and the first distance.

[0178] In one possible example, in the determining the first calibration parameter of the target camera according to the first coordinate and the second coordinate, the determining unit 1003 is specifically configured to:

[0179] determine a second distance of the target marker to a coordinate system origin of the world coordinate system in an X-axis direction and a third distance in a Z-axis direction according to the first coordinate;

[0180] determine the first distance of the target camera to the coordinate system origin of the world coordinate system according to the second coordinate;

[0181] determine a pitch angle of the target camera according to the first distance and the third distance;

[0182] determine a yaw angle of the target camera according to the second distance and the third distance.

[0183] In one possible example, in the determining the second calibration parameter of the target camera according to the first scale feature and the first direction feature, the determining unit 1003 is specifically configured to:

[0184] determine a second scale feature and a second direction feature between the first sub-marker and the second sub-marker in the first image;

[0185] determine an equivalent focal length of the target camera according to the first scale feature and the second scale feature;

[0186] determine a roll angle of the target camera according to the first direction feature and the second direction feature.

[0187] In one possible example, in the determining the equivalent focal length of the camera according to the first scale feature and the second scale feature, the determining unit 1003 is further specifically configured to:

[0188] determine a fourth distance according to the first scale feature;

[0189] determine a fifth distance according to the second scale feature;

[0190] The first distance, the second distance, the third distance, the fourth distance and the fifth distance are brought into an equivalent focal length formula, and an equivalent focal length of the camera is calculated.

[0191] In one possible example, in the judging whether the center of the target calibration object is imaged at the center of the first image, the determining unit 1003 is further specifically configured to:

[0192] draw a graphic frame at the center of the first image;

[0193] determine a first center coordinate of the center of the first sub-marker;

[0194] determine a second center coordinate of the center of the second sub-marker;

[0195] determine a third center coordinate of the center of the target calibration object according to the first center coordinate and the second center coordinate;

[0196] if it is judged that the point corresponding to the third center coordinate falls into the graphic frame, it is determined that the center of the target calibration object is imaged at the center of the first image;

[0197] if it is judged that the point corresponding to the third center coordinate does not fall into the graphic frame, it is determined that the center of the target calibration object is not imaged at the center of the first image.

[0198] In one possible example, the first sub-marker and the second sub-marker are circles, the first scale feature is that the distance between the center of the first sub-marker and the center of the second sub-marker is equal to a preset distance, and the first direction feature is that the first sub-marker and the second sub-marker are arranged in a vertical direction or arranged in a horizontal direction.

[0199] It should be noted that all related contents of each step involved in the above method embodiments can be cited to the function description of the corresponding function module, and will not be repeated here.

[0200] The electronic device provided in the embodiment is used to execute the camera calibration method described above, and thus can achieve the same effects as the implementation method described above.

[0201] In the case of using integrated units, the electronic device can include a processing module, a storage module and a communication module. The processing module can be used to control and manage the actions of the electronic device, for example, can be used to support the electronic device to execute the steps executed by the function units described above. The storage module can be used to support the electronic device to execute the storage of program codes and data, etc. The communication module can be used to support the communication between the electronic device and other devices.

[0202] The processing module can be a processor or a controller. It can implement or execute the various exemplary logical blocks, modules, and circuits described in connection with the disclosure. The processor can also be a combination of implementing computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, and the like. The storage module can be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, and the like, which interacts with other electronic devices.

[0203] The embodiments of the present application also provide a computer storage medium, which stores a computer program for electronic data exchange. The computer program causes a computer to execute some or all of the steps of any of the methods described in the above method embodiments. The computer includes an electronic device.

[0204] The embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to execute some or all of the steps of any of the methods described in the above method embodiments. The computer program product can be a software installation package, and the computer includes a control platform.

[0205] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0206] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0207] In the several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the above units is only a logical function division. There can be another division manner for actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different parts can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical or other forms.

[0208] The units described as separate components above can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0209] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0210] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable memory. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the above-mentioned method of each embodiment of the present application. The aforementioned memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0211] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by programs instructing related hardware, and the programs can be stored in a computer readable memory, which can include a flash disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.

[0212] The embodiments of the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed; in view of the above, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A camera calibration method, characterized by, The method comprises: acquiring a first image of a target calibration object photographed by a target camera, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature; determining whether the center of the target calibration object is imaged in the center of the first image; when it is determined that the center of the target calibration object is imaged in the center of the first image, determining a target position and establishing a world coordinate system with the target position as the origin of the coordinate system; determining a first coordinate of the target calibration object in the world coordinate system and a second coordinate of the target camera in the world coordinate system; determining a second distance of the target calibration object to the origin of the coordinate system of the world coordinate system in the X-axis direction and a third distance in the Z-axis direction according to the first coordinate; determining a first distance of the target camera to the origin of the coordinate system of the world coordinate system according to the second coordinate; determining a pitch angle of the target camera according to the first distance and the third distance; determining a yaw angle of the target camera according to the second distance and the third distance; determining a second calibration parameter of the target camera according to the first scale feature and the first direction feature.

2. The method of claim 1, wherein, The determination of the target position comprises: determining a first distance between the target calibration object and the target camera in the vertical direction; determining a first position of the target camera; determining the target position according to the first position and the first distance.

3. The method of claim 1, wherein, The determination of the second calibration parameter of the target camera according to the first scale feature and the first direction feature comprises: determining a second scale feature and a second direction feature between the first sub-marker and the second sub-marker in the first image; determining an equivalent focal length of the target camera according to the first scale feature and the second scale feature; determining a roll angle of the target camera according to the first direction feature and the second direction feature.

4. The method of claim 3, wherein, The determination of the equivalent focal length of the target camera according to the first scale feature and the second scale feature comprises: determining a fourth distance according to the first scale feature; determining a fifth distance according to the second scale feature; calculating the equivalent focal length of the camera by bringing the first distance, the second distance, the third distance, the fourth distance and the fifth distance into an equivalent focal length formula.

5. The method of claim 1, wherein, The determination of whether the center of the target calibration object is imaged in the center of the first image comprises: drawing a graphic frame in the center of the first image; determining a first center coordinate of the center of the first sub-marker; determining a second center coordinate of the center of the second sub-marker; determining a third center coordinate of the center of the target calibration object according to the first center coordinate and the second center coordinate; if it is determined that the point corresponding to the third center coordinate falls into the graphic frame, it is determined that the center of the target calibration object is imaged in the center of the first image; if it is determined that the point corresponding to the third center coordinate does not fall into the graphic frame, it is determined that the center of the target calibration object is not imaged in the center of the first image.

6. The method according to any one of claims 1 to 5, characterized in that, The first sub-marker and the second sub-marker are circles, the first scale feature is that a distance between a circle center of the first sub-marker and a circle center of the second sub-marker is equal to a preset distance, and the first direction feature is that the first sub-marker and the second sub-marker are arranged in a vertical direction or arranged in a horizontal direction.

7. A camera calibration apparatus characterized by comprising: The camera calibration device comprises an acquisition unit, a judgment unit and a determination unit; wherein, The acquisition unit is configured to acquire a first image of a target calibration object captured by a target camera, the target calibration object comprising a first sub-marker and a second sub-marker, the first sub-marker and the second sub-marker having a first scale feature and a first direction feature. The judgment unit is configured to judge whether a center of the target calibration object is imaged at a center of the first image. The judgment unit is configured to determine a target position when it is judged that the center of the target calibration object is imaged at the center of the first image, and establish a world coordinate system with the target position as an origin of the coordinate system. The determination unit is configured to determine a first coordinate of the target calibration object in the world coordinate system, and determine a second coordinate of the target camera in the world coordinate system. The determination unit is configured to determine a second distance of the target calibration object to the origin of the coordinate system of the world coordinate system in an X-axis direction and a third distance in a Z-axis direction according to the first coordinate, determine a first distance of the target camera to the origin of the coordinate system of the world coordinate system according to the second coordinate, determine a pitch angle of the target camera according to the first distance and the third distance, and determine a yaw angle of the target camera according to the second distance and the third distance. The determination unit is configured to determine a second calibration parameter of the target camera according to the first scale feature and the first direction feature.

8. An electronic device, comprising: A computer program product for electronic data interchange, wherein the computer program product causes a computer to perform the method of any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, A computer program for electronic data interchange, wherein the computer program causes a computer to perform the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Camera external parameter calibration method and device and electronic equipment

    CN110322513A

  • Camera calibration method and device

    CN115713564A