Camera correction method, electronic device, and computer-readable storage medium

By collecting depth images and color images with an RGBD camera and converting them into color texture images, the differences in the target area can be identified, which solves the environmental dependence and operational complexity of existing camera calibration methods and achieves efficient and accurate camera correction.

CN118781201BActive Publication Date: 2025-10-21DIANYUN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410767287.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-10-21
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Existing camera calibration methods require setting up reference objects and measuring real distances, which makes the operation cumbersome and highly dependent on the environment.

Method used

The depth image and color image are collected by the RGBD camera, converted into color texture images, and the differences in the target area are identified to correct the camera origin and realize camera calibration.

Benefits of technology

No external environment settings or measurements are required to determine whether the camera needs calibration, which reduces the difficulty of calibration and improves calibration efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118781201B_ABST
    Figure CN118781201B_ABST
Patent Text Reader

Abstract

The application provides a camera correction method, an electronic device and a computer readable storage medium, wherein the method can comprise: acquiring a depth image and a first color image of a target region by a target camera, wherein the target camera is an RGBD camera; determining a color texture image based on the depth image and the first color image; and correcting an origin of a coordinate system corresponding to the target camera if the color texture image is different from the target region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera technology, and in particular to a camera calibration method, an electronic device, and a computer-readable storage medium. Background Art

[0002] To enable a depth camera to more accurately capture depth images of an object, it typically needs to be calibrated. Current calibration methods require setting up a reference object and measuring the actual distance between the camera and the reference object in advance. This results in numerous constraints and is relatively complex to implement. Summary of the Invention

[0003] The purpose of this application is to provide a camera calibration method, an electronic device, and a computer-readable storage medium, which can achieve camera calibration in a simpler way.

[0004] In a first aspect, the present invention provides a camera calibration method, comprising: acquiring a depth image and a first color image of a target area through a target camera, wherein the target camera is an RGBD camera; determining a color texture image based on the depth image and the first color image; and if there is a difference between the color texture image and the target area, correcting the origin of the coordinate system corresponding to the target camera.

[0005] In the above embodiment, the depth image is converted into a color texture image to identify whether the origin of the target camera needs to be calibrated, and the camera calibration is further achieved by calibrating the origin. In this way, whether the target camera needs to be calibrated can be determined without setting up or measuring the external environment, which can reduce the difficulty of camera calibration and reduce the impact of environmental factors on camera calibration.

[0006] In an optional embodiment, the target camera includes a depth sensor and a color sensor; determining the color texture image based on the depth image and the first color image includes: converting the coordinates of the pixel points in the depth image from the depth sensor coordinate system to the color sensor coordinate system, and projecting it onto the first color image to obtain the color texture image.

[0007] In the above embodiment, a color texture image can be obtained by transforming the coordinates of each pixel in the depth image. The transformation of each pixel can better characterize the texture of each object in the target area, so that the difference between the color texture image and the target area can be more accurately determined.

[0008] In an optional embodiment, converting the coordinates of the pixel points in the depth image from the depth sensor coordinate system to the color sensor coordinate system, and projecting it to the first color image to obtain a color texture image, includes: extracting a first point cloud in the depth sensor coordinate system from the depth image; converting the first point cloud into a second point cloud in the color sensor coordinate system; and projecting the second point cloud to the first color image to obtain a color texture image.

[0009] In an optional embodiment, converting the first point cloud into a second point cloud in the coordinate system of the color sensor includes: using the transformation matrix in the external parameters of the target camera to perform transformation calculations on each point in the first point cloud to obtain the second point cloud in the coordinate system of the color sensor.

[0010] In the above embodiment, the points in the image can be abstracted into a point cloud to facilitate the conversion of points between different coordinate systems, which can achieve more accurate and efficient image conversion and further improve the efficiency of camera origin correction and camera calibration.

[0011] In an optional embodiment, correcting the origin of the coordinate system corresponding to the target camera includes correcting the origin of the coordinate system corresponding to the target camera according to an offset between the object in the color texture image and the object in the target area.

[0012] In an optional embodiment, the correcting the origin of the coordinate system corresponding to the target camera based on the offset between the object in the color texture image and the object in the target area includes: if the object in the color texture image and the object in the target area are offset in a first direction, moving the origin of the target camera in a second direction, wherein the first direction and the second direction are opposite directions.

