Instrument calibration method, device, equipment and medium
In the scene where the robot automatically recognizes the instrument, the instrument detection model and template matching technology are used to correct the instrument image, which solves the problem of inaccurate readings caused by the tilt of the instrument and improves the recognition accuracy.
Patent Information
- Application Number
- CN202210283269.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-03-22
AI Technical Summary
In the scenario where the robot automatically recognizes the instrument, when the instrument has an angle tilt, there is a possibility that the instrument reading is inaccurate, and an instrument correction method is needed.
By inputting the instrument image to be corrected into the pre-trained instrument detection model, the instrument category is obtained, and the corresponding instrument template image is determined in the instrument template library according to the category. Then, the pre-labeled template image area blocks and template image features are determined in the template image, and the corresponding area blocks are matched in the image to be corrected according to these features, the coordinate difference of the specified position is determined, and the correction image is performed by the affine transformation matrix Correction.
Accurate correction of instrument images is achieved, and the accuracy of instrument readings of the robot in automatic recognition scenarios is improved.
Smart Images

Figure CN114627347B_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the technical field of computers, and in particular to an instrument calibration method, device, equipment and medium. Background Art
[0002] Nowadays, artificial intelligence is being used more and more, and the most common application is various services, inspections, and patrols using robots as carriers. Among them, various detection tasks that rely on computer vision, for robots, the accuracy of detection is affected by many factors, such as the surrounding natural environment factors and the camera shooting angle factors, which have a great impact on the detection accuracy.
[0003] In the prior art, in the scenario of automatic instrument recognition of a robot, when the instrument is tilted at an angle, etc., there is a possibility that the instrument reading may be inaccurate. Therefore, a method for calibrating the instrument is now needed. Summary of the invention
[0004] One or more embodiments of this specification provide an instrument calibration method, device, equipment and medium for solving the following technical problems:
[0005] In the prior art, in the scenario of automatic instrument recognition of a robot, when the instrument is tilted at an angle, etc., there is a possibility that the instrument reading may be inaccurate. Therefore, a method for calibrating the instrument is now needed.
[0006] One or more embodiments of this specification adopt the following technical solutions:
[0007] One or more embodiments of this specification provide an instrument calibration method, wherein the instrument is applied to a scene of automatic recognition of a robot, and the method comprises:
[0008] Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category;
[0009] According to the instrument category, determining a corresponding instrument template image in an instrument template library;
[0010] Determining a pre-marked template image area block in the instrument template image, and determining a template image feature in the template image area block;
[0011] Matching a corresponding image region block to be corrected in the instrument image to be corrected according to the template image feature, wherein the template image feature is an invariant feature outside the instrument pointer;
[0012] Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0013] The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0014] Furthermore, after inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain the instrument category, the method further includes:
[0015] Inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain a plurality of instrument position coordinates, wherein the instrument detection model is a neural network model;
[0016] extracting an instrument position image in the instrument image to be corrected according to the plurality of instrument position coordinates;
[0017] The matching of the corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature specifically includes:
[0018] The corresponding image area block to be corrected is matched in the instrument position image according to the template image feature.
[0019] Furthermore, before matching the corresponding image region block to be corrected in the instrument image to be corrected according to the template image feature, the method further includes:
[0020] Determining the size of the instrument template image;
[0021] The instrument image to be corrected is scaled to the size of the instrument template image to obtain a scaled instrument image.
[0022] Furthermore, matching a corresponding image region block to be corrected in the instrument image to be corrected according to the template image feature specifically includes:
[0023] Using the template image area block as a sliding window;
[0024] According to the features of the template image, the sliding window is feature matched with the zoomed instrument image at a fixed step length to obtain the image region block to be corrected.
[0025] Furthermore, when the sliding window is feature matched with the zoomed instrument image according to a fixed step size, the feature matching method includes horizontal movement, vertical movement and rotational movement.
[0026] Furthermore, the first coordinate value is a coordinate value of a center position of a template image region block, and the second coordinate value is a coordinate value of a center position of the to-be-corrected image region block.
[0027] Furthermore, the correction processing is performed on the instrument image to be corrected according to the first coordinate value and the second coordinate value, specifically including:
[0028] Solving the affine transformation matrix of the first coordinate value and the second coordinate value to obtain an affine transformation matrix;
[0029] The instrument image to be corrected is corrected according to the affine transformation matrix.
[0030] One or more embodiments of this specification provide an instrument calibration device, wherein the instrument is applied to a scene of automatic recognition of a robot, and the device comprises:
[0031] An input unit, inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain the instrument category;
[0032] A template determination unit, which determines a corresponding instrument template image in an instrument template library according to the instrument category;
[0033] a feature determination unit, which determines a pre-marked template image region block in the instrument template image, and determines a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer;
[0034] A matching unit, matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature;
[0035] a coordinate determination unit, which determines the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determines the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0036] The correction unit performs correction processing on the instrument image to be corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0037] One or more embodiments of this specification provide an instrument calibration device, wherein the instrument is applied to a scene of automatic recognition of a robot, and the device includes:
[0038] at least one processor; and,
[0039] a memory communicatively connected to the at least one processor; wherein,
[0040] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0041] Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category;
[0042] According to the instrument category, determining a corresponding instrument template image in an instrument template library;
[0043] Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer;
[0044] Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature;
[0045] Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0046] The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0047] One or more embodiments of this specification provide a non-volatile computer storage medium, which is applied to the scene of automatic recognition of a robot and stores computer executable instructions, wherein the computer executable instructions are configured as follows:
[0048] Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category;
[0049] According to the instrument category, determining a corresponding instrument template image in an instrument template library;
[0050] Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer;
[0051] Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature;
[0052] Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0053] The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0054] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: the instrument of the embodiments of this specification is applied to the scene of automatic identification of the robot, the instrument category is obtained through the instrument detection model, and then the corresponding instrument template image is determined in the instrument template library according to the instrument category, and the template image area block is determined in the instrument template image, and the corresponding image area block to be corrected with the same image features in the instrument image to be corrected is found according to the template image area block, and the instrument image to be corrected is corrected according to the difference in coordinate values of the specified position in the template image area block and the image area block to be corrected, so as to obtain the corrected instrument image. The embodiments of this specification can correct the instrument image in the above manner, so that the robot can obtain more accurate results in the scene of automatic identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0056] In the attached picture:
[0057] Figure 1 A flow chart of an instrument calibration method provided for one or more embodiments of this specification;
[0058] Figure 2 A flowchart of an instrument calibration method based on deep learning and template matching provided in one or more embodiments of this specification;
[0059] Figure 3 A schematic diagram of an image area block provided for one or more embodiments of this specification;
[0060] Figure 4 A schematic diagram of the structure of an instrument calibration device provided for one or more embodiments of this specification;
[0061] Figure 5 A schematic diagram of the structure of an instrument calibration device provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0062] The embodiments of this specification provide an instrument calibration method, device, equipment and medium.
[0063] Nowadays, artificial intelligence is being used more and more, and the most common application is various services, inspections, and patrols using robots as carriers. Among them, various detection tasks that rely on computer vision are affected by many factors for robots, such as the surrounding natural environment and the camera's shooting angle, which have a great impact on the detection accuracy.
[0064] In industrial fields such as electricity and coal, a common demand for robots is to be able to monitor instrument data in real time under various extreme environments. At the same time, the accuracy of the monitoring also has a great impact.
[0065] Therefore, in order to solve the above problems, the embodiments of this specification propose an instrument calibration method based on deep learning and template matching. This method is suitable for some scenarios where robots are required to perform instrument detection and reading. It can solve the problem of errors and deviations in robot instrument inspection readings caused by various reasons such as tilt and deformation of pointer instruments.
[0066] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0067] Figure 1 A flow chart of an instrument calibration method provided for one or more embodiments of the present specification, in which the instrument is applied to a scenario of automatic identification of a robot. The process can be executed by an instrument calibration system, which can calibrate the instrument identified by the robot, greatly improving the accuracy of the robot's instrument reading. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0068] The method steps of the embodiment of this specification are as follows:
[0069] S102, inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain the instrument category.
[0070] In the embodiment of the present specification, the instrument detection model can be a neural network model, which is trained by a training set to obtain an instrument detection model that meets the requirements. The instrument categories may include ammeters, voltmeters, and pressure gauges, and the trained instrument detection model can accurately identify the instrument categories.
[0071] S104: Determine a corresponding instrument template image in an instrument template library according to the instrument category.
[0072] In the embodiments of the present specification, the instrument template image may represent a standard instrument image corresponding to the same type of instrument, and the instrument image to be corrected is subsequently calibrated using the instrument template image.
[0073] S106, determining a pre-marked template image region block in the instrument template image, and determining a template image feature in the template image region block.
[0074] In the embodiment of the present specification, the template image area block is used to calibrate the instrument image to be calibrated, and the area block is a pre-selected area in the instrument template image, for example, the area of the instrument scale 0 is selected as the template image area block. Determining the template image features in the template image area block is to determine the template image features contained in the template image area block, for example, the area of the instrument scale 0 is selected as the template image area block, and determining the template image features in the template image area block can be the angle of 0 and the coordinates at which 0 is located.
[0075] It should be noted that the template image features can be unchanging features other than the instrument pointer. Since the instrument pointer is variable, the template image features cannot select the variable features to prevent the first coordinate value and the second coordinate obtained subsequently from being unstable, and it is also impossible to accurately correct the instrument image to be corrected.
[0076] S108, matching a corresponding image region block to be corrected in the instrument image to be corrected according to the template image feature.
[0077] Furthermore, the sizes of the instrument template image and the instrument diagram to be corrected may be different. If the sizes of the instrument template image and the instrument diagram to be corrected are different, the subsequent instrument calibration is also performed at different sizes, which may not be accurate.
[0078] Based on the above problem, the embodiment of the present specification can first determine the size of the instrument template image before matching the corresponding image area block to be corrected in the instrument image to be corrected according to the template image features; then, the instrument image to be corrected is proportionally scaled to the size of the instrument template image to obtain the scaled instrument image.
[0079] Furthermore, in the embodiments of the present specification, when matching the corresponding image area block to be corrected in the instrument image to be corrected according to the template image features, the template image area block can be first used as a sliding window, and then according to the template image features, the sliding window is feature matched with the scaled instrument image at a fixed step size to obtain the image area block to be corrected. In this way, image area blocks of the same size can be obtained.
[0080] Furthermore, since the instrument image to be corrected may move horizontally, vertically or rotationally, when the sliding window is feature matched with the scaled instrument image according to a fixed step size, the feature matching method may include horizontal movement, vertical movement and rotational movement, so that an accurate image area block to be corrected can be obtained.
[0081] Furthermore, the instrument image to be calibrated may contain many blank areas around it. During the instrument calibration process, the image where the instrument is located can be first determined in the calibrated instrument image, and subsequent operations can be performed in the image where the instrument is located.
[0082] In the embodiments of the present specification, after inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain the instrument category, the instrument image to be corrected can be first input into the pre-trained instrument detection model to obtain a plurality of instrument position coordinates, and then, the instrument position image in the instrument image to be corrected can be extracted according to the plurality of instrument position coordinates, that is, the image where the instrument is located is subtracted from the instrument image to be corrected.
[0083] In the embodiment of this specification, when matching the corresponding image area block to be corrected in the instrument image to be corrected according to the template image features, the corresponding image area block to be corrected is matched in the instrument position image according to the template image features.
[0084] S110, determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value.
[0085] In the embodiment of the present specification, the first coordinate value is the coordinate value of the center position of the template image area block, and the second coordinate value is the coordinate value of the center position of the to-be-corrected image area block.
[0086] S112: performing correction processing on the instrument image to be corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0087] In an embodiment of the present specification, when the instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value, the first coordinate value and the second coordinate value can be firstly solved for an affine transformation matrix to obtain an affine transformation matrix, and the affine transformation matrix is used to represent the offset value of the second coordinate value relative to the first coordinate value. Then, the instrument image to be corrected is corrected according to the affine transformation matrix, that is, the instrument image to be corrected is corrected according to the offset value represented by the affine transformation matrix.
[0088] Furthermore, the technical problems raised in the embodiments of this specification can also be explained through the following contents, which can be specifically referred to in Figure 2 The flow chart of the instrument calibration method based on deep learning and template matching is shown, and this method can be considered as a more specific expression of the above embodiment. This method is suitable for some scenarios where robots are required to detect and read instruments. In this method, the pointer instrument detection model is first trained by collecting pointer instrument panel images of different types and shapes to realize the detection of different types of pointer instruments; at the same time, there is an instrument template library, each instrument category corresponds to a complete positive instrument template image of a fixed size, and several (more than 2) area blocks with obvious features are pre-framed in the instrument template image, which are used to transform and correct the detected pointer instrument image through template matching, and the pointer instrument image can be straightened through various mathematical transformations to facilitate subsequent instrument reading detection.
[0089] This method can use two image processing technologies: one is image detection technology based on deep learning; the other is image comparison technology based on template matching. Among them, the training of the instrument detection model is based on the needs of specific inspection instruments, a large amount of instrument image data is collected, the data set is manually annotated, and the instrument detection model is trained using the data set. The output of the model is the detected instrument location coordinates and category.
[0090] See the calibration method process for Figure 2 , the specific steps are:
[0091] S202, using the instrument detection model to detect the instrument image, and output the coordinates and category of the instrument.
[0092] S204, extracting the instrument image according to the coordinates of the instrument, searching the instrument template library according to the type of the instrument, finding the corresponding template instrument image and the manually marked image area block and the center coordinates of the area block.
[0093] The center coordinates of the region block are (x1, y1)(x2, y2)…(x n ,y n ), where (x1, y1) is the center coordinate of the first image area block, (x2, y2) is the center coordinate of the second image area block, and so on.
[0094] The extracted instrument image is the image where the instrument is located, that is, the blank area in the instrument image is eliminated to obtain an image with only the instrument.
[0095] S206, scaling the extracted instrument image to the size of the template image according to the size of the template instrument image.
[0096] S208, using a sliding window of the image region block size (width and height), and performing feature matching with the scaled instrument image at a fixed step size, each region block requires the above matching operation.
[0097] S210, after all the area blocks are matched, the same number of area blocks as the area blocks of the template image are obtained on the detected instrument image, and the center coordinates of each area block are calculated.
[0098] The coordinates of the center of the region block are (x1', y1')(x2', y2')…(x n ',y n '), where (x1', y1') are the coordinates of the center of the first image region block, (x2', y2') are the coordinates of the center of the second image region block, and so on.
[0099] S212, solving the affine transformation matrix of the center coordinates of the area blocks corresponding to S204 and S210 to obtain an affine transformation matrix, that is, the rotation change required to transform the detected image into the template, so that the detected image can be corrected.
[0100] The image area blocks manually marked in S204 can be found in Figure 3 A schematic diagram of an image region block is shown, in which two image region blocks are marked.
[0101] Corresponding to the above embodiment, Figure 4 A structural schematic diagram of an instrument calibration device provided for one or more embodiments of the present specification, wherein the instrument is applied to a scenario of automatic recognition of a robot, and the device includes: an input unit 402, a template determination unit 404, a feature determination unit 406, a matching unit 408, a coordinate determination unit 410, and a calibration unit 412.
[0102] The input unit 402 inputs the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category;
[0103] The template determination unit 404 determines a corresponding instrument template image in an instrument template library according to the instrument category;
[0104] The feature determination unit 406 determines a pre-marked template image region block in the instrument template image, and determines a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer;
[0105] The matching unit 408 matches the corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature;
[0106] The coordinate determination unit 410 determines the coordinates of the designated position in the template image region block to obtain a first coordinate value, and determines the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0107] The correction unit 412 performs correction processing on the instrument image to be corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0108] Corresponding to the above embodiment, Figure 5 A schematic diagram of the structure of an instrument calibration device provided in one or more embodiments of this specification, wherein the instrument is applied to a scene of automatic recognition of a robot, and the device comprises:
[0109] at least one processor; and,
[0110] a memory communicatively connected to the at least one processor; wherein,
[0111] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0112] Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category;
[0113] According to the instrument category, determining a corresponding instrument template image in an instrument template library;
[0114] Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer;
[0115] Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature;
[0116] Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0117] The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0118] One or more embodiments of this specification provide a non-volatile computer storage medium, which is applied to the scene of automatic recognition of a robot and stores computer executable instructions, wherein the computer executable instructions are configured as follows:
[0119] Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category;
[0120] According to the instrument category, determining a corresponding instrument template image in an instrument template library;
[0121] Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer;
[0122] Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature;
[0123] Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value;
[0124] The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
[0125] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0126] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0127] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. An instrument calibration method, characterized in that: The instrument is applied to a scene of automatic recognition of a robot, and the method comprises: Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category; According to the instrument category, determining a corresponding instrument template image in an instrument template library; Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer; Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature; Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value; The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
2. The method according to claim 1, characterized in that After inputting the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category, the method further includes: Inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain a plurality of instrument position coordinates, wherein the instrument detection model is a neural network model; extracting an instrument position image in the instrument image to be corrected according to the plurality of instrument position coordinates; The matching of the corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature specifically includes: The corresponding image area block to be corrected is matched in the instrument position image according to the template image feature.
3. The method according to claim 1, characterized in that Before matching the corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature, the method further includes: Determining the size of the instrument template image; The instrument image to be corrected is scaled to the size of the instrument template image to obtain a scaled instrument image.
4. The method according to claim 3, characterized in that: The matching of the corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature specifically includes: Using the template image area block as a sliding window; According to the features of the template image, the sliding window is feature matched with the zoomed instrument image at a fixed step length to obtain the image region block to be corrected.
5. The method according to claim 4, characterized in that When the sliding window is feature matched with the zoomed instrument image according to a fixed step length, the feature matching method includes horizontal movement, vertical movement and rotational movement.
6. The method according to claim 1, characterized in that The first coordinate value is a coordinate value of a center position of a template image region block, and the second coordinate value is a coordinate value of a center position of the to-be-corrected image region block.
7. The method according to claim 1, characterized in that The step of performing correction processing on the instrument image to be corrected according to the first coordinate value and the second coordinate value specifically includes: Solving the affine transformation matrix of the first coordinate value and the second coordinate value to obtain an affine transformation matrix; The instrument image to be corrected is corrected according to the affine transformation matrix.
8. An instrument calibration device, characterized in that: The instrument is applied to the scene of automatic recognition of the robot, and the device comprises: An input unit, inputting the instrument image to be corrected into a pre-trained instrument detection model to obtain the instrument category; A template determination unit, which determines a corresponding instrument template image in an instrument template library according to the instrument category; a feature determination unit, which determines a pre-marked template image region block in the instrument template image, and determines a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer; A matching unit, matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature; a coordinate determination unit, which determines the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determines the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value; The correction unit performs correction processing on the instrument image to be corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
9. An instrument calibration device, characterized in that: The instrument is applied to the scene of automatic recognition of the robot, and the device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category; According to the instrument category, determining a corresponding instrument template image in an instrument template library; Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer; Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature; Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value; The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
10. A non-volatile computer storage medium, characterized in that: The instrument is applied to the scene of automatic recognition of the robot, and stores computer executable instructions, and the computer executable instructions are set as follows: Input the instrument image to be corrected into the pre-trained instrument detection model to obtain the instrument category; According to the instrument category, determining a corresponding instrument template image in an instrument template library; Determine a pre-marked template image region block in the instrument template image, and determine a template image feature in the template image region block, wherein the template image feature is an invariant feature outside the instrument pointer; Matching a corresponding image area block to be corrected in the instrument image to be corrected according to the template image feature; Determining the coordinates of a designated position in the template image region block to obtain a first coordinate value, and determining the coordinates of the designated position in the to-be-corrected image region block to obtain a second coordinate value; The instrument image to be corrected is corrected according to the first coordinate value and the second coordinate value to obtain a corrected instrument image.
Citation Information
Patent Citations
Pointer reading identification method and device, computer device and readable storage medium
CN110245654A
Pointer type instrument inclination correction method and system
CN111488874A