Distance measurement calibration method, device and system, electronic equipment and readable storage medium

By acquiring two images in the closed and open states of the imaging device in the camera calibration method, and using preset images for distance measurement calibration, the problem of inaccurate camera calibration results in the prior art is solved, and higher calibration accuracy and fault tolerance are achieved.

CN119722806APending Publication Date: 2025-03-28MIDEA ROBOZONE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311264615.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing camera calibration methods are not accurate enough due to camera distortion and cumulative errors of internal and external parameters, especially when measuring distances of long-distance objects.

Method used

A range measurement calibration method is proposed. By acquiring two images respectively when the imaging device is turned off and on, and using preset images for range measurement calibration, the dependence on the camera's internal and external parameters is reduced.

Benefits of technology

This method can cover the plane field of view in front of the camera of the device to be calibrated, reduce the influence of light, improve the robustness and accuracy of the calibration results, have good fault tolerance, and improve the accuracy of the distance measurement work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722806A_ABST
    Figure CN119722806A_ABST
Patent Text Reader

Abstract

The invention provides a ranging calibration method, device and system, electronic equipment and a readable storage medium. The distance measurement calibration method is applied to the distance measurement calibration system comprising a computing device and an imaging device and executed by the computing device, and the distance measurement calibration method comprises the steps of obtaining a first image under the condition that the imaging device is closed; controlling the imaging device to be started, and controlling the imaging device to generate a calibration image; obtaining a second image, wherein the second image comprises a calibration image; performing distance measurement calibration according to the first image, the second image and a preset image to obtain a calibration result; wherein the first image and the second image are obtained by shooting of the to-be-calibrated device controlled by the computing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera calibration, and in particular to a distance measurement calibration method, device and system, electronic equipment and readable storage medium. Background Art

[0002] At present, the common camera calibration algorithm is to take a picture of the calibration plate in the world space, calculate the camera's internal and external parameters, and then calculate the world space position of a point in the image based on the projection model. However, due to camera distortion and the cumulative error of internal and external parameters, the traditional calibration result of the camera using the camera's internal and external parameters is not accurate enough, and the error is large when measuring the distance of objects, especially distant objects. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.

[0004] To this end, the first aspect of the present invention is to propose a distance measurement calibration method.

[0005] The second aspect of the present invention is to provide a distance measurement and calibration device.

[0006] The third aspect of the present invention is to provide a distance measurement and calibration system.

[0007] A fourth aspect of the present invention is to provide an electronic device.

[0008] A fifth aspect of the present invention is to provide a readable storage medium.

[0009] In view of this, according to one aspect of the present invention, a distance measurement calibration method is proposed, which is applied to a distance measurement calibration system including a computing device and an imaging device, and is executed by the computing device. The distance measurement calibration method includes: when the imaging device is turned off, acquiring a first image; controlling the imaging device to be turned on, and controlling the imaging device to generate a calibration image; acquiring a second image, the second image including a calibration image; performing distance measurement calibration according to the first image, the second image and a preset image to obtain a calibration result; wherein the first image and the second image are obtained by shooting the device to be calibrated under the control of the computing device, and the preset image corresponds to the calibration image.

[0010] The execution subject of the technical solution of the distance measurement and calibration method provided by the present invention can be an electronic device, or a distance measurement and calibration device, and can also be determined according to actual use requirements, which is not specifically limited here. In order to more clearly describe the distance measurement and calibration method provided by the present invention, the execution subject of the distance measurement and calibration method is described below as a computing device in a distance measurement and calibration system.

[0011] The distance measurement calibration method provided by the present invention is used to calibrate the distance measurement work of the device to be calibrated. In the actual application process, the above-mentioned device to be calibrated can be a cleaning robot, an obstacle avoidance robot, a sweeping robot, a floor washing robot, a sweeping and mopping robot and other visual devices working on a plane or other planes, and no specific restrictions are made here. On this basis, the distance measurement calibration method proposed by the present invention can be specifically used for the camera distance measurement calibration of a robot with a distance measurement function working on a plane before leaving the factory.

[0012] Furthermore, the distance measurement calibration method proposed in the present invention is applied to a distance measurement calibration system, which includes a computing device and an imaging device, and the distance measurement calibration method of the present invention is executed by the computing device therein.

[0013] The computing device has computing and / or control functions. In actual application, the computing device may be a host computer, which is not specifically limited here.

[0014] Furthermore, during the operation of the ranging calibration system, the imaging device is communicatively connected to the computing device, and the computing device is also communicatively connected to the device to be calibrated, so that the computing device can control the imaging device and the device to be calibrated to work, so as to realize the ranging calibration of the monocular camera of the device to be calibrated.

[0015] Specifically, in the ranging calibration method provided by the present invention, after the operator places the computing device, the imaging device and the device to be calibrated at the corresponding positions as required, and connects the imaging device, the computing device and the device to be calibrated via a data cable, the operator can control the computing device to start executing the steps of the ranging calibration method proposed by the present invention.

[0016] On this basis, during the first calibration process, the imaging device is in a closed state by default. When the imaging device is in a closed state, the computing device controls the device to be calibrated to shoot the area to be imaged of the imaging device, and obtains the first image shot by the device to be calibrated. It can be understood that when the first image is shot when the imaging device is not turned on, the first image only contains the environmental features of the area to be imaged.

[0017] Further, the computing device controls the imaging device to turn on, and controls the imaging device to generate and display the calibration image in the above-mentioned area to be imaged. On this basis, when the imaging device is in the turned-on state, the computing device again controls the device to be calibrated to shoot the area to be imaged of the imaging device, that is, to shoot the displayed calibration image, and obtain the second image shot by the device to be calibrated. It can be understood that when the second image is shot when the imaging device is turned on, the second image also includes the above-mentioned calibration image when it includes the environmental features of the area to be imaged.

[0018] Furthermore, a preset image corresponding to the calibration image is pre-stored in the computing device. After the computing device obtains the first image and the second image, the computing device further performs ranging calibration based on the preset image, the second image and the first image to obtain the ranging calibration result of the device to be calibrated. In this way, the ranging calibration method proposed by the present invention connects the device to be calibrated through the computing device and controls it to take pictures of the specified area, and then performs calibration calculation in the computing device to obtain the ranging calibration result of the device to be calibrated. In this way, the calibration method can cover the plane field of view in front of the camera of the device to be calibrated, and can better cover the pixels below the horizon in the image. In addition, the ranging calibration is performed by generating and displaying the calibration image through the imaging device, which is not easily affected by the illumination, and meets the actual working scenario that the device to be calibrated pays more attention to the plane area in front of the camera. At the same time, the calibration method reduces the disadvantages of ranging calibration through the internal and external parameters of the camera, so that the robustness and accuracy of the calibration result are better, and has a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy, thereby improving the accuracy of the subsequent ranging work of the device to be calibrated.

[0019] The distance measurement calibration method according to the present invention may also have the following additional technical features:

[0020] In the above technical solution, ranging calibration is performed according to the first image, the second image and the preset image to obtain a calibration result, including: denoising the second image according to the first image to obtain a third image; coordinate matching is performed on the third image and the preset image to obtain a matching result; and the calibration result is determined according to the matching result.

[0021] In this technical solution, after acquiring the second image and the first image, the computing device will perform noise reduction processing on the second image based on the first image. The first image is obtained when the imaging device is in a closed state and the computing device controls the device to be calibrated to shoot the area to be imaged of the imaging device, and the second image is obtained when the imaging device is in an open state and the computing device controls the device to be calibrated to shoot the area to be imaged of the imaging device, that is, the displayed calibration image is shot. That is, the first image only contains the environmental features of the area to be imaged, and the second image contains the environmental features of the area to be imaged and the calibration image. Therefore, by performing noise reduction processing on the second image through the first image, the environmental features in the second image can be removed, thereby obtaining a third image containing only the calibration image, so as to reduce the interference of environmental factors on the calibration results, thereby improving the accuracy of the calibration results.