[0013] In the above embodiment, the possible offset of the texture corresponding to the depth image can be corrected by translating the origin, and the camera can be calibrated.

[0014] In an optional embodiment, the method further includes: acquiring a second color image of the target area through the target camera; and comparing the color texture image with the second color image to determine whether there is a difference between the color texture image and the target area.

[0015] In the above embodiment, by comparing the converted color texture image with the second color image of the target area actually acquired, the need for human participation can be reduced, the efficiency of camera calibration can be improved, and the calibration result can be made more objective.

[0016] In a second aspect, the present invention provides an electronic device comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method described in any one of the aforementioned embodiments.

[0017] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which executes the steps of the method described in any one of the aforementioned embodiments when the computer program is executed by a processor.

[0018] In a fourth aspect, the present invention provides a computer program product, comprising a computer program, which implements the method described in any one of the aforementioned embodiments when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A block diagram of an electronic device provided in an embodiment of the present application;

[0021] Figure 2 A flowchart of a camera calibration method provided in an embodiment of the present application;

[0022] Figure 3 This is an optional flowchart of step 220 of the camera calibration method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application.

[0024] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.

[0025] An RGBD camera is a camera that can output both RGB and depth images. The depth image can be based on indirect Time of Flight (iToF) or direct Time of Flight (dToF) technology, or other technologies. ToF (Time of Flight) is a technology that uses the time of flight of light to measure distance, measuring the delay between the emitted light and the light emitted by the object.

[0026] In practice, to ensure more accurate depth images measured by the depth sensor in an RGBD camera, the camera must be calibrated. Current camera calibration methods typically use a reference object and measure the actual distance between the object and the camera. This approach not only imposes strict environmental requirements but also requires manual measurements prior to calibration, making it relatively cumbersome to implement.

[0027] Based on the above situation, the embodiments of the present application can provide a camera calibration method, electronic device and computer-readable storage medium, which can reduce the difficulty of camera calibration and improve the efficiency of camera calibration.

[0028] To facilitate understanding of this embodiment, the electronic device that executes the camera calibration method disclosed in the embodiment of the present application is first introduced in detail.

[0029] like Figure 1 , which is a block diagram of an electronic device. The electronic device 100 may include a memory 111 and a processor 113. A person skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the electronic device 100. For example, the electronic device 100 may further include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0030] The aforementioned memory 111, storage controller 112, processor 113, peripheral interface 114, input / output unit 115, and display unit 116 are electrically connected to each other, directly or indirectly, to enable data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines. The aforementioned processor 113 is used to execute the executable modules stored in the memory.

[0031] The memory 111 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 111 is used to store programs, and the processor 113 executes the programs after receiving an execution instruction. The method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application can be applied to the processor 113 or implemented by the processor 113.

[0032] The processor 113 may be an integrated circuit chip with signal processing capabilities. The processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), a dedicated integrated circuit (ASIC), or a processor.

[0033] An application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0034] In this embodiment, the electronic device 100 may be an RGBD camera, which is provided with a memory and a processor for processing the depth image captured by the RGBD camera to implement camera calibration. The electronic device 100 may also be a computer device with image processing capabilities, which can obtain the color image and depth image captured by the RGBD camera and implement camera calibration based on the processing of the color image and depth image.

[0035] The electronic device 100 in this embodiment can be used to execute each step in each method provided in the embodiments of the present application. The implementation process of the camera calibration method is described in detail below through several embodiments.

[0036] See also Figure 2 , is a flow chart of the camera calibration method provided by the embodiment of the present application. The camera calibration method provided by the embodiment of the present application can be applied to an electronic device, and the steps in the camera calibration method are performed by the electronic device. Figure 2 The specific process shown is described in detail.

[0037] Step 210 : Capture a depth image and a first color image of the target area through a target camera.

[0038] Exemplarily, the target camera may be an RGBD camera, which may include a color sensor and a depth sensor.

[0039] The color sensor can be used to capture a color image, and the color image can be an RGB (Red Green Blue) image.

[0040] The depth sensor can be used to collect depth images. For example, the depth sensor can use ToF technology to collect depth images.

[0041] Optionally, the depth image and the first color image may be images obtained by photographing the target area at the same position by a target camera.

[0042] For subsequent recognition of the scene in the target area, the target area may include at least some objects with bright colors. For example, the target area may include objects with colors different from the background color.

[0043] Step 220: Determine a color texture image based on the depth image and the first color image.

