Inspection method, inspection apparatus, electronic device, and storage medium

By first using small magnification shooting to adjust the camera pose in the inspection robot, and then using high magnification shooting to screen the image quality, the problem of inspection failure caused by navigation errors is solved, and the success rate and accuracy of inspection are improved.

WO2024198558A1PCT designated stage expired Publication Date: 2024-10-03UBTECH ROBOTICS CORP LTD

Patent Information

Application Number
PCT/CN2023/140777
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2023-12-21
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

The navigation error of the inspection robot under a large shooting magnification may cause the inspection target to be not included in the captured image, causing the inspection to fail and affecting the accuracy and success rate of the inspection.

Method used

By first acquiring the first inspection image at a smaller shooting magnification, adjusting the camera pose so that the inspection target is in the center of the screen, and then acquiring multiple second inspection images at a larger shooting magnification, selecting the image with the best image quality. As a target inspection image.

Benefits of technology

It reduces the failure to capture targets during inspections, improves the success rate of inspections, and ensures the accuracy of inspection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023140777_03102024_PF_FP_ABST
    Figure CN2023140777_03102024_PF_FP_ABST
Patent Text Reader

Abstract

An inspection method, an inspection apparatus, an electronic device, and a computer-readable storage medium. The method comprises: controlling a robot to move to an inspection location that corresponds to the current inspection target (101); after the robot reaches the inspection location, acquiring a first inspection image acquired by a camera of the robot for the current inspection target (102); adjusting the pose of the camera on the basis of the first inspection image, such that the current inspection target is located at the center of a photographic screen of the camera (103); acquiring a plurality of second inspection images acquired by the camera for the current inspection target (104), wherein photographic focal lengths for the plurality of second inspection images are different but photographic magnifications for the plurality of second inspection images are the same, and the photographic magnifications for the plurality of second inspection images are greater than the photographic magnification for the first inspection image; and determining a second inspection image, which has the best image quality, among the plurality of second inspection images as a target inspection image (105). By means of the technical solution, the accuracy of an inspection result can be ensured while the success rate of inspection is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Inspection method, inspection device, electronic equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 28, 2023, with application number 202310344462.4 and invention name “A patrol method, patrol device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

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

[0003] With the development of artificial intelligence and robotics, AI-powered robots are increasingly being used in security, inspection, healthcare, and other fields. Inspection robots, in particular, are widely used in power plants, substations, coal mines, and chemical industries because they can adapt to complex environments and save repetitive labor.

[0004] Inspection robots can be used to automatically and regularly inspect various inspection targets at various locations. To ensure the accuracy of inspection results, inspection robots typically use a high magnification when capturing images during inspections. However, if the robot's navigation errors are too large at such a high magnification, the inspection target may not appear in the captured image, resulting in inspection failure. Technical issues

[0005] The present application provides an inspection method, an inspection device, an electronic device, and a computer-readable storage medium, which can improve the success rate of inspections while ensuring the accuracy of inspection results. Technical Solutions

[0006] In a first aspect, the present application provides an inspection method, comprising:

[0007] Control the robot to go to the inspection position corresponding to the current inspection target;

[0008] After the robot reaches the inspection position, a first inspection image captured by the robot's camera of the current inspection target is obtained;

[0009] Adjusting the camera's posture based on the first inspection image so that the current inspection target is in the center of the camera's shooting picture;

[0010] Acquire multiple second inspection images captured by the camera of the current inspection target, wherein the multiple second inspection images have different shooting focal lengths but the same shooting magnification, and the shooting magnification of the multiple second inspection images is greater than the shooting magnification of the first inspection image;

[0011] A second inspection image with the best image quality among the multiple second inspection images is determined as a target inspection image.

[0012] In a second aspect, the present application provides a patrol inspection device, comprising:

[0013] The control module is used to control the robot to go to the inspection position corresponding to the current inspection target;

[0014] A first acquisition module is used to acquire a first inspection image captured by the robot's camera of the current inspection target after the robot reaches the inspection position;

[0015] An adjustment module, configured to adjust the position of the camera based on the first inspection image so that the current inspection target is located at the center of the camera's shooting image;

[0016] a second acquisition module, configured to acquire a plurality of second inspection images captured by the camera of the current inspection target, wherein the plurality of second inspection images have different shooting focal lengths but the same shooting magnification, and the shooting magnification of the plurality of second inspection images is greater than the shooting magnification of the first inspection image;

[0017] The determination module is used to determine the second inspection image with the best image quality among the multiple second inspection images as the target inspection image.

[0018] In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to the first aspect are implemented.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.

[0020] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect. Beneficial effects