[0022] Furthermore, after obtaining the third image, the computing device performs coordinate matching on the preset image and the third image, and obtains a matching result. The computing device stores the world coordinate information of the preset image. The computing device can determine the position of the pixel points in the third image in the world coordinate by performing coordinate matching on the preset image and the third image. On this basis, the computing device determines the calibration result of the device to be calibrated based on the world coordinate information of the pixel points in the third image. In this way, the calibration result is determined based on the coordinate matching result of the third image of the preset image, so that the robustness and accuracy of the calibration result are better, and there is a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy.

[0023] In any of the above technical solutions, the shooting areas of the first image and the second image are the same, and the second image is subjected to noise reduction processing according to the first image to obtain the third image, including: performing difference processing on the first image and the second image to obtain the third image.

[0024] In this technical solution, the shooting area of ​​the second image is the same as that of the first image. That is, when the computing device controls the device to be calibrated to shoot the first image and the second image, the shooting position and shooting angle of the device to be calibrated are the same, so that the environmental features contained in the second image and the first image obtained by shooting are the same, and the pixels in the second image and the first image correspond one to one.

[0025] On this basis, in the process of the computing device performing noise reduction processing on the second image, the computing device performs difference processing on the second image and the first image. Specifically, the computing device performs difference processing on the pixel values ​​of corresponding pixels in the second image and the first image, so as to subtract the pixel value of the corresponding pixel in the first image from the pixel value of each pixel in the second image, thereby removing the environmental features in the second image and obtaining a third image containing only the calibration image, so as to reduce the interference of environmental factors on the calibration result, thereby improving the accuracy of the calibration result.

[0026] In any of the above technical solutions, coordinate matching is performed on the third image and the preset image to obtain a matching result, including: extracting at least one target feature point in the third image; coordinate matching is performed on at least one target feature point with the feature point in the preset image to determine the world coordinate information of at least one target feature point; and the world coordinate information of at least one target feature point is determined as the matching result.

[0027] In this technical solution, in the process of the computing device performing coordinate matching on the preset image and the third image, specifically, the computing device performs a feature point extraction operation on the third image to determine at least one target feature point in the third image. Furthermore, the computing device stores feature point information of the preset image and stores world coordinate information of each feature point. On this basis, the computing device performs coordinate matching on the feature points in the preset image and each extracted target feature point to determine the position of each target feature point in the third image in the world coordinate, that is, to determine the world coordinate information of each target feature point, so as to obtain the coordinate matching result of the third image.

[0028] In any of the above technical solutions, determining the calibration result according to the matching result includes: interpolating the third image to obtain an interpolated image; and determining the world coordinate information of each pixel point in the interpolated image according to the matching result to obtain the calibration result.

[0029] In this technical solution, in the process of determining the calibration result based on the coordinate matching result of the third image by the computing device based on the preset image, specifically, the computing device performs pixel interpolation processing on the third image after the feature point extraction, and obtains an interpolated image. It can be understood that after the target feature points are extracted from the third image, the extracted target feature points are sparsely distributed in the third image. Therefore, in order to ensure the coverage rate of the calibration result for each pixel point in the shooting area of ​​the monocular camera, that is, in order to ensure the accuracy of the calibration result, the computing device performs pixel interpolation on the peripheral position of each target feature point in the third image to obtain an interpolated image with densely distributed pixels.

[0030] On this basis, the computing device determines the position of each pixel point in the third image obtained by interpolation in the world coordinates based on the position of each target feature point in the third image obtained by the above matching, that is, the world coordinate information, so as to obtain the world coordinate information of each pixel point in the third image, and then obtain the distance measurement calibration result of the device to be calibrated. In this way, the distance information between each pixel point in the third image is determined based on the interpolation method, and then the world coordinate information of each pixel point in the third image is determined, instead of obtaining the distance information of the image pixel through the traditional internal and external parameter calibration, which reduces the disadvantages of the distance measurement calibration through the internal and external parameters of the camera, makes the calibration result more robust and accurate, and has a certain tolerance to external parameters and camera distortion, improves the calibration accuracy, and thus improves the accuracy of the subsequent distance measurement work of the device to be calibrated.

[0031] In any of the above technical solutions, after obtaining the calibration result, the ranging calibration method further includes: loading the calibration result into the device to be calibrated.

[0032] In this technical solution, after a computing device performs distance measurement calibration on a device to be calibrated to obtain a corresponding calibration result, the computing device inputs the obtained calibration result into the device to be calibrated through a communication data line between the computing device and the device to be calibrated, so that the device to be calibrated can subsequently perform distance measurement based on the calibration result, thereby improving the accuracy of the distance measurement work of the device to be calibrated.

[0033] In any of the above technical solutions, before loading the calibration result into the device to be calibrated, the ranging calibration method further includes: checking the calibration result; and sending indication information according to the check result.

[0034] In this technical solution, before the computing device inputs the obtained calibration result into the memory of the device to be calibrated through the communication data line between the computing device and the device to be calibrated, the computing device will also perform a correctness check on the distance measurement calibration result of the device to be calibrated to determine whether the calibration result of the device to be calibrated is passed, and then send corresponding indication information to the user according to the correctness check result. Specifically, when the computing device determines that the calibration result of the device to be calibrated is passed, the computing device sends indication information indicating successful calibration to the user, and when the computing device determines that the calibration result of the device to be calibrated is not passed, the computing device sends indication information indicating failed calibration to the user, so that the user can immediately control the computing device to calibrate the device to be calibrated again until the calibration of the device to be calibrated is successful.

[0035] According to a second aspect of the present invention, a distance measurement calibration device is provided. The device is applied to a computing device in a distance measurement calibration system. The distance measurement calibration system also includes an imaging device. The distance measurement calibration device includes: an acquisition unit, which is used to acquire a first image when the imaging device is turned off; a control unit, which is used to control the imaging device to be turned on and control the imaging device to generate a calibration image; the acquisition unit is also used to acquire a second image, and the second image includes a calibration image; a processing unit is used to perform distance measurement calibration according to the first image, the second image and a preset image to obtain a calibration result; wherein the first image and the second image are obtained by the computing device controlling the device to be calibrated to shoot, and the preset image corresponds to the calibration image.

[0036] The distance measurement calibration device provided by the present invention is used to calibrate the distance measurement work of the device to be calibrated. In the actual application process, the above-mentioned device to be calibrated can be a cleaning robot, an obstacle avoidance robot, a sweeping robot, a floor washing robot, a sweeping and mopping robot and other visual devices working on a plane or other planes, and no specific restrictions are made here. On this basis, the distance measurement calibration device proposed by the present invention can be specifically used for the camera distance measurement calibration of a robot with a distance measurement function working on a plane before leaving the factory.

[0037] Furthermore, the distance measurement and calibration device proposed in the present invention is applied to a host computer in a distance measurement and calibration system, and the distance measurement and calibration system also includes an imaging device.

[0038] The computing device has computing and / or control functions. In actual application, the computing device may be a host computer, which is not specifically limited here.

[0039] During the operation of the ranging calibration system, the imaging device is communicatively connected to the computing device, and the computing device is also communicatively connected to the device to be calibrated, so that the computing device can control the imaging device and the device to be calibrated to work, so as to realize the ranging calibration of the monocular camera of the device to be calibrated.

[0040] Specifically, after the operator places the computing device, the imaging device and the device to be calibrated in the corresponding positions as required, and connects the imaging device, the computing device and the device to be calibrated through a data cable, the operator can control the computing device to start the ranging calibration. For example, the operator turns on the ranging calibration function of the computing device by clicking the "Start Calibration" button on the computing device.