[0044] Exemplarily, the depth image may be an image in a depth sensor coordinate system, and the color texture image may be an image in a color sensor coordinate system.

[0045] Optionally, the color texture image can be obtained by performing a coordinate transformation on the depth image. For example, the coordinate system of each pixel in the depth image can be transformed, and then the point obtained after the coordinate transformation is projected onto the first color image to obtain the color texture image.

[0046] If the color texture image differs from the target area, step 230 may be performed. If the color texture image does not differ from the target area, it may indicate that the origin of the depth sensor of the target camera is accurate, and the origin of the coordinate system of the depth sensor of the target camera may not be corrected.

[0047] Step 230: calibrate the origin of the coordinate system corresponding to the target camera.

[0048] For example, the difference between the color texture image and the target area can be an offset between the color texture and the actual object in the target area. The offset can be a downward offset of the color texture relative to the object in the target area, an upward offset of the color texture relative to the object in the target area, a leftward offset of the color texture relative to the object in the target area, or a rightward offset of the color texture relative to the object in the target area. Of course, the offset can also be in other directions.

[0049] The origin can be corrected in a direction opposite to the color texture offset direction in the color texture image to achieve correction of the target camera origin, thereby achieving calibration of the target camera.

[0050] In this embodiment, the camera calibration method may be to calibrate the depth capture portion of the camera. The calibration of the origin of the coordinate system corresponding to the target camera may be to calibrate the origin of the coordinate system of the depth sensor in the target camera.

[0051] The above implementation method can complete camera calibration by processing the depth image captured by the target camera to determine whether the camera needs to be calibrated, and then perform camera calibration based on the requirements, without the need to set up a specific calibration scene or scene measurement. This implementation method can reduce the requirements for camera calibration and improve the efficiency of camera calibration.

[0052] The conversion of different types of images is actually the difference in the coordinate system of the image acquisition device. Based on this, the above-mentioned step 220 may include converting the coordinates of the pixel points in the depth image from the depth sensor coordinate system to the color sensor coordinate system, and projecting it onto the first color image to obtain a color texture image.

[0053] For example, coordinate transformation may be performed on each pixel point, and the coordinates obtained after the coordinate transformation may be the coordinates of the pixel point in the color texture image.

[0054] In one embodiment, the conversion relationship from the depth image to the color image may be calculated based on the parameters of the target camera.

[0055] Exemplarily, the camera parameters may include a camera model of the depth sensor, a camera model of the color sensor, and a conversion matrix between a three-dimensional coordinate system of the depth sensor and a three-dimensional coordinate system of the color sensor.

[0056] The depth sensor's camera model can be used to convert pixel coordinates in the depth image from pixel coordinates to coordinates in the depth sensor's three-dimensional coordinate system; the conversion matrix between the depth sensor's three-dimensional coordinate system and the color sensor's three-dimensional coordinate system can be used to convert the depth sensor's three-dimensional coordinate system coordinates to coordinates in the color sensor's three-dimensional coordinate system; and the color sensor's camera model can be used to convert the color sensor's three-dimensional coordinate system coordinates to pixel coordinates in the color image. Therefore, the camera parameters, which include the depth sensor's camera model, the color sensor's camera model, and the conversion matrix between the depth sensor's three-dimensional coordinate system and the color sensor's three-dimensional coordinate system, can determine the conversion relationship from the depth image to the color image.

[0057] For each pixel in the depth image, calculations are performed based on the depth value, coordinates, and transformation relationship of the pixel to obtain the coordinates of each pixel in the color texture image.

[0058] In another embodiment, Figure 3 As shown, the above step 220 may include steps 221 to 223.

[0059] Step 221 : extracting a first point cloud in the depth sensor coordinate system from the depth image.

[0060] Optionally, the conversion between the depth image and the first point cloud may be implemented using a camera model of the depth sensor of the target camera.

[0061] Exemplarily, the geometric relationship of the camera model of the depth sensor can be expressed as:

[0062] p D =(u D , v D ,f)T;

[0063] P D =(X D , Y D , Z D )T;

[0064] Among them, p D represents the pixel coordinates of the pixel point in the depth image obtained by the depth sensor; (u D ,v D ) represents the two-dimensional pixel coordinates on the depth image of the pixel point, and f represents the focal length of the camera. D Represents three-dimensional coordinates; (XD , Y D , Z D ) represents the coordinates of the first target point in the world coordinate system corresponding to the depth sensor. According to the trigonometric relationship, we can get: Z D =(f / u D )X D ; Z D =(f / v D )X D .