[0021] Compared with the prior art, the present application has the following advantages: when the robot is conducting an inspection, it will first shoot at a smaller shooting magnification, so that the first inspection image obtained can include the current inspection target; then the camera position is adjusted according to the first inspection image so that the current inspection target is in the center of the camera's shooting screen; then it will shoot at a larger shooting magnification, so that the multiple second inspection images obtained can all include the current inspection target; because the shooting focal lengths of the multiple second inspection images are different, the image quality of the multiple second inspection images is also different, so the target inspection image can be screened out according to the image quality, so that the image quality of the target inspection image is the best. From the above process, it can be seen that by shooting at a smaller shooting magnification first and then shooting at a larger shooting magnification, the situation where the current inspection target is not captured during the inspection can be reduced, thereby improving the success rate of the inspection; and by screening the multiple second inspection images at different shooting focal lengths, the image quality of the target inspection image finally obtained can meet the inspection requirements, thereby ensuring the accuracy of the inspection results.

[0022] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0024] FIG1 is a schematic diagram of an implementation flow of an inspection method provided in an embodiment of the present application;

[0025] FIG2 is a structural block diagram of an inspection device provided in an embodiment of the present application;

[0026] FIG3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Modes for Carrying Out the Invention

[0027] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0028] The following describes a patrol inspection method provided in an embodiment of the present application. The patrol inspection method can be applied to a robot; of course, it can also be applied to other devices that have established a communication connection with the robot and can control the robot, such as a user terminal or a server, etc., which is not limited in the embodiment of the present application. For ease of description, the following takes the application of the patrol inspection method to a robot as an example to explain and illustrate the patrol inspection method. Referring to Figure 1, the patrol inspection method in the embodiment of the present application includes:

[0029] Step 101: Control the robot to go to the inspection position corresponding to the current inspection target.

[0030] The robot can initiate an inspection task in response to an inspection instruction issued by another device (such as a user terminal or server); alternatively, the robot can also autonomously initiate an inspection task after reaching a preset inspection time. The embodiments of the present application do not limit the timing of initiating the inspection task. After initiating the inspection task, the robot can traverse the multiple inspection targets to be inspected to determine the current inspection target. It is understood that after completing the inspection of the current inspection target, the robot can again determine a new current inspection target and continue the inspection; after all inspection targets have been inspected, the robot can end its inspection task.

[0031] Each inspection target has a corresponding inspection location. The correspondence between inspection targets and inspection locations can be pre-stored in a storage space accessible to the robot. This storage space can be local or cloud-based, and is not limited here. Based on this correspondence, the robot can determine the inspection location corresponding to the current inspection target and move to that inspection location.

[0032] Step 102: After the robot reaches the inspection position, a first inspection image captured by the robot's camera of the current inspection target is obtained.

[0033] Even when the robot reports that it has reached the inspection location, due to navigation errors, it may still be some distance away. To avoid missing the current inspection target, the robot does not directly capture the image at a higher magnification. Instead, it captures the image at a lower magnification to maximize the capture range and ensure that the captured image includes the current inspection target. For ease of description, the image captured at this point is referred to as the first inspection image.

[0034] Step 103: Adjust the position of the camera based on the first inspection image so that the current inspection target is located at the center of the camera's shooting screen.

[0035] Due to navigation errors, the current inspection target in the first inspection image is not necessarily located at the center of the first inspection image. If the current inspection target is not located at the center of the first inspection image, then when the shooting magnification changes, the position of the current inspection target in the shooting image will also change accordingly, thereby affecting the detection of the current inspection target. Based on this, the robot can adjust the camera posture based on the first inspection image so that the current inspection target can be located at the center of the camera's shooting image after the camera posture adjustment.

[0036] Step 104 : Acquire multiple second inspection images captured by the camera of the current inspection target.

[0037] After the camera's position has been adjusted and the current inspection target is centered in the camera's captured image, the robot can adjust the camera's shooting magnification to zoom in (zoom in), thereby increasing the area occupied by the current inspection target in the captured image. It is understandable that since the current inspection target is already centered in the captured image before the camera zooms in, it will generally remain centered after the camera zooms in. This prevents the current inspection target from being out of frame after the camera zooms in, reducing inspection failures caused by failure to capture the current inspection target.

[0038] After zooming in, the robot can adjust the focal length multiple times while maintaining the current magnification to focus on the current inspection target. Ultimately, the robot can use this camera to capture multiple second inspection images. Obviously, each second inspection image has a different focal length, but the same magnification. Because the second inspection image is captured with the camera zoomed in, the magnification of the second inspection image is necessarily greater than that of the first inspection image.

[0039] Step 105 : Determine the second inspection image with the best image quality among the multiple second inspection images as the target inspection image.

[0040] Because different second inspection images are captured at different focal lengths, their image quality will also vary. To ensure inspection accuracy, the robot can, based on image quality, identify the second inspection image with the best image quality as the target inspection image. Image quality metrics may include, but are not limited to, clarity, color, and noise, though these are not specified here. The robot can then perform corresponding inspection processing on the current inspection target based on this target inspection image. For example, if the inspection objective is instrument readings and the current inspection target is a specific instrument, the robot can perform a reading operation based on the identified target inspection image to determine the current reading of that instrument.

[0041] In some embodiments, the robot may obtain the first inspection image through the following process:

[0042] A1. Determine the pre-configured parameters corresponding to the current inspection target.