[0041] On this basis, during the first calibration process, the imaging device is in a closed state by default. When the imaging device is in the closed state, the control unit of the ranging calibration device controls the device to be calibrated to shoot the imaging area of ​​the imaging device, and the acquisition unit of the ranging calibration device acquires the first image captured by the device to be calibrated. It can be understood that when the first image is taken when the imaging device is not turned on, the first image only contains the environmental features of the imaging area.

[0042] Further, the control unit controls the imaging device to turn on, and controls the imaging device to generate and display the calibration image in the above-mentioned area to be imaged. On this basis, when the imaging device is in the turned-on state, the control unit again controls the device to be calibrated to shoot the area to be imaged of the imaging device, that is, to shoot the displayed calibration image, and the acquisition unit acquires the second image captured by the device to be calibrated. It can be understood that when the second image is shot when the imaging device is turned on, the second image also includes the above-mentioned calibration image when it includes the environmental features of the area to be imaged.

[0043] Furthermore, a preset image corresponding to the calibration image is pre-stored in the computing device. After the first image and the second image are acquired by the acquisition unit, the processing unit of the distance measurement calibration device further performs distance measurement calibration based on the preset image, the second image and the first image to obtain the distance measurement calibration result of the device to be calibrated. In this way, the distance measurement calibration device proposed by the present invention connects the device to be calibrated through the computing device and controls it to take pictures of the specified area, and then performs calibration calculation in the computing device to obtain the distance measurement calibration result of the device to be calibrated. In this way, the plane field of view in front of the camera of the device to be calibrated can be covered, and the pixels below the horizon in the image can be well covered. In addition, the distance measurement calibration is performed by generating and displaying the calibration image through the imaging device, which is not easily affected by light, and meets the actual working scenario that the device to be calibrated pays more attention to the plane area in front of the camera. At the same time, the disadvantages of distance measurement calibration through internal and external parameters of the camera are reduced, so that the robustness and accuracy of the calibration result are better, and there is a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy, thereby improving the accuracy of subsequent distance measurement work of the device to be calibrated.

[0044] According to a third aspect of the present invention, a distance measurement and calibration system is proposed, comprising: a computing device capable of being communicatively connected to a device to be calibrated; an imaging device, communicatively connected to the computing device; wherein the computing device is used to execute the steps of the distance measurement and calibration method in any of the above technical solutions.

[0045] The computing device of the distance measurement and calibration system proposed in the third aspect of the present invention is used to execute the steps of the distance measurement and calibration method in any of the above technical solutions. Therefore, the distance measurement and calibration system proposed in the third aspect of the present invention has all the beneficial effects of the distance measurement and calibration method in any of the above technical solutions in the first aspect, which will not be repeated here.

[0046] Specifically, the distance measurement and calibration system proposed by the present invention includes a computing device and an imaging device. During the operation of the distance measurement and calibration system, the imaging device and the computing device are in communication connection, and the computing device and the device to be calibrated are also in communication connection, so that the computing device can control the imaging device and the device to be calibrated to work, so as to realize the distance measurement and calibration of the monocular camera of the device to be calibrated.

[0047] Furthermore, the computing device may include calibration software, and the steps of the distance measurement calibration method may be implemented by the calibration software in the computing device. Specifically, after the operator places the computing device, the imaging device, and the device to be calibrated in the corresponding positions as required, and connects the imaging device, the computing device, and the device to be calibrated via a data cable, the operator can control the computing device to start executing the steps of the distance measurement calibration method proposed in the present invention.

[0048] Specifically, when the imaging device is in a closed state, the computing device controls the device to be calibrated to shoot the imaging area of ​​the imaging device, and obtains the first image captured by the device to be calibrated. Further, the computing device controls the imaging device to be turned on, and controls the imaging device to generate and display the calibration image in the above-mentioned imaging area. On this basis, the computing device again controls the device to be calibrated to shoot the imaging area of ​​the imaging device, that is, to shoot the displayed calibration image, and obtains the second image captured by the device to be calibrated. Further, the computing device performs distance measurement calibration based on the preset image, the second image and the first image to obtain the distance measurement calibration result of the device to be calibrated.

[0049] The above-mentioned distance measurement and calibration system according to the present invention may also have the following additional technical features:

[0050] In the above technical solution, the ranging calibration system also includes: a calibration plate, located below the imaging device; during the calibration process, the edge of the calibration plate abuts against the device to be calibrated, and the central axis of the calibration plate is collinear with the central axis of the device to be calibrated.

[0051] In the technical solution, the distance measurement and calibration system further includes a calibration board, which can be a displayable surface such as a screen. During the operation of the distance measurement and calibration system, the calibration board is placed directly below or obliquely below the imaging device, and the computing device controls the imaging device to image and display the calibration image on the calibration board.

[0052] Furthermore, during the calibration process, the device to be calibrated is in contact with the edge of the calibration plate, that is, the front section of the device to be calibrated is in contact with the bottom edge of the curtain, and the central axis of the device to be calibrated is in line with the central axis of the calibration plate. In this way, the calibration result can cover the plane field of view in front of the camera of the device to be calibrated, and can better cover the pixels below the horizon in the image, so that the robustness and accuracy of the calibration result are better, and it has a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy, thereby improving the accuracy of the subsequent ranging work of the device to be calibrated.

[0053] According to a fourth aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the distance measurement calibration method in any of the above technical solutions are implemented. Therefore, the electronic device provided in the fourth aspect of the present invention has all the beneficial effects of the distance measurement calibration method in any of the technical solutions in the first aspect, which will not be repeated here.

[0054] According to a fifth aspect of the present invention, a readable storage medium is provided, on which a program or instruction is stored, and when the program or instruction is executed by a processor, a distance measurement calibration method as in any of the above technical solutions is implemented. Therefore, the readable storage medium provided in the fifth aspect of the present invention has all the beneficial effects of the distance measurement calibration method in any of the technical solutions in the first aspect, and no further description is given here.

[0055] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0057] Figure 1 A schematic diagram of a flow chart of a distance measurement and calibration method according to an embodiment of the present invention is shown;

[0058] Figure 2 The second flowchart of the distance measurement and calibration method according to the embodiment of the present invention is shown;

[0059] Figure 3 The third flowchart of the distance measurement and calibration method according to the embodiment of the present invention is shown;

[0060] Figure 4 FIG4 is a flow chart of a distance measurement and calibration method according to an embodiment of the present invention;

[0061] Figure 5 FIG5 is a flow chart of a distance measurement and calibration method according to an embodiment of the present invention;

[0062] Figure 6 FIG6 shows a sixth flow chart of the distance measurement and calibration method according to an embodiment of the present invention;

[0063] Figure 7 FIG7 shows a flow chart of the distance measurement and calibration method according to an embodiment of the present invention;

[0064] Figure 8 FIG8 is a flow chart of a distance measurement and calibration method according to an embodiment of the present invention;

[0065] Fig. 9 An operation flow chart of distance measurement and calibration according to an embodiment of the present invention is shown;

[0066] Fig.10 A schematic diagram of an interface of a calibration platform of a computing device according to an embodiment of the present invention is shown;

[0067] Fig.11 A structural block diagram of a distance measurement and calibration device according to an embodiment of the present invention is shown;

[0068] Fig.12 A schematic diagram of the structure of a distance measurement and calibration system according to an embodiment of the present invention is shown;

[0069] Fig.13 A structural block diagram of an electronic device according to an embodiment of the present invention is shown.

[0070] in, Fig.12 The corresponding relationship between the structures and labels in is:

[0071] 1200 distance measurement calibration system, 1202 computing device, 1204 imaging device, 1206 device to be calibrated, 1208 calibration board. DETAILED DESCRIPTION

[0072] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0073] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0074] Combine the following Figures 1 to 13 , the ranging calibration method, device and system, electronic device and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0075] In one embodiment of the present invention, Figure 1 As shown, the distance measurement calibration method may specifically include the following steps 102 to 108:

[0076] Step 102, acquiring a first image when the imaging device is turned off;

[0077] Step 104, controlling the imaging device to start, and controlling the imaging device to generate a calibration image;

[0078] Step 106, acquiring a second image;

[0079] Step 108, performing distance measurement calibration according to the first image, the second image and the preset image to obtain a calibration result;

[0080] The first image and the second image are obtained by shooting the device to be calibrated under the control of the computing device, the second image includes the calibration image, and the preset image corresponds to the calibration image.

[0081] The execution subject of the technical solution of the distance measurement and calibration method provided by the present invention can be an electronic device, or a distance measurement and calibration device, and can also be determined according to actual use requirements, which is not specifically limited here. In order to more clearly describe the distance measurement and calibration method provided by the present invention, the execution subject of the distance measurement and calibration method is described below as a computing device in a distance measurement and calibration system.

[0082] The distance measurement calibration method provided by the present invention is used to calibrate the distance measurement work of the device to be calibrated. In the actual application process, the above-mentioned device to be calibrated can be a cleaning robot, an obstacle avoidance robot, a sweeping robot, a floor washing robot, a sweeping and mopping robot and other visual devices working on a plane or other planes, and no specific restrictions are made here. On this basis, the distance measurement calibration method proposed by the present invention can be specifically used for the camera distance measurement calibration of a robot with a distance measurement function working on a plane before leaving the factory.

[0083] Furthermore, the distance measurement calibration method proposed in the present invention is applied to a distance measurement calibration system, which includes a computing device and an imaging device, and the distance measurement calibration method of the present invention is executed by the computing device therein.

[0084] The computing device has computing and / or control functions. In actual application, the computing device may be a host computer such as a tablet computer, a laptop computer, a desktop computer, or other intelligent device with data processing functions, which is not specifically limited here.

[0085] Furthermore, in actual application, the imaging device may specifically be a projector device, which is not specifically limited herein.

[0086] Furthermore, during the operation of the ranging calibration system, the imaging device is communicatively connected to the computing device, and the computing device is also communicatively connected to the device to be calibrated, so that the computing device can control the imaging device and the device to be calibrated to work, so as to realize the ranging calibration of the monocular camera of the device to be calibrated.

[0087] In actual application, the computing device may be provided with interfaces such as USB (Universal Serial Bus) and HDMI (High Definition Multimedia Interface). The imaging device may be specifically connected to the computing device for communication via an HDMI data cable, and the device to be calibrated may be specifically connected to the computing device for communication via a USB data cable. No specific restrictions are made herein.

[0088] Specifically, in the ranging calibration method provided by the present invention, after the operator places the computing device, the imaging device and the device to be calibrated at the corresponding positions as required, and connects the imaging device, the computing device and the device to be calibrated through a data cable, the operator can control the computing device to start executing the steps of the ranging calibration method proposed by the present invention. For example, the operator turns on the ranging calibration function of the computing device by clicking a "Start Calibration" button on the computing device.

[0089] On this basis, during the first calibration process, the imaging device is in a closed state by default. When the imaging device is in a closed state, the computing device controls the device to be calibrated to shoot the area to be imaged of the imaging device, and obtains the first image shot by the device to be calibrated. It can be understood that when the first image is shot when the imaging device is not turned on, the first image only contains the environmental features of the area to be imaged.

[0090] Further, the computing device controls the imaging device to turn on, and controls the imaging device to generate and display the calibration image in the above-mentioned area to be imaged. On this basis, when the imaging device is in the turned-on state, the computing device again controls the device to be calibrated to shoot the area to be imaged of the imaging device, that is, to shoot the displayed calibration image, and obtain the second image shot by the device to be calibrated. It can be understood that when the second image is shot when the imaging device is turned on, the second image also includes the above-mentioned calibration image when it includes the environmental features of the area to be imaged.

[0091] Furthermore, a preset image corresponding to the calibration image is pre-stored in the computing device. After the computing device obtains the first image and the second image, the computing device further performs ranging calibration based on the preset image, the second image and the first image to obtain the ranging calibration result of the device to be calibrated. In this way, the ranging calibration method proposed by the present invention connects the device to be calibrated through the computing device and controls it to take pictures of the specified area, and then performs calibration calculation in the computing device to obtain the ranging calibration result of the device to be calibrated. In this way, the calibration method can cover the plane field of view in front of the camera of the device to be calibrated, and can better cover the pixels below the horizon in the image. In addition, the ranging calibration is performed by generating and displaying the calibration image through the imaging device, which is not easily affected by the illumination, and meets the actual working scenario that the device to be calibrated pays more attention to the plane area in front of the camera. At the same time, the calibration method reduces the disadvantages of ranging calibration through the internal and external parameters of the camera, so that the robustness and accuracy of the calibration result are better, and has a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy, thereby improving the accuracy of the subsequent ranging work of the device to be calibrated.

[0092] The computing device may include calibration software, and the distance measurement calibration method and steps may be implemented by the calibration software in the computing device. In actual application, the operation interface of the calibration software may be specifically divided into two parts: control and display.

[0093] Among them, the control part may specifically include three control keys: a "test" button, a "calibration" button, and a "save" button. Among them, the "test" button can quickly check whether the file is missing, and whether the functions such as taking pictures and capturing pictures are normal, which can be used as an inspection for abnormal repair. The "calibration" button can start the calibration function of the computing device, thereby realizing the ranging calibration of the device to be calibrated. The "save" button can save the intermediate results in the calibration process. This button can be used during debugging, and other links are closed by default. Furthermore, the display interface can be used to display visual images such as the first image and the second image involved in the calibration process. The display interface can also be used to display the running status of the calibration software during the calibration process, for example, displaying the detection results of items such as file missing, photo taking function, and capture function, so that the user can grasp the running status of the calibration software in a timely manner.

[0094] On this basis, in the process of distance measurement calibration of the equipment to be calibrated, the operator only needs to perform two steps: "place the equipment to be calibrated" and "click the mouse", and the equipment to be calibrated can be calibrated in about 10 seconds. In this way, one-click calibration of the equipment to be calibrated is realized, the calibration process is simple and fast, the process is humanized, and there is no technical basis requirement, which improves the calibration efficiency.

[0095] Furthermore, the device to be calibrated is connected to the computing device via a data line. After the computing device completes the distance measurement calibration of a device to be calibrated, the communication connection between the computing device and the current device to be calibrated can be disconnected, and the computing device and the next device to be calibrated can be connected via the data line to continue the distance measurement calibration of the next device to be calibrated. In the first calibration process, the imaging device is turned off by default. In the subsequent calibration process, the computing device controls the imaging device to be turned off and then controls the device to be calibrated to capture the first image containing only environmental features.

[0096] Furthermore, in actual application, the calibration image can be projected onto a smooth displayable plane, such as a smooth white floor tile. The ranging calibration system can also be equipped with a calibration board of the type of a curtain, and the imaging device can display the calibration image on the calibration board. No specific limitation is imposed here.

[0097] Furthermore, the calibration image is generated based on the approximate internal and external parameters of the camera. The image size of the calibration image is set to 3.2m×1.8m by default. In actual application, the image size of the calibration image can also be set based on the approximate internal and external parameters of the camera, and no specific limitation is made here.

[0098] In an embodiment of the present invention, further, Figure 2 As shown, the above step 108 may specifically include the following steps 108a to 108c:

[0099] Step 108a, performing noise reduction processing on the second image according to the first image to obtain a third image;

[0100] Step 108b, performing coordinate matching on the preset image and the third image to obtain a matching result;

[0101] Step 108c: Determine the calibration result according to the matching result.