[0065] Based on the above model, the pixels in the depth image can be converted to coordinates in the world coordinate system.

[0066] Taking the pixel point (u1, v1) in the depth image as an example, D(u1, v1) represents the depth value Z1 corresponding to the pixel point (u1, v1).

[0067] Using the camera model above, we can calculate the horizontal coordinates of the pixel in the world coordinate system as X1 = (u1 / f)Z1 and Y1 = (v1 / f)Z1. (X1, Y1, Z1) represents the three-dimensional coordinates of the pixel (u1, v1) in three-dimensional space.

[0068] All pixel points in the depth image can obtain three-dimensional coordinates in the world coordinate system in the form of pixel points (u1, v1), so that the first point cloud of the depth image can be obtained.

[0069] Step 222 : converting the first point cloud into a second point cloud in the coordinate system of the color sensor.

[0070] The coordinate systems used by the depth sensor and color sensor of the target camera in the three-dimensional space are usually inconsistent. Therefore, the three-dimensional points detected by the depth sensor can be transferred from the coordinate system corresponding to the depth sensor to the coordinate system corresponding to the color sensor through coordinate transformation.

[0071] Optionally, a transformation matrix in the extrinsic parameters of the target camera may be used to perform transformation calculations on each point in the first point cloud to obtain a second point cloud in the coordinate system of the color sensor.

[0072] Exemplarily, the external parameters of the target camera may include a transformation matrix. For example, the coordinates of the first point in the coordinate system corresponding to the depth sensor are the first coordinates (X D1 , Y D1 , Z D1 ), the first coordinate (X D1 , Y D1 , Z D1 ) is multiplied by the transformation matrix to obtain the second coordinate (X R1 , Y R1, Z R1 ).

[0073] The coordinates of all points in the first point cloud can be multiplied by the transformation matrix to obtain a second point cloud. The points in the second point cloud are points in the coordinate system corresponding to the color sensor.

[0074] Step 223 : Projecting the second point cloud onto the first color image to obtain a color texture image.

[0075] For example, the coordinates of the points in the second point cloud may be converted into pixel coordinates of the color sensor, which may be coordinates in a two-dimensional plane.

[0076] Optionally, the second point cloud may be projected onto the first color image using a camera model of the color sensor of the target camera to obtain a color texture image.

[0077] Exemplarily, the geometric relationship of the camera model of the color sensor can be expressed as:

[0078] p=(u R , v R ,f)T;

[0079] P R =(X R , Y R , Z R )T;

[0080] Where, p represents the pixel coordinate; (u R , v R ) represents the two-dimensional pixel coordinates of the pixel point on the color image, and f represents the focal length of the camera. R Represents three-dimensional coordinates; (X R ,Y R ,Z R ) represents the coordinates of the second target point in the world coordinate system corresponding to the color sensor. According to the trigonometric relationship, we can get: u=f(X R / Z R )+c x ; v=f(Y R / Z R )+c y .

[0081] Among them, (c x , c y ) represents the relative coordinates of the optical center of the color sensor on the color image.

[0082] The second point cloud is mapped to the pixel coordinate system of the color sensor through the camera model of the color sensor, and the points of the second point cloud under the pixel coordinates of the color sensor are projected onto the first color image to obtain a color texture image.

[0083] The above method can realize the conversion between image coordinates and three-dimensional world coordinates, thereby further realizing the conversion between depth image and color texture image.

[0084] In the embodiment of the present application, whether there is a difference between the color texture image and the target area can be determined based on the comparison between the color texture image and the real scene of the target area.

[0085] In one embodiment, an interactive interface may be provided to determine whether there is a difference between the color texture image and the target area by receiving identification data input by the user.

[0086] For example, the identification data may include whether there is a difference between the color texture image and the target area. If there is a difference between the color texture image and the target area, the identification data may also include the type of difference. The type of difference may include a texture offset in the color texture image.

[0087] Optionally, the interactive interface may include multiple input boxes, each input box is used to receive different identification data.

[0088] In one embodiment, image comparison can be used to determine whether there are differences between the color texture image and the target area. Based on this, the camera calibration method of the embodiment of the present application may further include: acquiring a second color image of the target area using the target camera; and comparing the color texture image with the second color image to determine whether there are differences between the color texture image and the target area.