[0043] For each inspection target, the robot predetermines configuration parameters (i.e., pre-configured parameters) for the inspection target, presumably to ensure a clear, centered image of the inspection target. These parameters are then stored in the aforementioned storage space. The pre-configured parameters include: a preset navigation location for the inspection target, a preset robot orientation for the inspection target, a preset camera orientation for the inspection target, a preset focal length for the inspection target, and a first preset magnification for the inspection target.

[0044] Since the pre-configured parameters and the current inspection target are in a one-to-one correspondence, the robot can determine the pre-configured parameters corresponding to the current inspection target from all the pre-configured parameters stored therein after determining the current inspection target.

[0045] A2. Adjust the robot's posture, camera's posture, and camera's focal length according to pre-configured parameters.

[0046] As described above, the pre-configured parameters include a preset navigation location and a preset robot orientation for the current inspection target. The robot can then adjust its position based on the preset navigation location and orientation to match the pre-configured parameters.

[0047] As described above, the pre-configured parameters also include a preset camera orientation for the current inspection target. The robot can then adjust the position of its camera based on this preset camera orientation, ensuring that the camera's position matches the pre-configured parameters.

[0048] As described above, the pre-configured parameters also include a preset focal length for the current inspection target. The robot can then adjust the focal length of its camera to match the pre-configured parameters.

[0049] A3. After the adjustment is completed, the camera is controlled to use the first preset magnification as the shooting magnification to acquire the first inspection image.

[0050] As described above, the preconfigured parameters also include a first preset magnification for the current inspection target. After the robot's position, camera's position, and camera's focal length have been adjusted in step A2, the robot can control the camera to capture images at the first preset magnification, thereby acquiring a first image. It will be appreciated that the first inspection image thus captured typically includes the current inspection target.

[0051] Through the above process, after reaching the inspection location, the robot can further adjust its own posture, the posture of the camera it carries, and the camera's shooting parameters to ensure that the current inspection target is within the camera's shooting range and can be photographed more clearly by the camera.

[0052] In some embodiments, the robot can adjust the camera's position through the following process:

[0053] B1. Determine a first preset image corresponding to the current inspection target.

[0054] The first preset image is a reference image of the current inspection target captured by the robot based on pre-configured parameters. Because the pre-configured parameters corresponding to the current inspection target are determined based on the robot's premise of being able to clearly capture the current inspection target in the center, the current inspection target is necessarily located in the center of the first preset image.

[0055] B2. Adjust the camera's posture based on the first preset image and the first inspection image.

[0056] In the first preset image, the current inspection target is necessarily located at the center. However, due to navigation errors during the inspection process, the current inspection target may not be located at the center in the first inspection image. The robot can then apply a visual algorithm based on the first preset image and the first inspection image to calculate the image difference between the two. Based on this image difference, the robot adjusts the camera's position so that the composition of the camera's captured image is closer to that of the first preset image, ultimately achieving the effect of placing the current inspection target at the center of the camera's captured image.

[0057] In some embodiments, to improve the efficiency of adjusting the camera pose, step B2 can be specifically implemented by the following steps:

[0058] C1. Calculate a first transformation matrix from a first preset image to a first inspection image.

[0059] Because both the first preset image and the first inspection image are images captured by the robot under preconfigured parameters of the current inspection target, even with navigation errors, they still contain a large amount of identical image information. The robot can therefore calculate the transformation matrix from the first preset image to the first inspection image based on this identical image information. For ease of distinction, this embodiment of the present application refers to this transformation matrix as the first transformation matrix.

[0060] Specifically, the robot can calculate the first transformation matrix based on the key points of the image. The process can be: first extract the key points of the first preset image and the first inspection image respectively, and then match the key points of the first preset image and the key points of the first inspection image, thereby obtaining a first matching result. As an example only, the key point extraction and matching can adopt the scale-invariant feature transform (SIFT) algorithm or the super point algorithm, etc., which is not limited in the embodiment of the present application. Since the first matching result describes the correspondence between the key points of the first preset image and the key points of the first inspection image, the robot can calculate the transformation matrix from the first preset image to the first inspection image based on the first matching result.

[0061] C2. Calculate pixel coordinates of a pixel point in the first inspection image corresponding to the center point of the first preset image according to the first transformation matrix.

[0062] As described above, in the first preset image, the current inspection target is at its center position. Therefore, it can be approximately considered that the center point of the first preset image is the center point of the current inspection target, that is, the center point of the first preset image represents the current inspection target. Since the first preset image and the first inspection image are both images obtained by the robot taking pictures of the current inspection target under preconfigured parameters, the pixel points corresponding to the center point in the first inspection image also represent the current inspection target. When the first transformation matrix has been obtained, the robot can use the first transformation matrix to calculate the pixel coordinates of the pixel points in the first inspection image corresponding to the center point of the first preset image. The robot can approximately consider these pixel coordinates to be the coordinates of the center point of the current inspection target in the first inspection image.

[0063] C3. Adjust the camera pose according to the pixel coordinates.