[0102] In this embodiment, after acquiring the second image and the first image, the computing device will perform noise reduction processing on the second image based on the first image. The first image is obtained when the imaging device is in a closed state and the computing device controls the device to be calibrated to shoot the area to be imaged of the imaging device, and the second image is obtained when the imaging device is in an open state and the computing device controls the device to be calibrated to shoot the area to be imaged of the imaging device, that is, the displayed calibration image is shot. That is, the first image only contains the environmental features of the area to be imaged, and the second image contains the environmental features of the area to be imaged and the calibration image. Therefore, by performing noise reduction processing on the second image through the first image, the environmental features in the second image can be removed, thereby obtaining a third image containing only the calibration image, so as to reduce the interference of environmental factors on the calibration results, thereby improving the accuracy of the calibration results.

[0103] Furthermore, after obtaining the third image, the computing device performs coordinate matching on the preset image and the third image, and obtains a matching result. The computing device stores the world coordinate information of the preset image. The computing device can determine the position of the pixel points in the third image in the world coordinate by performing coordinate matching on the preset image and the third image. On this basis, the computing device determines the calibration result of the device to be calibrated based on the world coordinate information of the pixel points in the third image. In this way, the calibration result is determined based on the coordinate matching result of the third image of the preset image, so that the robustness and accuracy of the calibration result are better, and there is a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy.

[0104] The calibration result may specifically be a mapping relationship between each pixel point in the third image and its corresponding world coordinate information.

[0105] In the embodiment of the present invention, further, the shooting areas of the first image and the second image are the same. On this basis, Figure 3As shown, the above step 108a may specifically include the following step 108a1:

[0106] Step 108a1, performing a difference process on the first image and the second image to obtain a third image.

[0107] In this embodiment, the shooting area of ​​the second image is the same as that of the first image. That is, when the computing device controls the device to be calibrated to shoot the first image and the second image, the shooting position and shooting angle of the device to be calibrated are the same, so that the environmental features contained in the second image and the first image obtained by shooting are the same, and the pixels in the second image and the first image correspond one to one.

[0108] On this basis, in the process of the computing device performing noise reduction processing on the second image, the computing device performs difference processing on the second image and the first image. Specifically, the computing device performs difference processing on the pixel values ​​of corresponding pixels in the second image and the first image, so as to subtract the pixel value of the corresponding pixel in the first image from the pixel value of each pixel in the second image, thereby removing the environmental features in the second image and obtaining a third image containing only the calibration image, so as to reduce the interference of environmental factors on the calibration result, thereby improving the accuracy of the calibration result.

[0109] In an embodiment of the present invention, further, Figure 4 As shown, the above step 108b may specifically include the following steps 108b1 to 108b3:

[0110] Step 108b1, extracting at least one target feature point in the third image;

[0111] Step 108b2, performing coordinate matching on feature points in the preset image and at least one target feature point to determine world coordinate information of at least one target feature point;

[0112] Step 108b3: determining the world coordinate information of at least one target feature point as a matching result.

[0113] In this embodiment, in the process of the computing device performing coordinate matching on the preset image and the third image, specifically, the computing device performs a feature point extraction operation on the third image to determine at least one target feature point in the third image. Further, the computing device stores feature point information of the preset image and stores world coordinate information of each feature point. On this basis, the computing device performs coordinate matching on the feature points in the preset image and each extracted target feature point to determine the position of each target feature point in the third image in the world coordinates, that is, to determine the world coordinate information of each target feature point, so as to obtain the coordinate matching result of the third image.

[0114] Among them, the feature points in the above-mentioned preset image and the target feature points in the third image can both be expressed as dots, and the world coordinate information of the feature points is the world coordinate information of the geometric center of the dots. In the actual application process, the shape of the above-mentioned feature points can also be set to a regular shape such as a square, an equilateral triangle, etc., which is not specifically limited here. By setting the feature points in the preset image and the target feature points in the third image to regular shapes, the accuracy of the determination of the world coordinates of the feature points is guaranteed, thereby ensuring the accuracy of the calibration results.

[0115] In an embodiment of the present invention, further, Figure 5 As shown, the above step 108c may specifically include the following steps 108c1 and 108c2:

[0116] Step 108c1, performing interpolation processing on the third image to obtain an interpolated image;

[0117] Step 108c2, determining the world coordinate information of each pixel in the interpolated image according to the matching result, and obtaining the calibration result.

[0118] In this embodiment, in the process of determining the calibration result based on the coordinate matching result of the third image by the computing device based on the preset image, specifically, the computing device performs pixel interpolation processing on the third image after the feature point extraction, and obtains an interpolated image. It can be understood that after the target feature points are extracted from the third image, the extracted target feature points are sparsely distributed in the third image. Therefore, in order to ensure the coverage rate of the calibration result for each pixel point in the shooting area of ​​the monocular camera, that is, in order to ensure the accuracy of the calibration result, the computing device performs pixel interpolation on the peripheral position of each target feature point in the third image to obtain an interpolated image with densely distributed pixels.

[0119] On this basis, the computing device determines the position of each pixel point in the third image obtained by interpolation in the world coordinates based on the position of each target feature point in the third image obtained by the above matching, that is, the world coordinate information, so as to obtain the world coordinate information of each pixel point in the third image, and then obtain the distance measurement calibration result of the device to be calibrated. In this way, the distance information between each pixel point in the third image is determined based on the interpolation method, and then the world coordinate information of each pixel point in the third image is determined, instead of obtaining the distance information of the image pixel through the traditional internal and external parameter calibration, which reduces the disadvantages of the distance measurement calibration through the internal and external parameters of the camera, makes the calibration result more robust and accurate, and has a certain tolerance to external parameters and camera distortion, improves the calibration accuracy, and thus improves the accuracy of the subsequent distance measurement work of the device to be calibrated.

[0120] In an embodiment of the present invention, further, Figure 6As shown, after the above step 108, the above distance measurement calibration method may further include the following step 110:

[0121] Step 110: Load the calibration result into the device to be calibrated.

[0122] In this embodiment, after the computing device performs distance measurement calibration on a device to be calibrated to obtain a corresponding calibration result, the computing device inputs the obtained calibration result into the device to be calibrated through a communication data line between the computing device and the device to be calibrated, so that the device to be calibrated can subsequently perform distance measurement based on the calibration result, thereby improving the accuracy of the distance measurement work of the device to be calibrated.

[0123] The calibration result may specifically be a mapping relationship between each pixel point in the third image and its corresponding world coordinate information. In actual application, the computing device may establish a mapping relationship between the position of each pixel point in the third image in the shooting area of ​​the device to be calibrated and the position of the pixel point in the world coordinates, and establish a mapping table based on the mapping relationship, and then load the mapping table into the memory of the device to be calibrated, so that the device to be calibrated can directly call the mapping table to determine the distance information between objects in subsequent distance measurement work, thereby ensuring the accuracy of the distance measurement result of the device to be calibrated.

[0124] In an embodiment of the present invention, further, Figure 7 As shown, after the above step 108 and before the above step 110, the above distance measurement calibration method may further include the following steps 112 and 114:

[0125] Step 112, checking the calibration results;

[0126] Step 114, sending instruction information according to the inspection result.

[0127] In this embodiment, before the computing device inputs the obtained calibration result into the memory of the device to be calibrated through the communication data line between the computing device and the device to be calibrated, the computing device will also perform a correctness check on the distance measurement calibration result of the device to be calibrated to determine whether the calibration result of the device to be calibrated is passed, and then send corresponding indication information to the user according to the correctness check result. Specifically, when the computing device determines that the calibration result of the device to be calibrated is passed, the computing device sends indication information indicating successful calibration to the user, and when the computing device determines that the calibration result of the device to be calibrated is not passed, the computing device sends indication information indicating failed calibration to the user, so that the user can immediately control the computing device to calibrate the device to be calibrated again until the calibration of the device to be calibrated is successful.

