Position correction method and device, computer device and storage medium
By using image processing technology in nuclear power plants to acquire and analyze image differences of tracked robots, the robot's preset position can be automatically corrected, solving the problem of insufficient correction efficiency and accuracy in existing technologies and improving the accuracy and efficiency of equipment status recognition.
Patent Information
- Application Number
- CN202211108891.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-09-13
AI Technical Summary
In existing technologies, the preset position correction efficiency of nuclear power plant robots is low and the accuracy is insufficient, resulting in the inability to accurately read the working status of secondary protection and control equipment.
By acquiring the image to be registered and the standard image of the orbital robot at a preset position, image processing technology is used to search for image blocks that meet the similarity conditions, calculate the position difference and obtain the offset pixel value, and perform position correction in combination with the pre-determined conversion parameters.
Automatic position correction of the track robot has been achieved, which improves the efficiency and accuracy of correction, ensures that the robot can accurately identify the equipment status, and reduces the workload of manual maintenance.
Smart Images

Figure CN115509225B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of nuclear power plant operation optimization, and more particularly, relates to a position correction method and device, a computer device and a storage medium. BACKGROUND
[0002] The main functions of the main switch station and the super-high voltage power distribution device (GEW) of a nuclear power plant are to distribute and deliver the power generated by the nuclear power unit to the power grid, and to supply the power of the external power grid to the plant power equipment when the nuclear power unit is shut down or started. The GEW system is provided with the following secondary protection and control devices: line protection, T area protection, bus protection, circuit breaker protection, transformer protection, stability control device, remote control device, measurement and control device, PMU device, fault recorder, and signal protection substation. In order to realize the technical field of the secondary protection and control device state monitoring system, the high-definition camera of the inspection robot is used to automatically identify and judge the secondary protection and control device meter value and switch position state, and the steps of setting the working state of the track robot are as follows:
[0003] 1) The inspection personnel controls the robot to run along the track to the screen cabinet to be inspected.
[0004] 2) The robot lifting mechanism is controlled to lower the inspection task module (with a high-definition camera holder) to the inspection height.
[0005] 3) The holder is controlled to rotate the high-definition camera to aim at the device (a certain meter) to be monitored.
[0006] 4) The inspection personnel records the current robot position (track position, lifting rod position, holder position) and sets it as the current working preset position.
[0007] 5) During daily inspection, the robot system automatically runs to the preset position according to the inspection task every day, and automatically reads the device working state (reads the value of a certain meter) at the position.
[0008] As can be seen from the above steps, whether the meter value can be correctly read depends on the accuracy of the robot preset position. If the error of the preset position accuracy is large, the device (a certain meter) to be monitored cannot be positioned, and the working state of the device cannot be read. In the related art, in order to ensure the accuracy of the preset position, manual correction of the preset position is required, which is not only low in efficiency, but also low in correction accuracy. SUMMARY
[0009] The application aims to overcome the technical problems in the prior art, and provide a position correction method, device, computer device and storage medium capable of improving correction efficiency and accuracy.
[0010] In order to achieve the above-mentioned object, the present application provides a position correction method, comprising the following steps:
[0011] In the process of track robot inspection, a to-be-registered image is obtained by capturing a target image at a preset position of the track robot;
[0012] A standard image corresponding to the preset position is obtained, the standard image being an image obtained by capturing the target image at the preset position of the track robot in a normal operation state, and the standard image comprising at least one marker image block;
[0013] An image block between the marker image block and the to-be-registered image is searched for similarity satisfying a similarity condition, so as to obtain a target image block corresponding to the marker image block;
[0014] A position difference between the marker image block and the target image block is obtained, so as to obtain a target offset pixel value of the to-be-registered image relative to the standard image;
[0015] A conversion parameter between a motion distance and an offset pixel value is obtained, the target offset pixel value is converted based on the conversion parameter, so as to obtain a motion distance error of the track robot, and the preset position of the track robot is corrected based on the motion distance error.
[0016] According to one embodiment of the position correction method of the present application, the searching for an image block between the marker image block and the to-be-registered image for similarity satisfying a similarity condition, so as to obtain a target image block corresponding to the marker image block, comprises: performing global search on the to-be-registered image, so as to obtain a plurality of candidate image blocks with the same size as the marker image block; for each candidate image block, cross-correlation calculation is performed between the candidate image block and the marker image block, so as to obtain a correlation degree between the candidate image block and the marker image block; similarity between the candidate image block and the marker image block is calculated based on the correlation degree; and the candidate image block with the maximum similarity is selected from each candidate image block as the target image block corresponding to the marker image block.
[0017] According to an embodiment of the position correction method, the standard image comprises a plurality of marker image blocks; the searching for image blocks from the image to be registered that have a similarity to the marker image blocks satisfying a similarity condition to obtain target image blocks comprises: searching for image blocks from the image to be registered that have a highest similarity to each of the marker image blocks to obtain a target image block corresponding to each of the marker image blocks, respectively; and the obtaining of a position difference between the marker image blocks and the target image blocks comprises: determining a target marker image block from the plurality of marker image blocks, calculating a distance between the target marker image block and at least one other marker image block to obtain a first distance, calculating a distance between a target image block corresponding to the target marker image block and at least one other target image block to obtain a second distance, and when a distance difference between the first distance and the second distance is greater than a preset threshold, giving an alarm prompt, and when the distance difference between the first distance and the second distance is less than the preset threshold, obtaining a position difference between the target marker image block and the corresponding target image block.
[0018] According to an embodiment of the position correction method, in the horizontal direction, the conversion parameter between the motion distance and the offset pixel value is determined by the following steps: obtaining a first target position of the track robot when a left edge of the target image is located at a left edge of a camera field of view of the track robot; obtaining a second target position of the track robot when the left edge of the target image is located at a right edge of the camera field of view of the track robot; determining a first target position difference based on the first target position and the second target position, and obtaining the conversion parameter between the horizontal motion distance and the offset pixel value based on the first target position difference and a horizontal resolution of the camera of the track robot.
[0019] According to an embodiment of the position correction method, the obtaining of a position difference between the marker image blocks and the target image blocks to obtain a target offset pixel value of the image to be registered relative to the standard image comprises: obtaining a horizontal coordinate difference between the marker image blocks and the target image blocks to obtain the target offset pixel value of the image to be registered relative to the standard image; and the conversion of the target offset pixel value based on the conversion parameter to obtain a motion distance error of the track robot comprises: multiplying the horizontal coordinate difference by the conversion parameter between the horizontal motion distance and the offset pixel value to obtain a horizontal motion distance error of the track robot.
[0020] According to an embodiment of the position correction method of the present invention, in the vertical direction, the conversion parameter between the motion distance and the offset pixel value is determined by the following steps: obtaining a first target position of the track robot when the left edge of the target image is located at the upper edge of the camera field of view of the track robot; obtaining a second target position of the track robot when the left edge of the target image is located at the lower edge of the camera field of view of the track robot; determining a first target position difference based on the first target position and the second target position; and obtaining the conversion parameter between the vertical motion distance and the offset pixel value based on the first target position difference and the vertical resolution of the camera of the track robot.
[0021] According to an embodiment of the position correction method of the present invention, obtaining the positional difference between the marked image block and the target image block to obtain the target offset pixel value of the image to be registered relative to the standard image includes: obtaining the vertical coordinate difference between the marked image block and the target image block to obtain the target offset pixel value of the image to be registered relative to the standard image; and converting the target offset pixel value based on the conversion parameter to obtain the motion distance error of the track robot includes: multiplying the vertical coordinate difference by the conversion parameter between the vertical motion distance and the offset pixel value to obtain the vertical motion distance error of the track robot.
[0022] To achieve the above-mentioned objective, the present invention provides a position correction device, the position correction device comprising:
[0023] The image acquisition module is used to acquire the image to be registered obtained by the track robot from the target image at a preset position during the inspection process of the track robot;
[0024] A standard image acquisition module is used to acquire a standard image corresponding to the preset position. The standard image is an image captured by the track robot at the preset position in normal operation. The standard image includes at least one marked image block.
[0025] The target image patch determination module is used to search for image patches in the image to be registered that have a similarity condition with the marked image patch, and obtain the target image patch corresponding to the marked image patch;
[0026] The offset pixel value determination module is used to obtain the positional difference between the marked image block and the target image block, and to obtain the target offset pixel value of the image to be registered relative to the standard image;
[0027] a distance error determination module configured to obtain a conversion parameter between a previously determined motion distance and a pixel offset value, convert the target pixel offset value based on the conversion parameter, and obtain a motion distance error of the track robot;
[0028] a position correction module configured to correct a preset position of the track robot based on the motion distance error.
[0029] To achieve the above-mentioned purposes, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned position correction method when executing the computer program.
[0030] To achieve the above-mentioned purposes, the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the above-mentioned position correction method.
[0031] The position correction method, device, computer device and storage medium of the present application can obtain a to-be-registered image of a target image captured by a track robot at a preset position during track robot inspection, obtain a standard image corresponding to the preset position, the standard image being an image of the target image captured by the track robot at the preset position under a normal operation state, the standard image comprising at least one marker image block, search for an image block from the to-be-registered image that has a similarity to the marker image block satisfying a similarity condition, obtain a target image block corresponding to the marker image block, obtain a position difference between the marker image block and the target image block, obtain a target pixel offset value of the to-be-registered image relative to the standard image, obtain a conversion parameter between a previously determined motion distance and a pixel offset value, convert the target pixel offset value based on the conversion parameter, obtain a motion distance error of the track robot, and correct the preset position of the track robot based on the motion distance error, so that automatic position correction can be realized, the correction efficiency is improved, and the correction accuracy is improved. BRIEF DESCRIPTION OF DRAWINGS
[0032] The position correction method, device, computer device and storage medium of the present application will be described in detail below in combination with the accompanying drawings and specific embodiments, wherein:
[0033] Figure 1 An application environment diagram of the position correction method in an embodiment of the present application;
[0034] Figure 2 A flowchart of the position correction method in an embodiment of the present application;
[0035] Figure 3As an embodiment of the present application, the schematic diagram of the appearance of the track robot is shown in the figure;
[0036] Figure 4 As an embodiment of the present application, an example of the target image is shown in the figure;
[0037] Figure 5 As an embodiment of the present application, an example of the standard image is shown in the figure;
[0038] Figure 6 As an embodiment of the present application, the structure diagram of the position correction device is shown in the figure;
[0039] Figure 7 As an embodiment of the present application, the internal structure diagram of the computer device is shown in the figure. DETAILED DESCRIPTION
[0040] In order to make the invention purpose, technical scheme and technical effect of the present application clearer, the present application will be further described in detail in the following with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described in the present specification are only for the purpose of explaining the present application, and are not intended to limit the present application.
[0041] The position correction method provided by the present application can be applied to the application environment as shown in the figure. Figure 1 The track robot 102 can communicate with the computer device 104 through a network, wherein the network can be a wired network or a wireless network. The conventional track robot positioning error adjustment method needs to be manually preset and corrected by the operation and maintenance personnel, which consumes a lot of manpower for regular maintenance. The present application solves the robot walking positioning error caused by mechanical running cumulative error, track wear error or other various system errors after long-term operation of the track robot system, ensures that the robot can shoot the detection target every time, lays a solid foundation for accurate identification of the meter value, effectively improves the automatic inspection identification rate of the secondary protection and control equipment of the nuclear power plant switch station, and reduces the workload of manual maintenance.
[0042] According to an embodiment of the present application, as shown in the figure, Figure 2 A position correction method is provided, which is applied to the computer device in the figure Figure 1 It should be understood that the position correction method of the present application can also be executed by the inspection robot. Specifically, in the present embodiment, the position correction method comprises the following steps:
[0043] Step 202, in the track robot inspection process, obtaining the to-be-registered image obtained by shooting the target image at the preset position by the track robot.
[0044] The track robot refers to a robot that can move horizontally or vertically along the track. For example,Figure 3 Fig. 1 shows a schematic diagram of the appearance of the track robot in a specific application. The target image can be any image, such as Figure 4 Fig. 2 shows an example of the target image in a practical application. The preset position refers to a position point selected in a certain movement direction of the robot. There can be one or more preset positions, and the plurality of preset positions refers to at least two preset positions. In a specific application, the preset position can be the middle position point of the robot when running in a certain direction.
[0045] Specifically, the target image is pasted at the preset position. During the inspection of the track robot, when the inspection robot moves to the preset position, the target image can be photographed by the camera to obtain a to-be-registered image, and then sent to the computer device.
[0046] In step 204, a standard image corresponding to the preset position is obtained. The standard image is an image obtained by photographing the target image at the preset position of the track robot in a normal running state. The standard image includes at least one marked image block.
[0047] The normal running state refers to a state in which the track robot does not generate a position error at the preset position. For example, the state can be a state of the track robot after the preset position of the track robot is corrected by manual correction. Since the preset position is corrected, the image photographed by the track robot at the preset position is a standard image, which can be used as a reference image when calculating the position error.
[0048] Specifically, the computer device can send an instruction to the track robot to make the robot in an initialization position (initial position), i.e., the starting position of each inspection. Generally, the robot is located at the starting position of the track, the lifting mechanism is located at the uppermost position, the gimbal is located at the position after self-checking, and the high-definition camera is located at the closest focus position (the largest field of view position). Assuming that the effective running distance of the track robot in the horizontal direction is L, a preset position for correction can be set at the position of L / 2 in the horizontal direction. In the preset position picture, a target image is pasted, so that the image is located at the center position of the camera picture of the inspection robot. The target image is photographed by the camera of the inspection robot to obtain a standard image. One or more image regions are marked on the standard image to obtain a marked image block. In a specific embodiment, as shown in Figure 5 Fig. 4 shows a schematic diagram of the standard image. As can be seen, the standard image has four marked image blocks.
[0049] In step 206, an image block that satisfies a similarity condition with the marked image block is searched from the to-be-registered image to obtain a target image block corresponding to the marked image block.
[0050] The similarity condition can be that the similarity is greater than a preset similarity threshold, or the similarity is maximum.
[0051] Specifically, for each marker image, the computer device can traverse each image block in the to-be-registered image that matches the marker image in size and shape, then calculate the similarity, and find an image block that satisfies the similarity condition as the target image block of the marker image block.
[0052] According to one embodiment of the present application, searching for an image block from the to-be-registered image that satisfies the similarity condition with the marker image block to obtain the target image block corresponding to the marker image block includes: performing global search on the to-be-registered image to obtain a plurality of candidate image blocks that are the same size as the marker image block; for each candidate image block, performing cross-correlation calculation between the candidate image block and the marker image block to obtain the correlation between the candidate image block and the marker image block; calculating the similarity between the candidate image block and the marker image block based on the correlation; and selecting the candidate image block with the maximum similarity from the candidate image blocks as the target image block corresponding to the marker image block.
[0053] Specifically, assuming that the standard image is S and the to-be-registered image is T, the width of the to-be-registered image T is WT and the height is HT; the standard image S and the to-be-registered image T are both converted into 256-color gray scale images. The target image block with the highest similarity to each marker image block is calculated in the to-be-registered image T using the global search method, and the calculation formula is as follows:
[0054]
[0055] wherein T ij R(i,j) represents an image block with a length of W and a height of H centered at the coordinate (i,j) in the to-be-registered image, wherein the value range of i is (W / 2) to (WT-W / 2), the value range of j is (H / 2) to (HT-H / 2), and R(i,j) is the similarity of the image block centered at the coordinate (i,j). The maximum value in all R(i,j) is counted, and the image block corresponding to the maximum value is the target image block.
[0056] According to one embodiment of the present application, the standard image comprises a plurality of marked image blocks; searching for image blocks from the image to be registered that have a similarity to the marked image blocks satisfying a similarity condition to obtain target image blocks comprises: searching for image blocks from the image to be registered that have a highest similarity to each of the marked image blocks to obtain target image blocks corresponding to each of the marked image blocks respectively; and obtaining a position difference between the marked image blocks and the target image blocks comprises: determining a target marked image block from the plurality of marked image blocks, calculating a distance between the target marked image block and at least one other marked image block to obtain a first distance; calculating a distance between the target image block corresponding to the target marked image block and at least one other target image block to obtain a second distance; when a distance difference between the first distance and the second distance is greater than a preset threshold, performing an alarm prompt; and when the distance difference between the first distance and the second distance is less than the preset threshold, obtaining the position difference between the target marked image block and the target image block corresponding thereto.
[0057] Specifically, the position difference between the marked image blocks can be a distance between feature position points of the marked image blocks. Assuming that the standard image comprises four marked image blocks, taking the feature point positions of the four marked image blocks, the feature point positions can be, for example, center point positions of the image blocks, assuming that the feature point positions of the four marked image blocks are S1, S2, S3, and S4 respectively, the distance between the first marked image block and the second marked image block can be a distance between S1 and S2. The distance between the target image blocks can be a distance between position points matching the feature position points in the marked image blocks in the target image blocks, i.e., position points with coordinates (i, j), which are also center positions, assuming that the position points matching S1, S2, S3, and S4 are T1, T2, T3, and T4 respectively, the distance between the first target image block and the second target image block can be a distance between T1 and T2.
[0058] The computer device can calculate the distance between the target marked image block and at least one other marked image block respectively, and then average to obtain the first distance, and calculate the distance between the target image block corresponding to the target marked image block and other target image blocks respectively, and then average to obtain the second distance. When the distance difference between the first distance and the second distance is less than the preset threshold, the current meter conforms to the meter type and model in the template, i.e., all the modeling parameters that need to be marked are consistent, and the position difference between the target marked image block and the target image block corresponding thereto can be obtained, and the position verification is continued. When the distance difference between the first distance and the second distance is greater than the preset threshold, the process is re-executed, and the alarm prompt is performed when the distance difference is still greater than the preset threshold for a plurality of consecutive times. The alarm prompt can be one or more of a sound prompt, a text prompt, or a light prompt.
[0059] Step 208, obtaining the position difference between the marker image block and the target image block, and obtaining the target offset pixel value of the image to be registered relative to the standard image.
[0060] The position difference includes the number of pixel points different in the horizontal direction between the marker image block and the target image block, and the number of pixel points different in the vertical direction between the marker image block and the target image block.
[0061] Specifically, the computer device can obtain the number of pixel points different in the horizontal direction and the vertical direction between the marker image block and the target image block, respectively, to obtain the target offset pixel value in the horizontal direction and the vertical direction, respectively.
[0062] Step 210, obtaining the conversion parameter between the motion distance and the offset pixel value determined in advance, and converting the target offset pixel value based on the conversion parameter to obtain the motion distance error of the track robot.
[0063] Specifically, the target offset pixel value calculated above is an offset on the image pixel, and the image offset needs to be converted into a distance offset in the actual motion process, so the computer device can obtain the conversion parameter between the motion distance and the offset pixel value determined in advance, and then convert the pixel offset value to obtain the motion distance error.
[0064] According to an embodiment of the present application, in the horizontal direction, the conversion parameter between the motion distance and the offset pixel value is determined by the following steps: obtaining a first target position of the track robot when the left edge of the target image is located at the left edge of the camera field of view of the track robot; obtaining a second target position of the track robot when the left edge of the target image is located at the right edge of the camera field of view of the track robot; determining a first target position difference based on the first target position and the second target position, and obtaining the conversion parameter between the horizontal motion distance and the offset pixel value based on the first target position difference and the horizontal resolution of the camera of the track robot.
[0065] Specifically, the track robot is controlled to move horizontally so that the left edge of the target image is located at the left edge of the camera field of view (i.e. just see all the target image), and the current robot running position z1 (unit: millimeter) is recorded. The track robot is controlled to move horizontally so that the left edge of the target image is located at the right edge of the high-definition camera field of view (i.e. just can't see all the target image), and the current robot running position z2 (unit: millimeter) is recorded. If the resolution of the camera is X*Y, the conversion parameter between the horizontal motion distance and the offset pixel value is (Z2-Z1) / X. For example, assuming that the camera is set to collect a resolution of 1080P (1920*1080) in clarity, the conversion parameter between the horizontal motion distance and the offset pixel value is (Z2-Z1) / 1920.
[0066] According to one embodiment of the present application, in the vertical direction, the conversion parameter between the motion distance and the offset pixel value is determined by the following steps: obtaining a first target position of the track robot when the left edge of the target image is located at the upper edge of the camera field of view of the track robot; obtaining a second target position of the track robot when the left edge of the target image is located at the lower edge of the camera field of view of the track robot; determining a first target position difference based on the first target position and the second target position, and obtaining the conversion parameter between the vertical motion distance and the offset pixel value based on the first target position difference and the vertical resolution of the camera of the track robot.
[0067] Specifically, the vertical lifting mechanism is controlled to move up and down so that the upper edge of the target image is located at the upper edge of the field of view of the high-definition camera (i.e., just see all the target image), and the current position z1 (unit: millimeter) of the lifting mechanism is recorded. The vertical lifting mechanism is controlled to move up and down so that the upper edge of the target image is located at the lower edge of the field of view of the high-definition camera (i.e., just can't see all the target image), and the current position z2 (unit: millimeter) of the lifting mechanism is recorded. If the resolution of the camera is X*Y, then the conversion parameter between the vertical motion distance and the offset pixel value is (Z2-Z1) / Y. For example, assuming that the camera is set to collect a resolution of 1080P (1920*1080), the conversion parameter between the vertical motion distance and the offset pixel value is (Z2-Z1) / 1080.
[0068] In step 212, the preset position of the track robot is corrected based on the motion distance error.
[0069] In the above position correction method, during the track robot inspection, the track robot captures the target image at the preset position to obtain a to-be-registered image, a standard image corresponding to the preset position is obtained, the standard image is an image obtained by capturing the target image at the preset position under a normal operation state of the track robot, the standard image includes at least one marker image block, an image block that satisfies a similarity condition with the marker image block is searched from the to-be-registered image to obtain a target image block corresponding to the marker image block, a position difference between the marker image block and the target image block is obtained, a target offset pixel value of the to-be-registered image relative to the standard image is obtained, a conversion parameter between a motion distance and an offset pixel value is obtained in advance, the target offset pixel value is converted based on the conversion parameter to obtain a motion distance error of the track robot, and the preset position of the track robot is corrected based on the motion distance error. Therefore, the position correction can be automatically performed, the correction efficiency is improved, and the correction accuracy is improved.
[0070] According to one embodiment of the present application, the position difference between the mark image block and the target image block is obtained to obtain a target offset pixel value of the image to be registered relative to the standard image, comprising: obtaining a horizontal coordinate difference value between the mark image block and the target image block to obtain the target offset pixel value of the image to be registered relative to the standard image; and converting the target offset pixel value based on a conversion parameter to obtain a motion distance error of the track robot, comprising: multiplying the horizontal coordinate difference value by a conversion parameter between a horizontal motion distance and the offset pixel value to obtain a horizontal motion distance error of the track robot.
[0071] Specifically, the horizontal motion distance error is an error of the robot in horizontal movement on the horizontal track. Assuming that a feature position point in the mark image block is S1 and a position point matched with S1 in the target image block is T1, a difference value between an X horizontal coordinate of S1 and an X horizontal coordinate of T1 is calculated, and then a horizontal motion distance error of the robot is calculated as:
[0072] Q1 = (T1X - S1X) * ((Z2 - Z1) / X)
[0073] If an absolute value of Q1 is greater than a preset distance threshold (the value is determined according to a track running accuracy requirement of the robot), then the horizontal track position of the track robot at the preset position is corrected according to Q1.
[0074] It can be understood that if there are multiple mark images, the Q1s calculated from the multiple mark images are averaged, and it is determined whether the average value is greater than the preset distance threshold, and if yes, the horizontal track position of the track robot at the preset position is corrected.
[0075] According to one embodiment of the present application, the position difference between the mark image block and the target image block is obtained to obtain a target offset pixel value of the image to be registered relative to the standard image, comprising: obtaining a vertical coordinate difference value between the mark image block and the target image block to obtain the target offset pixel value of the image to be registered relative to the standard image; and converting the target offset pixel value based on a conversion parameter to obtain a motion distance error of the track robot, comprising: multiplying the vertical coordinate difference value by a conversion parameter between a vertical motion distance and the offset pixel value to obtain a vertical motion distance error of the track robot.
[0076] Specifically, the vertical motion distance error is an error of a lifting mechanism of the robot in up-down movement. Assuming that a feature position point in the mark image block is S1 and a position point matched with S1 in the target image block is T1, a difference value between a Y horizontal coordinate of S1 and a Y horizontal coordinate of T1 is calculated, and then a vertical motion distance error of the lifting mechanism is calculated as:
[0077] Q2 = (T1Y - S1Y) * ((Z2 - Z1) / Y)
[0078] If the absolute value of Q2 is greater than a preset distance threshold (the value is according to the track running accuracy requirement of the robot), the vertical position of the lifting mechanism at the preset position is corrected according to Q2.
[0079] It can be understood that if there are multiple marker images, the Q2 calculated from the multiple marker images is averaged, and it is determined whether the average value is greater than the preset distance threshold. If it is greater, the vertical position of the lifting mechanism at the preset position is corrected.
[0080] It should be understood that although each step in the above flowchart is displayed in sequence according to the direction of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowchart can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0081] According to one embodiment of the present application, as shown in Figure 6 a position correction device 600 is provided, comprising:
[0082] A to-be-registered image acquisition module 602 is configured to acquire a to-be-registered image obtained by photographing a target image at a preset position by a track robot during track robot inspection;
[0083] A standard image acquisition module 604 is configured to acquire a standard image corresponding to the preset position, the standard image being an image obtained by photographing the target image at the preset position by the track robot in a normal running state, and the standard image comprising at least one marker image block;
[0084] A target image block determination module 606 is configured to search for an image block from the to-be-registered image that has a similarity to the marker image block satisfying a similarity condition, to obtain a target image block corresponding to the marker image block;
[0085] An offset pixel value determination module 608 is configured to acquire a position difference between the marker image block and the target image block, to obtain a target offset pixel value of the to-be-registered image relative to the standard image;
[0086] A distance error determination module 610 is configured to acquire a conversion parameter between a previously determined motion distance and the offset pixel value, to convert the target offset pixel value based on the conversion parameter, to obtain a motion distance error of the track robot;
[0087] The position correction module 612 is configured to correct the preset position of the track robot based on the motion distance error.
[0088] The position correction device can obtain the to-be-registered image of the target image captured by the track robot at the preset position during the track robot inspection, obtain the standard image corresponding to the preset position, and search for the image block that meets the similarity condition between the to-be-registered image and the marker image block, so as to obtain the target image block corresponding to the marker image block. The position difference between the marker image block and the target image block is obtained, the target offset pixel value of the to-be-registered image relative to the standard image is obtained, the conversion parameter between the motion distance and the offset pixel value is obtained, the target offset pixel value is converted based on the conversion parameter, and the motion distance error of the track robot is obtained. The preset position of the track robot is corrected based on the motion distance error, so that the position correction can be automatically performed, the correction efficiency is improved, and the correction accuracy is improved.
[0089] According to an embodiment of the present application, the target image block determination module is further configured to perform global search on the to-be-registered image to obtain a plurality of candidate image blocks with the same size as the marker image block; for each candidate image block, cross-correlation calculation is performed between the candidate image block and the marker image block to obtain the correlation degree between the candidate image block and the marker image block; the similarity between the candidate image block and the marker image block is calculated based on the correlation degree; and the candidate image block with the largest similarity is selected from the candidate image blocks as the target image block corresponding to the marker image block.
[0090] According to an embodiment of the present application, the standard image includes a plurality of marker image blocks; the target image block determination module is further configured to search for the image block with the highest similarity between each marker image block from the to-be-registered image to obtain the target image block corresponding to each marker image block; and the offset pixel value determination module is further configured to determine the target marker image block from the plurality of marker image blocks, calculate the distance between the target marker image block and at least one other marker image block to obtain a first distance, calculate the distance between the target image block corresponding to the target marker image block and at least one other target image block to obtain a second distance, and perform alarm prompting when the distance difference between the first distance and the second distance is greater than a preset threshold value, and obtain the position difference between the target marker image block and the corresponding target image block when the distance difference between the first distance and the second distance is less than the preset threshold value.
[0091] According to one embodiment of the present application, the position correction device further comprises a first determination module configured to obtain a first target position of the track robot when a left edge of the target image is located at a left edge of a camera field of view of the track robot, and obtain a second target position of the track robot when the left edge of the target image is located at a right edge of the camera field of view of the track robot, and determine a first target position difference based on the first target position and the second target position, and obtain a conversion parameter between the horizontal motion distance and the offset pixel value based on the first target position difference and a horizontal resolution of the camera of the track robot.
[0092] According to one embodiment of the present application, the offset pixel value determination module is configured to obtain a horizontal coordinate difference value between the mark image block and the target image block, and obtain a target offset pixel value of the image to be registered relative to the standard image, and the distance error determination module is further configured to multiply the horizontal coordinate difference value by the conversion parameter between the horizontal motion distance and the offset pixel value, and obtain a horizontal motion distance error of the track robot.
[0093] According to one embodiment of the present application, the position correction device further comprises a second determination module configured to obtain a first target position of the track robot when a left edge of the target image is located at an upper edge of a camera field of view of the track robot, and obtain a second target position of the track robot when the left edge of the target image is located at a lower edge of the camera field of view of the track robot, and determine a first target position difference based on the first target position and the second target position, and obtain a conversion parameter between the vertical motion distance and the offset pixel value based on the first target position difference and a vertical resolution of the camera of the track robot.
[0094] According to one embodiment of the present application, the offset pixel value determination module is further configured to obtain a vertical coordinate difference value between the mark image block and the target image block, and obtain a target offset pixel value of the image to be registered relative to the standard image, and the distance error determination module is further configured to multiply the vertical coordinate difference value by the conversion parameter between the vertical motion distance and the offset pixel value, and obtain a vertical motion distance error of the track robot.
[0095] The specific limitations of the position correction device can refer to the limitations of the position correction method in the foregoing, which will not be repeated here. Each module in the position correction device can be realized by software, hardware, and a combination thereof, in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0096] According to one embodiment of the present application, the present application provides a computer device, the internal structure diagram of which can be as shown in Figure 7As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the terminal outside through the network connection. The computer program is executed by the processor to implement a position correction method.
[0097] Those skilled in the art can understand that, Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or less components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0098] According to one embodiment of the present application, the present application provides a computer device comprising a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-mentioned position correction method.
[0099] According to one embodiment of the present application, the present application provides a computer readable storage medium having a computer program stored thereon, and the computer program is executed by the processor to implement the steps of the above-mentioned position correction method.
[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. In the embodiments of the present application, any reference to memory, storage, database or other medium can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0101] The technical features of the above embodiments can be combined in any way. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the description. The above embodiments only express several embodiments of the present application, which are described in detail, but it should not be considered as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.
Claims
1. A position correction method characterized by, The method comprises the following steps: In the process of track robot inspection, a to-be-registered image obtained by shooting a target image at a preset position of the track robot is acquired; A standard image corresponding to the preset position is acquired, the standard image being an image obtained by shooting the target image at the preset position of the track robot in a normal running state, and the standard image comprising at least one marker image block; An image block between the to-be-registered image and the marker image block satisfying a similarity condition is searched, to obtain a target image block corresponding to the marker image block; A position difference between the marker image block and the target image block is acquired, to obtain a target offset pixel value of the to-be-registered image relative to the standard image; A conversion parameter between a motion distance and the offset pixel value is acquired, and the target offset pixel value is converted based on the conversion parameter, to obtain a motion distance error of the track robot; The preset position of the track robot is corrected based on the motion distance error.
2. The position correction method according to claim 1, characterized by, The searching of the image block between the to-be-registered image and the marker image block satisfying the similarity condition comprises: A global search is performed on the to-be-registered image, to obtain a plurality of candidate image blocks with the same size as the marker image block; For each candidate image block, cross-correlation calculation is performed between the candidate image block and the marker image block, to obtain a correlation degree between the candidate image block and the marker image block; The similarity between the candidate image block and the marker image block is calculated based on the correlation degree; The candidate image block with the maximum similarity is selected from the candidate image blocks, as the target image block corresponding to the marker image block.
3. The position correction method according to claim 1, characterized by, The standard image comprises a plurality of marker image blocks; and the searching of the image block between the to-be-registered image and the marker image block satisfying the similarity condition comprises: The image block with the highest similarity between the to-be-registered image and each marker image block is searched respectively, to obtain a target image block corresponding to each marker image block. The acquisition of the position difference between the marker image block and the target image block comprises: A target marker image block is determined from the plurality of marker image blocks, and a distance between the target marker image block and at least one other marker image block is calculated, to obtain a first distance; A distance between a target image block corresponding to the target marker image block and at least one other target image block is calculated, to obtain a second distance; When a distance difference value between the first distance and the second distance is greater than a preset threshold value, an alarm is prompted; When the distance difference value between the first distance and the second distance is less than the preset threshold value, a position difference between the target marker image block and the corresponding target image block is acquired.
4. The position correction method according to claim 1, characterized by, In the horizontal direction, the conversion parameter between the motion distance and the offset pixel value is determined through the following steps: A first target position of the track robot is acquired when a left edge of the target image is located at a left edge of a camera field of view of the track robot; a second target position of the track robot when a left edge of the target image is located at a right edge of a camera field of view of the track robot; determining a first target position difference based on the first target position and the second target position, and obtaining a conversion parameter between a horizontal movement distance and a shift pixel value based on the first target position difference and a horizontal resolution of the camera of the track robot.
5. The position correction method according to claim 4, characterized by, the obtaining of the position difference between the mark image block and the target image block to obtain a target shift pixel value of the image to be registered relative to the standard image comprises: obtaining a horizontal coordinate difference value between the mark image block and the target image block to obtain a target shift pixel value of the image to be registered relative to the standard image; the conversion of the target shift pixel value based on the conversion parameter to obtain the movement distance error of the track robot comprises: multiplying the horizontal coordinate difference value by the conversion parameter between the horizontal movement distance and the shift pixel value to obtain a horizontal movement distance error of the track robot.
6. The position correction method according to claim 1, characterized by, In the vertical direction, the conversion parameter between the movement distance and the shift pixel value is determined by the following steps: a first target position of the track robot when a left edge of the target image is located at an upper edge of a camera field of view of the track robot; a second target position of the track robot when a left edge of the target image is located at a lower edge of a camera field of view of the track robot; determining a first target position difference based on the first target position and the second target position, and obtaining a conversion parameter between a vertical movement distance and a shift pixel value based on the first target position difference and a vertical resolution of the camera of the track robot.
7. The position correction method according to claim 6, characterized by, the obtaining of the position difference between the mark image block and the target image block to obtain a target shift pixel value of the image to be registered relative to the standard image comprises: obtaining a vertical coordinate difference value between the mark image block and the target image block to obtain a target shift pixel value of the image to be registered relative to the standard image; the conversion of the target shift pixel value based on the conversion parameter to obtain the movement distance error of the track robot comprises: multiplying the vertical coordinate difference value by the conversion parameter between the vertical movement distance and the shift pixel value to obtain a vertical movement distance error of the track robot.
8. A position correction device, characterized by The device comprises: an image to be registered acquisition module, configured to acquire an image to be registered obtained by photographing a target image at a preset position by a track robot during a track robot inspection process; a standard image acquisition module, configured to acquire a standard image corresponding to the preset position, the standard image being an image obtained by photographing the target image at the preset position by the track robot in a normal operation state, and the standard image comprising at least one mark image block; a target image block determination module, configured to search for an image block from the image to be registered, the image block satisfying a similarity condition with the mark image block, to obtain a target image block corresponding to the mark image block. An offset pixel value determination module is configured to obtain a position difference between the mark image block and the target image block, and obtain a target offset pixel value of the image to be registered relative to the standard image. A distance error determination module is configured to obtain a conversion parameter between a previously determined motion distance and the offset pixel value, convert the target offset pixel value based on the conversion parameter, and obtain a motion distance error of the track robot. A position correction module is configured to correct a preset position of the track robot based on the motion distance error. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
Citation Information
Patent Citations
Object position detection device, travel control system, and travel control method
CN113646607A
Distance correction apparatus and method of monitoring system
JP2003083742A