[0064] The robot adjusts the camera's position to center the current inspection target within the camera's captured image, i.e., to align the center of the current inspection target with the center of the camera's captured image. Through step C2, the robot knows that the center of the current inspection target is the pixel coordinate, and the coordinates of the center of the captured image are also known to the robot. Therefore, the robot can quickly determine the difference between the center of the current inspection target and the center of the camera's captured image, and adjust the camera's position based on this difference, so that the captured object corresponding to the pixel coordinate (i.e., the current inspection target) is ultimately centered within the real-time captured image.

[0065] In some embodiments, the robot may specifically obtain multiple second inspection images through the following process:

[0066] D1. Fine-tune the preset focal length to obtain multiple candidate focal lengths including the preset focal length.

[0067] As previously described, the preconfigured parameters for the current inspection target include a preset focal length for the target. The robot can fine-tune the focal length within a certain focal length range (a certain focal length span), using this preset focal length as the center. For example, by slightly decreasing or increasing the focal length, the robot can obtain multiple candidate focal lengths, including the preset focal length.

[0068] It should be noted that the fixed focal length range can be set according to the depth of field of the camera. If the depth of field is small, the fixed focal length range can be larger; conversely, if the depth of field is small, the fixed focal length range can be smaller. The embodiments of the present application do not limit the fixed focal length range.

[0069] It should be noted that, in theory, the smaller the step size used for fine-tuning, the better the subsequent inspection effect will be; however, the processing time will also be longer accordingly. Therefore, the robot can set the step size according to the specific needs of the inspection, and this embodiment of the application does not limit this.

[0070] As an example only, let the preset focal length be f0 and the step size used for fine-tuning be f1. The resulting candidate focal lengths may include: f0, f0+f1, f0-f1, f0+2f1, f0-2f1, f0+3f1, f0-3f1, etc., which will not be elaborated here.

[0071] D2. Control the camera to use the second preset magnification as the shooting magnification and each candidate focal length as the shooting focal length to acquire a plurality of second inspection images.

[0072] In addition to the preset navigation location, robot orientation, camera orientation, focal length, and first preset magnification mentioned above, the pre-configured parameters for each inspection target also include a second preset magnification for that inspection target. Note that for the same inspection target, the first preset magnification in the pre-configured parameters is always smaller than the second preset magnification.

[0073] Therefore, it can be seen that the determined preconfigured parameters include a second preset magnification for the current inspection target. The robot can control the camera to capture multiple second inspection images using the second preset magnification as the shooting magnification and each candidate focal length as the shooting focal length. The number of second inspection images is equal to the number of candidate focal lengths. In other words, if N candidate focal lengths are determined in step D1, the robot can ultimately obtain N second inspection images for the current inspection target in step D2.

[0074] In some embodiments, among multiple indicators describing image quality, clarity is the indicator most affected by the shooting focal length. Based on this, the robot may primarily consider clarity and determine the target inspection image through the following process:

[0075] E1. Calculate the image clarity of each second inspection image.

[0076] The robot can calculate the image clarity of each second inspection image through a clarity algorithm such as the Tenengrad gradient method, the Laplacian gradient method or the variance method, which is not limited in this embodiment of the present application.

[0077] E2. Determine the second inspection image with the highest image clarity as the target inspection image.

[0078] The robot can traverse the second inspection images based on their image clarity, ultimately finding the second inspection image with the highest image clarity. This second inspection image can then be determined as the target inspection image. As an example, the search process can be: sorting all the second inspection images from highest to lowest image clarity, and the second inspection image that ranks highest in the final sorting is the second inspection image with the highest image clarity.

[0079] In some embodiments, considering that the current inspection target may not occupy the entire screen in each second inspection image, the robot can calculate the image clarity of each second inspection image through the following process:

[0080] F1. Determine a second preset image corresponding to the current inspection target and position parameters of the current inspection target in the second preset image.

[0081] The robot pre-stores a second preset image corresponding to each inspection target in its storage space. It can be understood that the difference between the first preset image and the second preset image corresponding to the same inspection target is only the shooting magnification. That is, when the pre-configured parameters corresponding to the current inspection target include a preset navigation position point, a preset robot orientation, a preset camera orientation, a preset focal length, a first preset magnification, and a second preset magnification, the first preset image is a reference image pre-photographed by the robot of the current inspection target based on the preset navigation position point, the preset robot orientation, the preset camera orientation, the preset focal length, and the first preset magnification in the pre-configured parameters, and the second preset image is a reference image pre-photographed by the robot of the current inspection target based on the preset navigation position point, the preset robot orientation, the preset camera orientation, the preset focal length, and the second preset magnification in the pre-configured parameters.

[0082] In addition, the robot also stores the position parameters of each inspection target in its corresponding second preset image in advance in its storage space. The position parameters include: the coordinates of a specified vertex (e.g., the upper left vertex) of the rectangular box corresponding to the inspection target in the second preset image, and the size of the rectangular box.

[0083] Thus, the robot can determine the corresponding second preset image and the position parameters of the current inspection target in the second preset image from its storage space according to the determined current inspection target.

[0084] F2. For each second inspection image, calculate a second transformation matrix from the second inspection image to the second preset image.