[0128] Specifically, the computing device includes calibration software, the operation interface of the calibration software includes a display area, and the indication information can be directly displayed in the display area of ​​the operation interface.

[0129] Furthermore, the computing device may be provided with an indicator light, which can be set to display different colors to indicate the success or failure of the calibration result. For example, if the indicator light is blue, it means that the calibration of the device to be calibrated is successful, and if the indicator light is red, it means that the calibration of the device to be calibrated fails.

[0130] Furthermore, the computing device may be provided with a buzzer, which emits different sounds to indicate the success or failure of the calibration result. For example, if the buzzer sounds once, it indicates that the calibration of the device to be calibrated is successful, and if the buzzer sounds twice in a row, it indicates that the calibration of the device to be calibrated fails.

[0131] In actual application, the user can select the display mode of the above-mentioned indication information according to actual conditions, and no specific limitation is made here.

[0132] In the embodiment of the present invention, Figure 8 As shown, the above distance measurement calibration method may specifically include the following steps 202 to 214:

[0133] Step 202, photographing the background;

[0134] Step 204, photographing the foreground;

[0135] Step 206, subtracting the foreground from the background;

[0136] Step 208, feature point extraction;

[0137] Step 210, feature point coordinate matching;

[0138] Step 212, pixel interpolation;

[0139] Step 214: The result is encoded and imported into the device to be calibrated.

[0140] The background in step 202 is equivalent to the first image, and the foreground in step 204 is equivalent to the second image.

[0141] In this embodiment, specifically, during the process of the computing device calibrating the device to be calibrated, when the imaging device is turned off, the computing device controls the device to be calibrated to shoot a background image containing only environmental features. Further, the computing device controls the imaging device to turn on and display the calibration image, and then controls the device to be calibrated to shoot a foreground image containing environmental features and the calibration image. Further, the computing device performs a difference between the acquired foreground image and the background image to remove the environmental features in the foreground image. On this basis, the computing device extracts feature points from the foreground image after removing the environmental features, and matches the extracted feature points with the feature points in the pre-stored preset image to obtain the world coordinate information of each feature point in the foreground image. Further, the computing device performs a pixel difference on the peripheral position of each feature point in the foreground image, and determines the world coordinate information of each pixel after interpolation. On this basis, the computing device establishes a mapping table based on the corresponding relationship between each pixel in the foreground image and the world coordinate information, and loads the mapping table into the corresponding device to be calibrated, thereby completing the ranging calibration of the device to be calibrated.

[0142] The computing device may include calibration software, and the above distance measurement calibration method and steps can be implemented by the calibration software in the computing device. Fig.10 As shown, the calibration platform of the calibration software includes a display interface. The display interface can be used to display the background image, i.e., the first image, the foreground image, i.e., the second image, the interpolation result and other visual images involved in the calibration process, and can also be used to display the running status of the calibration software during the calibration process, for example, displaying the detection results of items such as file missing, camera function, and screenshot function, so that the user can grasp the calibration progress in time.

[0143] In summary, the distance measurement calibration method proposed in the embodiment of the present invention realizes one-key calibration of the device to be calibrated. In the process of distance measurement calibration of the device to be calibrated, the operator only needs to perform two steps of "place the device to be calibrated" and "click the mouse" to calibrate the device to be calibrated in about 10 seconds. In this way, the calibration process is simple and fast, the process is humanized, there is no technical basis requirement, and the calibration efficiency is improved.

[0144] The following uses the user's specific operation process as an example to illustrate the distance measurement calibration method proposed in the embodiment of the present invention. Fig. 9 As shown, when calibrating the device to be calibrated, the user's operation process may specifically include the following steps 302 to 308:

[0145] Step 302, preparation;

[0146] Step 304, placing and connecting the device to be calibrated;

[0147] Step 306, click the "calibrate" button on the calibration platform;

[0148] Step 308 , determining whether the calibration work is completed, if so, the process ends, if not, executing step 304 .

[0149] Specifically, when calibrating the device to be calibrated, in the preparation stage, the operator turns on the computing device and the projector, i.e., the imaging device, connects the projector and the computing device through the HDMI interface, and opens the calibration software on the computing device. When the computing device starts the calibration software, the computing device will check the key files, and after the check is correct, the calibration can begin. It should be noted that the above steps only need to be performed once at the beginning of the calibration work.

[0150] Furthermore, after completing the preparation work, the operator places the turned-on device to be calibrated at a designated location on the tooling platform, and ensures that the calibration plate is in front of the camera of the device to be calibrated, and then connects the computing device and the device to be calibrated via a data cable.

[0151] Furthermore, after the device to be calibrated is connected, the operator can click the "calibrate" button in the calibration software to start the calibration function of the computing device. If there is no alarm during the calibration process or the indicator light is a specific color such as green, it means that the calibration is successful and the calibration result has been written into the device to be calibrated. At this time, the operator can disconnect the device to be calibrated from the computing device, and then replace the next device to be calibrated, and repeat steps 304 and 306 to continue calibrating the next device to be calibrated, until all the devices to be calibrated are calibrated, and the calibration process ends.

[0152] In this way, the calibration process is realized through digitalization, which enables one-click calibration of the equipment to be calibrated. The calibration process is simple and fast, the process is user-friendly, and there is no requirement for technical basis, which improves the calibration efficiency.

[0153] In one embodiment of the present invention, a distance measurement and calibration device is provided, and a computing device used in a distance measurement and calibration system is also provided. Fig.11 FIG. 1 shows a structural block diagram of a distance measurement and calibration device 1100 according to an embodiment of the present invention. Fig.11 As shown, the distance measurement and calibration device 1100 may specifically include the following acquisition unit 1102, control unit 1104 and processing unit 1106:

[0154] An acquisition unit 1102, configured to acquire a first image when the imaging device is turned off;

[0155] A control unit 1104, used to control the imaging device to start and generate a calibration image;

[0156] The acquisition unit 1102 is further used to acquire a second image, where the second image includes a calibration image;

[0157] The processing unit 1106 is used to perform distance measurement calibration according to the first image, the second image and the preset image to obtain a calibration result;

[0158] The first image and the second image are obtained by shooting the device to be calibrated under the control of the computing device, and the preset image corresponds to the calibration image.

[0159] The distance measurement calibration device 1100 provided in the embodiment of the present invention is used to calibrate the distance measurement work of the device to be calibrated. In the actual application process, the above-mentioned device to be calibrated can be a cleaning robot, an obstacle avoidance robot, a sweeping robot, a floor washing robot, a sweeping and mopping robot and other visual devices working on a plane or other planes, and no specific restrictions are made here. On this basis, the distance measurement calibration device 1100 proposed in the present invention can be specifically used for the camera distance measurement calibration of a robot with a distance measurement function working on a plane before leaving the factory.

[0160] Furthermore, the distance measurement and calibration device 1100 proposed in the present invention is applied to a computing device in a distance measurement and calibration system, and the distance measurement and calibration system also includes an imaging device.

[0161] The computing device has computing and / or control functions. In actual application, the computing device may be a host computer such as a tablet computer, a laptop computer, a desktop computer, or other intelligent device with data processing functions, which is not specifically limited here.

[0162] Furthermore, in actual application, the imaging device may specifically be a projector device, which is not specifically limited herein.

[0163] Furthermore, during the operation of the ranging calibration system, the imaging device is communicatively connected to the computing device, and the computing device is also communicatively connected to the device to be calibrated, so that the computing device can control the imaging device and the device to be calibrated to work, so as to realize the ranging calibration of the monocular camera of the device to be calibrated.

[0164] In actual application, the computing device may be provided with USB, HDMI and other interfaces. The imaging device may be specifically connected to the computing device for communication via an HDMI data cable, and the device to be calibrated may be specifically connected to the computing device for communication via a USB data cable. No specific restrictions are made here.