[0089] For example, it may be possible to determine whether there is a difference between the color texture image and the target area by comparing the textures of the key objects in the two images.

[0090] Optionally, the depth image and the second color image may be images obtained by capturing the target area at the same position by the target camera. It can be understood that the depth image and the objects in the second color image are in one-to-one correspondence and have the same relative position in the image.

[0091] Exemplarily, the object in the target area includes a target ornament. The location of the target ornament can be determined by identifying the second color image, and further identifying whether the texture of the target ornament in the color texture image is located at the location of the target ornament, so as to determine whether there is a difference between the color texture image and the target area. For example, if the texture of the target ornament coincides with the location of the target ornament, it can be determined that there is no difference between the color texture image and the target area. For another example, if the texture of the target ornament does not completely coincide with the location of the target ornament, it can be determined that there is a difference between the color texture image and the target area. For another example, if the texture of the target ornament does not completely coincide with the location of the target ornament, and the texture of the target ornament is relatively left compared to the location of the target ornament, it can be determined that there is an offset between the color texture image and the target area.

[0092] Optionally, the location of the target ornament in the second color image can be determined using an image recognition model, which can be a pre-trained neural network model.

[0093] After determining that there is a difference between the color texture image and the target area, correction of the origin of the target camera is performed.

[0094] Optionally, the above-mentioned step 230 may include correcting the origin of the coordinate system corresponding to the target camera according to the offset between the object in the color texture image and the object in the target area.

[0095] Exemplarily, if the object in the color texture image and the object in the target area are offset in a first direction, the origin of the target camera is moved in a second direction.

[0096] The first direction and the second direction are opposite directions. For example, if the first direction is the negative direction of the x-axis, the second direction can be the positive direction of the x-axis. In actual scenarios, the first direction can be more than just the direction of the three axes of the coordinate system.

[0097] In this embodiment, the camera calibration implemented based on the processing of the depth image may be calibration of the origin of the depth sensor of the target camera.

[0098] According to the method provided in the embodiments of the present application, there is no need to additionally measure the distance from a given reference object to the target camera, thereby enabling more convenient camera calibration. Furthermore, camera calibration achieved using the methods provided in the embodiments of the present application is more intuitive for the user and can be performed using image processing software running on the target camera. Alternatively, it can be performed using image processing software running on a computer device connected to the target camera.

[0099] In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the camera calibration method described in the above method embodiment are executed.

[0100] The computer program product of the camera calibration method provided in the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the camera calibration method described in the above method embodiments. For details, please refer to the above method embodiments and will not be repeated here.

[0101] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0102] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0103] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling 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 method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0104] The foregoing description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.

[0105] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A camera calibration method, characterized in that: include: Capturing a depth image and a first color image of a target area through a target camera, wherein the target camera is an RGBD camera including a depth sensor and a color sensor, the depth image is acquired by the depth sensor, and the first color image is acquired by the color sensor; Determining a color texture image based on the depth image and the first color image includes: extracting a first point cloud in the depth sensor coordinate system from the depth image; converting the first point cloud into a second point cloud in the color sensor coordinate system; and projecting the second point cloud onto the first color image to obtain a color texture image; capturing a second color image of the target area through the target camera, and comparing the color texture image with the second color image to determine whether there is a difference between the color texture image and the target area; or providing an interactive interface to determine whether there is a difference between the color texture image and the target area by receiving recognition data input by a user; If there is a difference between the color texture image and the target area, the origin of the coordinate system corresponding to the target camera is corrected, including: according to the offset between the object in the color texture image and the object in the target area, the origin of the coordinate system of the depth sensor in the target camera is corrected.

2. The method according to claim 1, characterized in that The converting the first point cloud into a second point cloud in the coordinate system of the color sensor includes: Using the conversion matrix in the extrinsic parameters of the target camera, a conversion calculation is performed on each point in the first point cloud to obtain a second point cloud in the coordinate system of the color sensor.

3. The method according to claim 1, characterized in that The correcting the origin of the coordinate system corresponding to the target camera according to the offset between the object in the color texture image and the object in the target area includes: If the object in the color texture image and the object in the target area are offset in a first direction, the origin of the target camera is moved in a second direction, wherein the first direction and the second direction are opposite directions.

4. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method according to any one of claims 1 to 3.

5. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 3.

6. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Test method and test system based on depth estimation performance of depth camera

    CN112102387A