[0085] Similar to the first inspection image and the first preset image described above, any second inspection image will contain a significant amount of identical image information. Based on this identical image information, the robot can calculate a transformation matrix from the second inspection image to the second preset image. For ease of distinction, this transformation matrix is ​​referred to as the second transformation matrix in this embodiment of the application.

[0086] Specifically, the robot can still calculate the second transformation matrix based on the key points of the image. The process can be: first extract the key points of the second preset image and the second inspection image respectively, and then match the key points of the second preset image and the key points of the second inspection image, thereby obtaining a second matching result. As an example only, key point extraction and matching can use SIFT algorithm or super point algorithm, etc., which is not limited in the embodiment of the present application. Since the second matching result describes the correspondence between the key points of the second preset image and the key points of the second inspection image, the robot can calculate the transformation matrix from the second inspection image to the second preset image based on the second matching result.

[0087] F3. Determine a target area in the second inspection image according to the second transformation matrix and the position parameter, where the target area includes the current inspection target.

[0088] Once the second transformation matrix is ​​obtained, the robot can use it to calculate the area in the second inspection image that corresponds to the rectangular box of the current inspection target in the second preset image. This area is the target area. The robot can approximately assume that this area is the area enclosed by the rectangular box corresponding to the current inspection target in the second inspection image.

[0089] F4. Calculate the clarity of the target area and determine the clarity as the image clarity of the second inspection image.

[0090] It's understandable that the robot doesn't have information about the current inspection target outside the target area. Therefore, even if the image outside the target area is blurred, it won't affect the robot's detection and recognition of the current inspection target within the target area. Therefore, the robot no longer needs to consider the overall clarity of each second inspection image; instead, it only needs to consider the clarity of the area within each second inspection image that contains the current inspection target (i.e., the target area). The robot's clarity algorithm is described above and will not be further elaborated here.

[0091] In some embodiments, the robot may extract key points of the first preset image and the second preset image corresponding to each inspection target after being powered on, so as to save processing time during subsequent inspections.

[0092] In some embodiments, for any inspection target, the configuration information corresponding to the inspection target (including the pre-configured parameters corresponding to the inspection target, the first preset image, the second preset image, and the position parameters of the inspection target in the second preset image) can be determined specifically by the following method:

[0093] G1. Control the robot to move to a location that is relatively suitable for the inspection target and adjust the robot to face the inspection target. The location can be determined as a preset navigation location corresponding to the inspection target, and the direction can be determined as a preset robot direction corresponding to the inspection target.

[0094] G2. Manually adjust the camera's orientation, focal length, and magnification until the image captured by the camera includes the inspection target, is centered in the image, and is sufficiently clear. The orientation can be determined as the preset camera orientation corresponding to the inspection target, the focal length can be determined as the preset focal length corresponding to the inspection target, the magnification can be determined as the second preset magnification corresponding to the inspection target, and the image can be determined as the second preset image corresponding to the inspection target.

[0095] In addition, the staff can manually calibrate the rectangular frame (which can be the minimum circumscribed rectangular frame) corresponding to the inspection target in the image taken by the camera at this time (that is, the second preset image), and the position parameters of the rectangular frame (such as the size and the coordinates of the upper left vertex) can be determined as the position parameters of the inspection target in the second preset image.

[0096] It should be noted that the image captured by the camera at this time (ie, the second preset image) basically only contains the inspection target, does not contain background information, and may contain other inspection targets that are not the inspection target.

[0097] G3. Keep the robot and camera positions unchanged, and keep the camera focal length unchanged, and reduce the camera magnification (e.g., to 1) to obtain a new image. This image can be determined as the first preset image corresponding to the inspection target, and the shooting magnification can be determined as the first preset magnification corresponding to the inspection target.

[0098] It should be noted that the image captured by the camera at this time (ie, the first preset image) not only includes the inspection target, but also includes rich background information, and the inspection target is still located in the center of the picture.

[0099] At this point, the robot has determined the configuration information corresponding to the inspection target.

[0100] As can be seen from the above, in the embodiment of the present application, when the robot is conducting an inspection, it will first shoot at a smaller shooting magnification, so that the first inspection image obtained by shooting can include the current inspection target; then the camera's posture is adjusted according to the first inspection image, so that the current inspection target is in the center of the camera's shooting screen; then it will shoot at a larger shooting magnification, so that the multiple second inspection images obtained by shooting can all include the current inspection target; because the shooting focal lengths of these multiple second inspection images are different, the image quality of these multiple second inspection images will also be different to a certain extent, so the target inspection image can be screened out according to the image quality, so that the image quality of the obtained target inspection image is the best. From the above process, it can be seen that by shooting at a smaller shooting magnification first and then shooting at a larger shooting magnification, the situation where the current inspection target is not captured during the inspection can be reduced, thereby improving the success rate of the inspection; and by screening multiple second inspection images at different shooting focal lengths, the image quality of the target inspection image finally obtained can meet the inspection requirements, thereby ensuring the accuracy of the inspection results.