[0165] Specifically, after the operator places the computing device, the imaging device and the device to be calibrated in the corresponding positions as required, and connects the imaging device, the computing device and the device to be calibrated through a data cable, the operator can control the computing device to start the ranging calibration. For example, the operator turns on the ranging calibration function of the computing device by clicking the "Start Calibration" button on the computing device.

[0166] On this basis, during the first calibration process, the imaging device is in a closed state by default. When the imaging device is in the closed state, the control unit 1104 of the distance measurement and calibration device 1100 controls the device to be calibrated to shoot the imaging area of ​​the imaging device, and the acquisition unit 1102 of the distance measurement and calibration device 1100 acquires the first image captured by the device to be calibrated. It can be understood that when the first image is captured when the imaging device is not turned on, the first image only contains the environmental features of the imaging area.

[0167] Further, the control unit 1104 controls the imaging device to be turned on, and controls the imaging device to generate and display the calibration image in the above-mentioned area to be imaged. On this basis, when the imaging device is in the turned-on state, the control unit 1104 controls the device to be calibrated again to shoot the area to be imaged of the imaging device, that is, to shoot the displayed calibration image, and the acquisition unit 1102 acquires the second image captured by the device to be calibrated. It can be understood that when the second image is shot when the imaging device is turned on, the second image also includes the above-mentioned calibration image when it includes the environmental features of the area to be imaged.

[0168] Furthermore, a preset image corresponding to the calibration image is pre-stored in the computing device. After the first image and the second image are acquired by the acquisition unit 1102, the processing unit 1106 of the distance measurement calibration device 1100 further performs distance measurement calibration based on the preset image, the second image and the first image to obtain the distance measurement calibration result of the device to be calibrated. In this way, the distance measurement calibration device 1100 proposed in the present invention connects the device to be calibrated through the computing device and controls it to take pictures of the specified area, and then performs calibration calculation in the computing device to obtain the distance measurement calibration result of the device to be calibrated. In this way, the plane field of view in front of the camera of the device to be calibrated can be covered, and the pixels below the horizon in the image can be better covered. In addition, the distance measurement calibration is performed by generating and displaying the calibration image through the imaging device, which is not easily affected by light, and conforms to the actual working scenario that the device to be calibrated pays more attention to the plane area in front of the camera. At the same time, the disadvantages of ranging calibration through internal and external parameters of the camera are reduced, so that the robustness and accuracy of the calibration results are better, and there is a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy, thereby improving the accuracy of subsequent ranging work of the calibrated equipment.

[0169] The computing device may include calibration software, and the steps of the distance measurement calibration process may be implemented by the calibration software in the computing device. In actual application, the operation interface of the calibration software may be specifically divided into two parts: control and display.

[0170] Among them, the control part may specifically include three control keys: a "test" button, a "calibration" button, and a "save" button. Among them, the "test" button can quickly check whether the file is missing, and whether the functions such as taking pictures and capturing pictures are normal, which can be used as an inspection for abnormal repair. The "calibration" button can start the calibration function of the computing device, thereby realizing the ranging calibration of the device to be calibrated. The "save" button can save the intermediate results in the calibration process. This button can be used during debugging, and other links are closed by default. Furthermore, the display interface can be used to display visual images such as the first image and the second image involved in the calibration process. The display interface can also be used to display the running status of the calibration software during the calibration process, for example, displaying the detection results of items such as file missing, photo taking function, and capture function, so that the user can grasp the running status of the calibration software in a timely manner.

[0171] On this basis, in the process of distance measurement calibration of the equipment to be calibrated, the operator only needs to perform two steps: "place the equipment to be calibrated" and "click the mouse", and the equipment to be calibrated can be calibrated in about 10 seconds. In this way, one-click calibration of the equipment to be calibrated is realized, the calibration process is simple and fast, the process is humanized, and there is no technical basis requirement, which improves the calibration efficiency.

[0172] Furthermore, the device to be calibrated is connected to the computing device via a data line. After the computing device completes the distance measurement calibration of a device to be calibrated, the communication connection between the computing device and the current device to be calibrated can be disconnected, and the computing device and the next device to be calibrated can be connected via the data line to continue the distance measurement calibration of the next device to be calibrated. In the first calibration process, the imaging device is turned off by default. In the subsequent calibration process, the computing device controls the imaging device to be turned off and then controls the device to be calibrated to capture the first image containing only environmental features.

[0173] Furthermore, in actual application, the calibration image can be projected onto a smooth displayable plane, such as a smooth white floor tile. The ranging calibration system can also be equipped with a calibration board of the type of a curtain, and the imaging device can display the calibration image on the calibration board. No specific limitation is imposed here.

[0174] Furthermore, the calibration image is generated based on the approximate internal and external parameters of the camera. The image size of the calibration image is set to 3.2m×1.8m by default. In actual application, the image size of the calibration image can also be set based on the approximate internal and external parameters of the camera, and no specific limitation is made here.

[0175] In this embodiment, further, the processing unit 1106 is specifically used to: perform noise reduction processing on the second image according to the first image to obtain a third image; perform coordinate matching on the preset image and the third image to obtain a matching result; and determine a calibration result according to the matching result.

[0176] In this embodiment, further, the shooting areas of the first image and the second image are the same, and the processing unit 1106 is specifically configured to perform a difference process on the first image and the second image to obtain a third image.

[0177] In this embodiment, further, the processing unit 1106 is specifically used to: extract at least one target feature point in the third image; perform coordinate matching on the feature points in the preset image and at least one target feature point to determine the world coordinate information of at least one target feature point; and determine the world coordinate information of at least one target feature point as the matching result.

[0178] In this embodiment, further, the processing unit 1106 is specifically used to: perform interpolation processing on the third image to obtain an interpolated image; determine the world coordinate information of each pixel point in the interpolated image according to the matching result to obtain a calibration result.

[0179] In this embodiment, further, the processing unit 1106 is further configured to: load the calibration result into the device to be calibrated.

[0180] In this embodiment, further, the processing unit 1106 is also used to: check the calibration result; and send indication information according to the check result.

[0181] In one embodiment of the present invention, a distance measurement and calibration system is also proposed. Fig.12 FIG. 1 shows a schematic diagram of the structure of a distance measurement and calibration system 1200 provided in an embodiment of the present invention. Fig.12 As shown, the ranging calibration system 1200 includes a computing device 1202 and an imaging device 1204 .

[0182] The computing device 1202 can execute the steps of the distance measurement and calibration method in any of the above embodiments. Therefore, the distance measurement and calibration system 1200 proposed in the embodiment of the third aspect of the present invention has all the beneficial effects of the distance measurement and calibration method in any of the above embodiments of the first aspect, which will not be described in detail here.

[0183] Furthermore, during the operation of the ranging calibration system 1200, the imaging device 1204 is communicatively connected to the computing device 1202, and the computing device 1202 is also communicatively connected to the device to be calibrated 1206, so that the computing device 1202 can control the imaging device 1204 and the device to be calibrated 1206 to work, so as to realize the ranging calibration of the monocular camera of the device to be calibrated 1206.

[0184] Furthermore, the computing device 1202 may include calibration software, and the steps of the distance measurement calibration method may be implemented by the calibration software in the computing device 1202. Specifically, after the operator places the computing device 1202, the imaging device 1204, and the device to be calibrated 1206 at corresponding positions as required, and connects the imaging device 1204, the computing device 1202, and the device to be calibrated 1206 via a data cable, the operator may control the computing device 1202 to start executing the steps of the distance measurement calibration method proposed in the present invention.