[0101] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0102] Corresponding to the inspection method provided above, an embodiment of the present application further provides an inspection device. The inspection device can be integrated into a robot; alternatively, the inspection device can be integrated into other devices that establish a communication connection with the robot and can control the robot, which is not limited in the present embodiment. Referring to Figure 2, the inspection device 2 in the embodiment of the present application includes:

[0103] Control module 201, used to control the robot to go to the inspection position corresponding to the current inspection target;

[0104] A first acquisition module 202 is configured to acquire a first inspection image captured by the robot's camera of the current inspection target after the robot reaches the inspection position;

[0105] An adjustment module 203 is configured to adjust the position of the camera based on the first inspection image so that the current inspection target is located at the center of the camera's shooting image;

[0106] The second acquisition module 204 is configured to acquire a plurality of second inspection images captured by the camera of the current inspection target, wherein the plurality of second inspection images have different shooting focal lengths but the same shooting magnification, and the shooting magnification of the plurality of second inspection images is greater than the shooting magnification of the first inspection image;

[0107] The determination module 205 is configured to determine the second inspection image with the best image quality among the plurality of second inspection images as the target inspection image.

[0108] In some embodiments, the first acquisition module 202 includes:

[0109] A first determining unit is used to determine pre-configured parameters corresponding to a current inspection target, the pre-configured parameters including: a preset navigation position point, a preset robot orientation, a preset camera orientation, a preset focal length, and a first preset magnification;

[0110] The first adjustment unit is used to adjust the robot's posture, the camera's posture and the camera's shooting focal length according to pre-configured parameters;

[0111] The first acquisition unit is used to control the camera to capture a first inspection image at a first preset magnification after the adjustment is completed.

[0112] In some embodiments, the adjustment module 203 includes:

[0113] A second determining unit is configured to determine a first preset image corresponding to the current inspection target, wherein the first preset image is a reference image pre-photographed by the robot of the current inspection target based on preconfigured parameters, and the current inspection target is located at the center of the first preset image;

[0114] The second adjustment unit is used to adjust the posture of the camera based on the first preset image and the first inspection image.

[0115] In some embodiments, the second adjustment unit includes:

[0116] A first calculation subunit, configured to calculate a first transformation matrix from a first preset image to a first inspection image;

[0117] A second calculation subunit is used to calculate the pixel coordinates of the pixel point corresponding to the center point of the first preset image in the first inspection image according to the first transformation matrix;

[0118] The pose adjustment subunit is used to adjust the pose of the camera according to the pixel coordinates.

[0119] In some embodiments, the preconfigured parameters further include: a second preset magnification, which is greater than the first preset magnification; the second acquisition module 204 includes:

[0120] A fine-tuning unit, configured to perform fine-tuning with a preset focal length as the center to obtain a plurality of candidate focal lengths including the preset focal length;

[0121] The second acquisition unit is used to control the camera to use a second preset magnification as the shooting magnification and each candidate focal length as the shooting focal length to acquire multiple second inspection images.

[0122] In some embodiments, the determination module 205 includes:

[0123] a calculation unit, configured to calculate the image clarity of each second inspection image;

[0124] The third determining unit is configured to determine the second inspection image with the highest image definition as the target inspection image.

[0125] In some embodiments, the computing unit includes:

[0126] a first determining subunit, configured to determine a second preset image corresponding to a current inspection target and position parameters of the current inspection target in the second preset image, wherein the first preset image is a reference image pre-taken by the robot of the current inspection target based on parameters in the preconfigured parameters other than the first preset magnification;

[0127] A third calculation subunit is configured to calculate, for each second inspection image, a second transformation matrix from the second inspection image to the second preset image;

[0128] A second determining subunit is configured to determine a target area in the second inspection image according to the second transformation matrix and the position parameter, where the target area includes the current inspection target;

[0129] The fourth calculation subunit is configured to calculate the clarity of the target area and determine the clarity as the image clarity of the second inspection image.

[0130] As can be seen from the above, in the embodiment of the present application, when the robot is conducting an inspection, it will first shoot at a smaller shooting magnification, so that the first inspection image obtained by shooting can include the current inspection target; then the camera's posture is adjusted according to the first inspection image, so that the current inspection target is in the center of the camera's shooting screen; then it will shoot at a larger shooting magnification, so that the multiple second inspection images obtained by shooting can all include the current inspection target; because the shooting focal lengths of these multiple second inspection images are different, the image quality of these multiple second inspection images is also different to a certain extent, so the target inspection image can be screened out according to the image quality, so that the image quality of the obtained target inspection image is the best. From the above process, it can be seen that by shooting at a smaller shooting magnification first and then shooting at a larger shooting magnification, the situation where the current inspection target is not captured during the inspection can be reduced, thereby improving the success rate of the inspection; and by screening multiple second inspection images at different shooting focal lengths, the image quality of the target inspection image finally obtained can meet the inspection requirements, thereby ensuring the accuracy of the inspection results.

[0131] Corresponding to the inspection method provided above, an embodiment of the present application further provides an electronic device. Referring to Figure 3, the electronic device 3 in the embodiment of the present application includes: a memory 301, one or more processors 302 (only one is shown in Figure 3) and a computer program stored in the memory 301 and executable on the processor. Among them: the memory 301 is used to store software programs and modules, and the processor 302 executes various functional applications and data processing by running the software programs and units stored in the memory 301 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 302 implements the following steps when running the above-mentioned computer program stored in the memory 301:

[0132] Control the robot to go to the inspection position corresponding to the current inspection target;

[0133] After the robot reaches the inspection position, a first inspection image captured by the robot's camera of the current inspection target is obtained;

[0134] Adjusting the camera's posture based on the first inspection image so that the current inspection target is in the center of the camera's shooting picture;

[0135] Acquire multiple second inspection images captured by the camera of the current inspection target, wherein the multiple second inspection images have different shooting focal lengths but the same shooting magnification, and the shooting magnification of the multiple second inspection images is greater than the shooting magnification of the first inspection image;

[0136] A second inspection image with the best image quality among the multiple second inspection images is determined as a target inspection image.

[0137] Assuming that the above is the first possible implementation, in a second possible implementation provided based on the first possible implementation, obtaining a first inspection image captured by the robot's camera of the current inspection target includes:

[0138] Determine pre-configured parameters corresponding to the current inspection target, the pre-configured parameters including: a preset navigation position point, a preset robot orientation, a preset camera orientation, a preset focal length, and a first preset magnification;

[0139] Adjust the robot's posture, camera's posture, and camera's focal length according to pre-configured parameters;

[0140] After the adjustment is completed, the camera is controlled to use the first preset magnification as the shooting magnification to acquire the first inspection image.

[0141] In a third possible implementation provided based on the second possible implementation, adjusting the position of the camera based on the first inspection image includes:

[0142] Determine a first preset image corresponding to the current inspection target, wherein the first preset image is a reference image pre-photographed by the robot based on preconfigured parameters of the current inspection target, and the current inspection target is located at the center of the first preset image;

[0143] Adjust the camera's position based on the first preset image and the first inspection image.

[0144] In a fourth possible implementation provided on the basis of the third possible implementation, adjusting the camera posture based on the first preset image and the first inspection image includes:

[0145] Calculating a first transformation matrix from a first preset image to a first inspection image;

[0146] Calculating pixel coordinates of a pixel point in the first inspection image corresponding to a center point of the first preset image according to the first transformation matrix;

[0147] Adjust the camera pose based on pixel coordinates.

[0148] In a fifth possible implementation provided based on the second possible implementation, the preconfigured parameters further include: a second preset magnification, where the second preset magnification is greater than the first preset magnification; and obtaining a plurality of second inspection images captured by the camera of the current inspection target includes:

[0149] Fine-tuning is performed with the preset focal length as the center to obtain multiple candidate focal lengths including the preset focal length;

[0150] The camera is controlled to use a second preset magnification as a shooting magnification and each candidate focal length as a shooting focal length to acquire a plurality of second inspection images.

[0151] In a sixth possible implementation provided on the basis of the fifth possible implementation, determining a second inspection image with the best image quality among the plurality of second inspection images as a target inspection image includes:

[0152] Calculating the image clarity of each second inspection image;

[0153] The second inspection image with the highest image clarity is determined as the target inspection image.

[0154] In a seventh possible implementation provided on the basis of the third possible implementation, calculating the image clarity of each second inspection image includes:

[0155] Determining a second preset image corresponding to the current inspection target and position parameters of the current inspection target in the second preset image, wherein the first preset image is a reference image pre-taken by the robot of the current inspection target based on parameters in the preconfigured parameters except the first preset magnification;

[0156] Calculating a second transformation matrix from the second inspection image to the second preset image;

[0157] Determine a target area in the second inspection image according to the second transformation matrix and the position parameter, where the target area includes the current inspection target;

[0158] The clarity of the target area is calculated and determined as the image clarity of the second inspection image.

[0159] It should be understood that in the embodiment of the present application, the processor 302 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0160] The memory 301 may include a read-only memory and a random access memory, and provides instructions and data to the processor 302. A portion or all of the memory 301 may also include a non-volatile random access memory. For example, the memory 301 may also store device type information.

[0161] As can be seen from the above, in the embodiment of the present application, when the robot is conducting an inspection, it will first shoot at a smaller shooting magnification, so that the first inspection image obtained by shooting can include the current inspection target; then the camera's posture is adjusted according to the first inspection image, so that the current inspection target is in the center of the camera's shooting screen; then it will shoot at a larger shooting magnification, so that the multiple second inspection images obtained by shooting can all include the current inspection target; because the shooting focal lengths of these multiple second inspection images are different, the image quality of these multiple second inspection images is also different to a certain extent, so the target inspection image can be screened out according to the image quality, so that the image quality of the obtained target inspection image is the best. From the above process, it can be seen that by shooting at a smaller shooting magnification first and then shooting at a larger shooting magnification, the situation where the current inspection target is not captured during the inspection can be reduced, thereby improving the success rate of the inspection; and by screening multiple second inspection images at different shooting focal lengths, the image quality of the target inspection image finally obtained can meet the inspection requirements, thereby ensuring the accuracy of the inspection results.