[0185] Specifically, when the imaging device 1204 is in a closed state, the computing device 1202 controls the device to be calibrated 1206 to shoot the imaging area of ​​the imaging device 1204, and obtains the first image captured by the device to be calibrated 1206. Further, the computing device 1202 controls the imaging device 1204 to turn on, and controls the imaging device 1204 to generate and display the calibration image in the above-mentioned imaging area. On this basis, the computing device 1202 controls the device to be calibrated 1206 to shoot the imaging area of ​​the imaging device 1204 again, that is, to shoot the displayed calibration image, and obtain the second image captured by the device to be calibrated 1206. Further, the computing device 1202 performs distance measurement calibration based on the preset image, the second image and the first image to obtain the distance measurement calibration result of the device to be calibrated 1206.

[0186] Among them, in the actual application process, the above-mentioned imaging device 1204 can be specifically a projector device, and the above-mentioned computing device 1202 can be specifically a tablet computer, a laptop computer, a desktop computer and other smart devices with data processing functions, and no specific restrictions are made here.

[0187] Furthermore, the computing device 1202 may be provided with interfaces such as USB and HDMI. The imaging device 1204 may be specifically connected to the computing device 1202 for communication via an HDMI data cable. The device to be calibrated 1206 may be specifically connected to the computing device 1202 for communication via a USB data cable. No specific limitation is made herein.

[0188] In an embodiment of the present invention, further, Fig.12As shown, the distance measurement and calibration system 1200 further includes a calibration plate 1208, which can be a displayable plane such as a screen. During the operation of the distance measurement and calibration system 1200, the calibration plate 1208 is placed directly below or obliquely below the imaging device 1204, and the computing device 1202 controls the imaging device 1204 to image and display the calibration image on the calibration plate 1208.

[0189] Furthermore, during the calibration process, the device to be calibrated 1206 is in contact with the edge of the calibration plate 1208, that is, the front section of the device to be calibrated is in contact with the bottom edge of the curtain, and the central axis of the device to be calibrated 1206 is in the same straight line as the central axis of the calibration plate 1208. Furthermore, during the calibration process, the platform where the device to be calibrated 1206 is located is in the same horizontal plane as the curtain, that is, the calibration plate 1208. In this way, the calibration result can cover the plane field of view in front of the camera of the device to be calibrated, and can better cover the pixels below the horizon in the image, so that the robustness and accuracy of the calibration result are better, and there is a certain fault tolerance for external parameters and camera distortion, which improves the calibration accuracy, thereby improving the accuracy of the subsequent ranging work of the device to be calibrated 1206.

[0190] In one embodiment of the present invention, an electronic device is also provided. Fig.13 As shown, Fig.13 FIG. 1 is a block diagram of an electronic device 1300 provided in an embodiment of the present invention. The electronic device 1300 includes:

[0191] A memory 1302 , where programs or instructions are stored;

[0192] Processor 1304, when executing the above program or instruction, implements the steps of the distance measurement calibration method in any of the above embodiments.

[0193] The electronic device 1300 provided in this embodiment includes a memory 1302 and a processor 1304. When the program or instructions in the memory 1302 are executed by the processor 1304, the steps of the distance measurement calibration method in any of the above embodiments are implemented. Therefore, the electronic device 1300 has all the beneficial effects of the distance measurement calibration method in any of the above embodiments, which will not be repeated here.

[0194] Specifically, the memory 1302 and the processor 1304 may be connected via a bus or other means. The processor 1304 may include one or more processing units, and the processor 1304 may be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), and other chips.

[0195] In actual application, the electronic device 1300 includes but is not limited to: a laptop computer, a tablet computer, a desktop computer and other smart devices that can be used as computing devices.

[0196] The fifth aspect of the present invention provides a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the distance measurement and calibration method in any of the above embodiments are implemented.

[0197] The readable storage medium provided in the embodiment of the present invention can implement the steps of the distance measurement and calibration method in any of the above embodiments when the program or instruction stored in the medium is executed by the processor. Therefore, the readable storage medium has all the beneficial effects of the distance measurement and calibration method in any of the above embodiments, which will not be described in detail here.

[0198] Specifically, the above-mentioned readable storage medium may include any medium capable of storing or transmitting information. Examples of readable storage media include electronic circuits, semiconductor memory devices, read-only memory (ROM), random access memory (RAM), compact disc read-only memory (CD-ROM), flash memory, erasable ROM (EROM), magnetic tape, floppy disk, optical disk, hard disk, optical fiber medium, radio frequency (RF) link, optical data storage device, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0199] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance unless otherwise clearly specified and limited; the terms "connection", "installation", "fixation" and the like should be understood in a broad sense, for example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0200] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0201] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0202] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A distance measurement calibration method, characterized in that: Applied to a distance measurement and calibration system including a computing device and an imaging device, and executed by the computing device, the distance measurement and calibration method includes: When the imaging device is turned off, acquiring a first image; Controlling the imaging device to start, and controlling the imaging device to generate a calibration image; Acquire a second image, where the second image includes the calibration image; Performing distance measurement calibration according to the first image, the second image, and a preset image to obtain a calibration result; The first image and the second image are obtained by the computing device controlling the device to be calibrated to take pictures, and the preset image corresponds to the calibration image.

2. The distance measurement calibration method according to claim 1, characterized in that: The performing ranging calibration according to the first image, the second image and the preset image to obtain a calibration result includes: Performing noise reduction processing on the second image according to the first image to obtain a third image; Performing coordinate matching on the third image and the preset image to obtain a matching result; The calibration result is determined according to the matching result.

3. The distance measurement calibration method according to claim 2, characterized in that: The first image and the second image have the same shooting area, and performing noise reduction processing on the second image according to the first image to obtain a third image includes: Performing a difference process on the first image and the second image to obtain the third image.

4. The distance measurement calibration method according to claim 2, characterized in that: The performing coordinate matching on the third image and the preset image to obtain a matching result includes: extracting at least one target feature point in the third image; Performing coordinate matching on at least one of the target feature points and feature points in the preset image to determine world coordinate information of at least one of the target feature points; The world coordinate information of at least one of the target feature points is determined as the matching result.

5. The distance measurement calibration method according to claim 2, characterized in that: Determining the calibration result according to the matching result includes: Performing interpolation processing on the third image to obtain an interpolated image; The world coordinate information of each pixel in the interpolation image is determined according to the matching result to obtain the calibration result.

6. The distance measurement calibration method according to any one of claims 1 to 5, characterized in that: After obtaining the calibration result, the distance measurement calibration method further includes: The calibration result is loaded into the device to be calibrated.

7. The distance measurement calibration method according to claim 6, characterized in that: Before loading the calibration result into the device to be calibrated, the distance measurement calibration method further includes: Testing the calibration result; Send instructions based on the test results.

8. A distance measurement calibration device, characterized in that: A computing device used in a distance measurement and calibration system, wherein the distance measurement and calibration system further includes an imaging device, and the distance measurement and calibration device includes: an acquisition unit, configured to acquire a first image when the imaging device is turned off; A control unit, used to control the imaging device to start, and control the imaging device to generate a calibration image; The acquisition unit is further used to acquire a second image, where the second image includes the calibration image; A processing unit, configured to perform ranging calibration according to the first image, the second image and a preset image to obtain a calibration result; The first image and the second image are obtained by the computing device controlling the device to be calibrated to take pictures, and the preset image corresponds to the calibration image.

9. A distance measurement calibration system, characterized in that: include: A computing device capable of communicating with the device to be calibrated; An imaging device, communicatively connected to the computing device; The computing device is used to execute the steps of the distance measurement and calibration method as described in any one of claims 1 to 7.

10. The distance measurement and calibration system according to claim 9, characterized in that: Also includes: A calibration plate, located below the imaging device; During the calibration process, the edge of the calibration plate abuts against the device to be calibrated, and the central axis of the calibration plate is collinear with the central axis of the device to be calibrated.

11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the distance measurement and calibration method as described in any one of claims 1 to 7 are implemented.

12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the distance measurement and calibration method according to any one of claims 1 to 7 are implemented.