[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0163] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0164] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0165] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0166] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device that can carry the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media does not include electrical carrier signals and telecommunication signals.

[0168] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A patrol inspection method, characterized in that: include: Control the robot to go to the inspection position corresponding to the current inspection target; After the robot reaches the inspection position, obtaining a first inspection image captured by the robot's camera of the current inspection target; Adjusting the position of the camera based on the first inspection image so that the current inspection target is located at the center of the shooting picture of the camera; Acquire a plurality of second inspection images captured by the camera of the current inspection target, wherein the plurality of second inspection images have different shooting focal lengths but the same shooting magnifications, and the shooting magnifications of the plurality of second inspection images are greater than the shooting magnification of the first inspection image; A second inspection image with the best image quality among the multiple second inspection images is determined as a target inspection image.

2. The inspection method according to claim 1, characterized in that: The obtaining of a first inspection image captured by a camera of the robot on the current inspection target includes: Determine pre-configured parameters corresponding to the current inspection target, the pre-configured parameters including: a preset navigation position point, a preset robot orientation, a preset camera orientation, a preset focal length, and a first preset magnification; Adjusting the posture of the robot, the posture of the camera and the shooting focal length of the camera according to the preconfigured parameters; After the adjustment is completed, the camera is controlled to use the first preset magnification as the shooting magnification to acquire a first inspection image.

3. The inspection method according to claim 2, characterized in that: The adjusting the position and posture of the camera based on the first inspection image includes: Determine a first preset image corresponding to the current inspection target, wherein the first preset image is a reference image pre-photographed by the robot of the current inspection target based on the preconfigured parameters, and the current inspection target is at the center of the first preset image; The position and posture of the camera are adjusted based on the first preset image and the first inspection image.

4. The inspection method according to claim 3, characterized in that: The adjusting the position and posture of the camera based on the first preset image and the first inspection image includes: Calculating a first transformation matrix from the first preset image to the first inspection image; Calculating pixel coordinates of a pixel point in the first inspection image corresponding to a center point of the first preset image according to the first transformation matrix; The position and posture of the camera is adjusted according to the pixel coordinates.

5. The inspection method according to claim 2, characterized in that: The pre-configured parameters also include: a second preset magnification, the second preset magnification being greater than the first preset magnification; and the acquiring of a plurality of second inspection images captured by the camera of the current inspection target includes: Fine-tuning is performed with the preset focal length as the center to obtain a plurality of candidate focal lengths including the preset focal length; The camera is controlled to use the second preset magnification as the shooting magnification, and each of the candidate focal lengths is used as the shooting focal length to collect a plurality of second inspection images.

6. The inspection method according to claim 5, characterized in that: The step of determining the second inspection image with the best image quality among the plurality of second inspection images as the target inspection image comprises: Calculating the image clarity of each of the second inspection images; The second inspection image with the highest image definition is determined as the target inspection image.

7. The inspection method according to claim 6, characterized in that: The calculating the image clarity of each of the second inspection images includes: Determine a second preset image corresponding to the current inspection target, and position parameters of the current inspection target in the second preset image, wherein the first preset image is a reference image pre-photographed by the robot of the current inspection target based on parameters in the preconfigured parameters except the first preset magnification; For each of the second inspection images, calculating a second transformation matrix from the second inspection image to the second preset image; Determine a target area in the second inspection image according to the second transformation matrix and the position parameter, wherein the target area includes the current inspection target; The definition of the target area is calculated, and the definition is determined as the image definition of the second inspection image.

8. A patrol inspection device, characterized in that: include: A control module is used to control the robot to go to the inspection position corresponding to the current inspection target; A first acquisition module, configured to acquire, after the robot reaches the inspection position, a first inspection image captured by the camera of the robot on the current inspection target; An adjustment module, configured to adjust the position of the camera based on the first inspection image so that the current inspection target is located at the center of the shooting picture of the camera; A second acquisition module, used to acquire a plurality of second inspection images captured by the camera on the current inspection target, wherein the plurality of second inspection images have different shooting focal lengths but the same shooting magnification, and the shooting magnification of the plurality of second inspection images is greater than the shooting magnification of the first inspection image; The determination module is used to determine the second inspection image with the best image quality among the multiple second inspection images as the target inspection image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Robot inspection method and device, computer readable storage medium and robot

    CN110850872A

  • Inspection control method of movable platform and movable platform

    CN111316185A

  • Inspection method and device for movable platform, movable platform and storage medium

    CN113273173A

  • Inspection image acquisition method and device, electronic equipment and storage medium

    CN113727022A

  • Distribution network line routing inspection method based on target tracking and related device

    CN114004891A

Cited By

  • Wearable device-based electric meter box data processing method and apparatus, and electronic device

    CN119360360A

  • Configuration method and system for preset position of inspection camera of transformer substation

    CN119767145A