Method, device and equipment for identifying pointermeter inspection image

By selecting correction points not on a straight line in the pointer instrument inspection image for deformity correction, the problem that the instrument cannot get a front view during robot inspection is solved, and the accuracy and correction effect of reading recognition are improved.

CN118968487APending Publication Date: 2024-11-15SUZHOU GUANGGE EQUIP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411042824.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

During the robot inspection, the shooting angle of the robot camera and the installation angle of the instrument are limited by the environment, and the pointer instrument cannot be obtained with a front view. The existing deformity correction methods are not effective, which affects the accuracy of reading recognition.

Method used

By obtaining the center coordinates of each scale value in the inspection image of the pointer instrument, selecting the preset number of correction points not on a straight line for image deformity correction, using the diagonal angle and area of ​​the convex quadrilateral to determine the correction points, combined with Perspective transformation and optical character recognition technology realizes front view restoration of the instrument.

Benefits of technology

It improves the accuracy of pointer instrument reading recognition, reduces errors, improves image correction effect, and effectively restores the front view of the instrument.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968487A_ABST
    Figure CN118968487A_ABST
Patent Text Reader

Abstract

The invention provides a pointer type instrument inspection image identification method, device and equipment, and is applied to the technical field of instrument identification, and the method comprises the steps: obtaining the center coordinates of each scale value of a pointer type instrument in a first inspection image, the first inspection image is determined according to an image acquired by aiming at the pointer type instrument in an inspection process, and the first inspection image comprises one pointer type instrument; a preset number of center coordinates are determined as correction points according to the center coordinates of the scale values, and the correction points are not located on the same straight line and are used for carrying out malformation correction on the first inspection image. According to the scheme, the selected correction points have a good image malformation correction effect, so that errors are reduced, and the reading accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of instrument recognition, and in particular to a method, device and equipment for recognizing inspection images of pointer-type instruments. Background Art

[0002] With the development of industrial automation, image processing and pattern recognition technology, robot intelligent inspection technology has emerged for various pointer instruments widely used in power, petroleum, chemical and other industries to replace manual inspection, improve inspection efficiency, and reduce the danger and inspection cost of manual inspection. Generally, the inspection process involves the task of reading a large number of pointer instrument readings. At present, there have been some studies on the processing and recognition of pointer instrument images. The existing solutions are mainly divided into two categories: locating the instrument area based on traditional image processing methods and locating the pointer instrument area based on deep learning. After locating the instrument area, the position of the pointer is further found. The method is often through image segmentation and Hough line detection, and then the final reading is obtained based on the position angle of the pointer combined with prior knowledge.

[0003] However, during the robot inspection process, the shooting angle of the robot camera and the installation angle of the instrument are often limited by the position of the current environment, resulting in the robot being unable to obtain a front view of the pointer instrument. The current better solution is to use deformity correction methods to correct the detected images, but the correction effect is not ideal. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, equipment and computer-readable storage medium for identifying inspection images of pointer instruments, so as to improve the correction effect of inspection images and improve the accuracy of pointer instrument reading recognition.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying a pointer instrument inspection image, comprising: obtaining the center coordinates of each scale value of the pointer instrument in a first inspection image, wherein the first inspection image is determined based on an image collected for the pointer instrument during an inspection process, and the first inspection image includes a pointer instrument; determining a preset number of center coordinates as correction points based on the center coordinates of each scale value, wherein the correction points are not on a straight line and are used to perform deformity correction on the first inspection image.

[0006] In the above scheme, correction points are selected in the center coordinates of the scale values ​​and it is ensured that the correction points are not on a straight line. The selection of correction points is an important step in the correction algorithm. The selected correction points have a better image deformity correction effect, thereby reducing errors and improving reading accuracy.

[0007] As an optional method, the preset number is 4, and the preset number of center coordinates are determined as correction points according to the center coordinates of each scale value, including: among the multiple initial convex quadrilaterals surrounded by four center coordinates, multiple candidate convex quadrilaterals are determined according to the diagonal angles of the multiple initial convex quadrilaterals, wherein the candidate convex quadrilateral is the initial convex quadrilateral with the smallest absolute value of the difference between the diagonal angle and the right angle; and a target convex quadrilateral is determined from the multiple candidate convex quadrilaterals, wherein the four center coordinates corresponding to the target convex quadrilateral are the correction points. In the above scheme, the closer the diagonal angle of the convex quadrilateral is to a right angle, the closer the shape of the convex quadrilateral is to a rectangle, thereby indirectly ensuring that the four selected correction points are not on a straight line, and finally obtaining a good correction effect.

[0008] As an optional method, the determination of the target convex quadrilateral from the multiple candidate convex quadrilaterals includes: calculating the areas of the multiple candidate convex quadrilaterals; and determining the candidate convex quadrilateral with the largest area as the target convex quadrilateral. In the above scheme, one of the multiple candidate quadrilaterals is selected according to the size of the area to determine the final correction point. The larger the area, the smaller the probability that the candidate convex quadrilateral is close to a flat rectangle, thereby further excluding the situation where the four correction points are parallel or nearly parallel, greatly improving the correction effect.

[0009] As an optional manner, before determining multiple candidate convex quadrilaterals among the multiple initial convex quadrilaterals according to the diagonal angles of the multiple initial convex quadrilaterals, the method further includes: converting two diagonals of the initial convex quadrilateral into vectors, and calculating the trigonometric function value corresponding to the angle between the two vectors; and determining the diagonal angle according to the trigonometric function value. In the above scheme, vectors and trigonometric functions are introduced to calculate the diagonal angle of the convex quadrilateral, which is simpler, more efficient, more practical and more operable.

[0010] As an optional way, after determining a preset number of center coordinates as correction points according to the center coordinates of each scale value, the method further includes: performing deformity correction on the first inspection image according to the correction points to obtain a corrected inspection image; for each pointer in the corrected inspection image, calculating the pointer angle between the pointer and the horizontal direction according to the coordinates of the two end points of the pointer in the corrected inspection image; determining the reading result of the pointer instrument according to the scale value of the pointer instrument in the first inspection image, the center coordinates of the scale value in the corrected inspection image, the pointer angle, and the prior knowledge of the position angle of each scale value of the pointer instrument. In the above scheme, the inspection image is corrected for deformity using the correction points selected by the above method, which can well restore the front view of the pointer instrument, have a good correction effect, and improve the accuracy of reading recognition.

[0011] As an optional method, before obtaining the center coordinates of each scale value in the first inspection image of the pointer-type instrument, it also includes: detecting the area of ​​each scale value; obtaining the coordinates of the upper left vertex, the upper right vertex, the lower right vertex, and the lower left vertex of the area where each scale value is located; and determining the center coordinates of the corresponding scale value according to the average value of the coordinates of the upper left vertex, the upper right vertex, the lower right vertex, and the lower left vertex. In the above scheme, the center coordinates of the scale value are determined according to the coordinates of the four boundary points of the area where the scale value is located, so that more accurate center coordinates representing the position of the scale value can be obtained, which is conducive to improving the accuracy of the reading.

[0012] As an optional method, before obtaining the center coordinates of each scale value of the pointer-type instrument in the first inspection image, it also includes: obtaining a second inspection image, the second inspection image is an image collected for the pointer-type instrument during the inspection process, and the second inspection image includes multiple pointer-type instruments; determining the detection area corresponding to each pointer-type instrument in the second inspection image; determining the image corresponding to one detection area among the multiple detection areas as the first inspection image; performing optical character recognition on the first inspection image to obtain the center coordinates of each scale value. In the above scheme, in the case where there are multiple pointer-type instruments in one inspection image, since each instrument may have different distortions due to factors such as position, viewing angle, and occlusion, the above method is used to perform deformity correction for each pointer-type instrument, which can improve the correction accuracy and recognition accuracy of each pointer-type instrument.

[0013] In a second aspect, an embodiment of the present application further provides a device for identifying inspection images of pointer instruments, comprising: an acquisition module for acquiring the center coordinates of each scale value of a pointer instrument in a first inspection image, wherein the first inspection image is determined based on an image collected for the pointer instrument during an inspection process, and the first inspection image includes a pointer instrument; a correction point determination module for determining a preset number of center coordinates as correction points based on the center coordinates of each scale value, wherein the correction points are not on a straight line and are used to perform deformity correction on the first inspection image.

[0014] In the above scheme, correction points are selected in the center coordinates of the scale values ​​and it is ensured that the correction points are not on a straight line. The selection of correction points is an important step in the correction algorithm. The selected correction points have a better image deformity correction effect, thereby reducing errors and improving reading accuracy.

[0015] In the third aspect, a device. An embodiment of the present application provides a device, comprising: a processor, a memory and a bus, wherein the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method steps of the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising: the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method steps of the first aspect.

[0017] Other features and advantages of the present application will be described in the subsequent description, and in part will become apparent from the description, or will be understood by implementing the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 A schematic diagram of a flow chart of a method for identifying a pointer-type instrument inspection image provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the structure of a pointer-type instrument inspection image recognition device provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of the device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0023] It should be noted that all technical and scientific terms used in this document have the same meanings as those generally understood by technicians in the technical field to which this application belongs; the terms used in this document are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0024] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0025] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0026] Reference Figure 1 , Figure 1 A schematic flow chart of a method for identifying a pointer-type instrument inspection image provided in an embodiment of the present application, the method comprising the following steps:

[0027] Step S101: obtaining the center coordinates of each scale value of a pointer-type instrument in a first inspection image, wherein the first inspection image is determined according to an image collected for the pointer-type instrument during an inspection process, and the first inspection image includes a pointer-type instrument.

[0028] For the pointer instrument image acquired by the inspection robot, a key point detection algorithm is used to detect the image to obtain a first inspection image including only one pointer instrument. As an implementation method, the key point detection algorithm can select the YOLOv8 algorithm.

[0029] The embodiments of the present application do not specifically limit the specific implementation method of the device to obtain the above-mentioned center coordinates, and those skilled in the art can make appropriate adjustments according to actual conditions. For example, the center coordinates can be obtained by performing optical character recognition (OCR) on the pointer instrument area; or, the center coordinates can be obtained by performing image recognition on the first inspection image; or, the center coordinates can be received from an external device, etc.

[0030] Among them, OCR technology is a process of converting text information in an image into computer-editable text data. OCR technology enables machines to "read" and understand or print the text content in handwritten text documents, pictures, and scans, and convert them into electronic text formats that can be searched, edited, stored, and processed. As an implementation method, all numbers and characters in the first inspection image are identified based on the PaddleOCR recognition algorithm to obtain the characters in the first inspection image and their location information.

[0031] Since the character information in the pointer instrument panel in the real scene includes not only the instrument range and scale value, but also the manufacturer, instrument type and other characters, as another implementation method, after using OCR to recognize the character information, it is also possible to filter out only the characters containing the pointer range scale value and their corresponding coordinates based on prior knowledge.

[0032] Step S102: determining a preset number of center coordinates as correction points according to the center coordinates of each scale value, wherein each correction point is not on a straight line and is used to perform deformity correction on the first inspection image.

[0033] The center coordinate of the scale value is used to characterize the point position of the scale value. There are multiple scale values ​​on a dashboard, corresponding to multiple center coordinates. A preset number of points are selected from the multiple center coordinates as correction points, and all correction points are not on a straight line, which are used to correct the deformity of the first inspection image. It should be noted that the preset number is set according to the correction algorithm. For example, the preset number can be 3, 4, or 5. In some embodiments, the center coordinates with obvious grayscale or color changes can be selected as correction points; or, feature points in the center coordinates can be identified as correction points using image processing software or algorithms; or, correction points can be selected according to artificially set rules, etc.

[0034] In the above scheme, correction points are selected in the center coordinates of the scale values ​​and it is ensured that the correction points are not on a straight line. The selection of correction points is an important step in the correction algorithm. The selected correction points have a better image deformity correction effect, thereby reducing errors and improving reading accuracy.

[0035] In some embodiments, the preset number is 4, and step S102 correspondingly includes:

[0036] Step 1): Among multiple initial convex quadrilaterals surrounded by four central coordinates, multiple candidate convex quadrilaterals are determined according to the diagonal angles of the multiple initial convex quadrilaterals, wherein the candidate convex quadrilateral is the initial convex quadrilateral with the smallest absolute value of the difference between the diagonal angle and the right angle.

[0037] There are many different schemes for selecting four from all the center coordinates to form a convex quadrilateral, and one scheme corresponds to an initial convex quadrilateral. Then, the angle between the two diagonals of all the initial convex quadrilaterals is calculated, and multiple convex quadrilaterals are selected from the initial convex quadrilaterals according to the angle as candidate convex quadrilaterals. The specific selection method is: multiple initial convex quadrilaterals with the smallest absolute value of the difference between the diagonal angle and the right angle are determined as candidate convex quadrilaterals, that is, multiple initial convex quadrilaterals with the diagonal angle closest to the right angle are determined as candidate convex quadrilaterals.

[0038] Step 2): Determine a target convex quadrilateral from multiple candidate convex quadrilaterals, wherein the four center coordinates corresponding to the target convex quadrilateral are the correction points.

[0039] One of the multiple candidate convex quadrilaterals is determined as the target convex quadrilateral, and the four center coordinates corresponding to the target quadrilateral are the correction points. In some embodiments, any candidate convex quadrilateral can be determined as the target convex quadrilateral, or a candidate convex quadrilateral with the smallest difference between the diagonal angle and the right angle can be determined as the target convex quadrilateral. The method for determining the target convex quadrilateral is not specifically limited here.

[0040] In the above scheme, the closer the diagonal angle of the convex quadrilateral is to a right angle, the closer the shape of the convex quadrilateral is to a rectangle, which indirectly ensures that the four selected correction points are not on a straight line, and ultimately obtains a good correction effect.

[0041] In some embodiments, the step of determining a target convex quadrilateral from a plurality of candidate convex quadrilaterals comprises:

[0042] Step 1): Calculate the areas of multiple candidate convex quadrilaterals.

[0043] Step 2): Determine the candidate convex quadrilateral with the largest area as the target convex quadrilateral.

[0044] In the above scheme, one of multiple candidate quadrilaterals is selected according to the size of the area to determine the final correction point. The larger the area, the smaller the probability that the candidate convex quadrilateral is close to a flat rectangle, thereby further eliminating the situation where the four correction points are parallel or nearly parallel, greatly improving the correction effect.

[0045] In some embodiments, before the step of determining a plurality of candidate convex quadrilaterals among the plurality of initial convex quadrilaterals according to the diagonal angles of the plurality of initial convex quadrilaterals, the method further comprises:

[0046] Step 1): Convert the two diagonals of the initial convex quadrilateral into vectors, and calculate the trigonometric function value corresponding to the angle between the two vectors.

[0047] As an implementation method, the four vertices of the initial convex quadrilateral are denoted as A, B, C, and D, and the diagonals of the initial convex quadrilateral are denoted as AC and BD, and AC and BD are converted into vectors accordingly. and By calculating the vector and The cosine value cosθ can be used to obtain the angle between the two vectors.

[0048] Step 2): Determine the diagonal angle based on the trigonometric function value.

[0049] The formula for calculating cosθ is: When the absolute value of the cosine value is closer to 0, the difference between the diagonal angle of the initial convex quadrilateral and the right angle is smaller, that is, the diagonal angle of the initial convex quadrilateral is closer to a right angle, and thus the shape of the initial convex quadrilateral is closer to a rectangle.

[0050] Therefore, the implementation method corresponding to the step of determining multiple candidate convex quadrilaterals among multiple initial convex quadrilaterals according to the diagonal angles of multiple initial convex quadrilaterals is: after calculating the cosine values ​​cosθ of all the initial convex quadrilaterals, arrange them in order from small to large according to the absolute values ​​of the cosine values, and select multiple convex quadrilaterals with the smallest absolute values ​​of the cosine values ​​as candidate quadrilaterals. The multiple can be two, three, five, etc., and the number of the multiple is not specifically limited here.

[0051] In the above scheme, vectors and trigonometric functions are introduced to calculate the diagonal angle of a convex quadrilateral, which is simpler, more efficient, more practical and more operable.

[0052] In some embodiments, after step S102, the method further includes:

[0053] Step 1): deformity correction is performed on the first inspection image according to the correction point to obtain a corrected inspection image.

[0054] After the correction point is determined, the first inspection image is subjected to deformity correction. As an implementation method, the first inspection image is subjected to deformity correction by using image perspective transformation, and the perspective transformation formula is as follows:

[0055]

[0056] In the above formula, [u, v, w] is the coordinate in the first inspection image before transformation, [x′, y′, w′] is the three-dimensional space coordinate in the corrected inspection image after transformation, is the transformation matrix. Since the first inspection image is a two-dimensional plane, w here is 1, and the final transformed coordinates are:

[0057]

[0058] Step 2): For each pointer in the corrected inspection image, the pointer angle between the pointer and the horizontal direction is calculated according to the coordinates of the two end points of the pointer in the corrected inspection image.

[0059] The coordinates of the two end points of the pointer in the corrected inspection image are P1′(P x ′1,P y ′1), P2′(P x ′2,P y ′2), let the angle between the pointer and the horizontal direction be α, then the formula for calculating α is:

[0060]

[0061] Step 3): Determine the reading result of the pointer instrument according to the scale value of the pointer instrument in the first inspection image, the center coordinates of the scale value in the corrected inspection image, the pointer angle and the prior knowledge of the position angle of each scale value of the pointer instrument.

[0062] Since the angle between the position of each scale value on the pointer instrument and the center of the pointer instrument is fixed, and one angle corresponds to one scale value reading, the final reading result can be determined based on the angle-reading mapping relationship according to the prior knowledge of the scale value of the pointer instrument in the first inspection image, the center coordinates of the scale value in the corrected inspection image, the pointer angle, and the position angle of each scale value of the pointer instrument.

[0063] In the above scheme, the correction points selected by the above method are used to correct the deformity of the inspection image, which can well restore the front view of the pointer instrument, and the correction effect is good, thereby improving the accuracy of reading recognition.

[0064] In some embodiments, before step S101, the method further includes:

[0065] Step 1): Detect the area of ​​each scale value.

[0066] Step 2): Get the coordinates of the upper left vertex, upper right vertex, lower right vertex, and lower left vertex of the area where each scale value is located.

[0067] Step 3): Determine the center coordinates of the corresponding scale value according to the average value of the coordinates of the upper left vertex, the upper right vertex, the lower right vertex, and the lower left vertex.

[0068] As an implementation method, the point coordinates recognized by OCR are marked as [t, pt], where t is the specific number or character recognized, and pt is the position information of the number or character. For a scale value, use ((pt x1 ,pt y1 ),(pt x2 ,pt y2 ),(pt x3 ,pt y3 ),(pt x4 ,pt y4 )) represents the coordinates of the upper left vertex, upper right vertex, lower right vertex, and lower left vertex where the scale value t is located.

[0069] Thus, the center coordinates of each scale value (cpt x ,cpt y ) is as follows:

[0070]

[0071] Vertical axis cpt y The calculation formula is the same, thus obtaining the center coordinates of all scale values ​​of the pointer instrument.

[0072] In the above scheme, the center coordinates of the scale value are determined according to the coordinates of the four boundary points of the area where the scale value is located, so that more accurate center coordinates representing the position of the scale value can be obtained, which is conducive to improving the accuracy of the reading.

[0073] In some embodiments, before step S101, the method further includes:

[0074] Step 1): Acquire a second inspection image, where the second inspection image is an image collected for a pointer-type instrument during the inspection process, and the second inspection image includes a plurality of pointer-type instruments.

[0075] Step 2): Determine the detection area corresponding to each pointer instrument in the second inspection image.

[0076] Step 3): Determine an image corresponding to one of the multiple detection areas as a first inspection image.

[0077] Step 4): Perform optical character recognition on the first inspection image to obtain the center coordinates of each scale value.

[0078] For places with dense pointer instruments such as substations, the original image collected by the inspection robot may contain multiple pointer instruments, and the second inspection image is the original image. In the first case, when there are no interfering instruments in the second inspection image, each pointer instrument in the second inspection image needs to be identified and read one by one. In addition, since each instrument may have different distortions due to factors such as position, viewing angle, and occlusion, a pointer instrument can be used to determine a set of correction points to generate a corrected inspection image that is more suitable for the instrument.

[0079] In the second case, when an interfering instrument mistakenly enters the field of view in the second inspection image, it is necessary to further detect the interfering instrument and exclude it from the identification. As an implementation method, after the above step of determining the detection area corresponding to each pointer instrument in the second inspection image, a method step of detecting the interfering instrument is also included:

[0080] Step 1): According to the coordinates of the opposite vertices of the detection frame corresponding to the detection area, the midpoint of the line connecting the coordinates of the opposite vertices of each detection frame is calculated, and the midpoint of the line is determined as the center point of the corresponding pointer instrument.

[0081] Step 2): Determine an area in the second inspection image as a cluster center area, and the range of the cluster center area is smaller than the second inspection image.

[0082] Step 3): Initialize the minimum number of samples and determine the neighborhood radius.

[0083] Step 4): Calculate the number of center points contained in the neighborhood radius of each center point respectively. If the number is greater than or equal to the minimum number of samples, mark the center point as a core object.

[0084] Step 5): A cluster is formed from all center points that are reachable by the core object density and the core object, and the average values ​​of the horizontal and vertical coordinates of all center points included in the same cluster are calculated to obtain the cluster center point of the cluster.

[0085] Step 6): If the cluster center point is not within the range of the cluster center area, it is determined that the pointer instruments corresponding to all the center points of the cluster where the cluster center point is located are interference instruments.

[0086] Explanatory, in some embodiments, if object B is within the neighborhood radius of object A, and object A is a core object, then object B is density reachable from object A. Of course, in some embodiments, density reachable can also mean that if starting from a core object, another point can be reached through a series of directly density reachable points, then this point is said to be density reachable from the core object. Direct density reachable means that the distance between the two points is not greater than the neighborhood radius, and the starting point is a core object.

[0087] In some embodiments, center points that do not belong to any cluster are marked as noise.

[0088] In some embodiments, the above-mentioned step of determining an area in the second inspection image as the cluster center area includes: the range size of the cluster center area and the second inspection image satisfies the relationship: λ·W≤w≤(1-λ)W, λ·H≤h≤(1-λ)H, wherein W and H are the width and height of the second inspection image, respectively, w and h are the width and height of the cluster center area, respectively, λ is the proportional coefficient and 0<λ<0.5.

[0089] In some embodiments, the method for determining the neighborhood radius is:

[0090] Step 1): Calculate the minimum value d of the distance between each of the central points and the remaining central points, and sort all the minimum values ​​d in ascending order to obtain a set D.

[0091] Step 2): Calculate the average value d of the smallest N distance values ​​in set D average, and, calculating the average size s of all pointer instruments in the second inspection image.

[0092] Step 3): According to the d average and the neighborhood radius is calculated from s, the neighborhood radius being equal to d average and the sum of said s.

[0093] In some embodiments, the method for calculating the average size s of all pointer instruments in the second inspection image is: according to the formula Calculate the s, where n is the number of pointer instruments, (x 1i ,y 1i ) and (x 2i ,y 2i ) respectively represent the vertex coordinates of the i-th instrument.

[0094] In the above scheme, when there are multiple pointer instruments in an inspection image, each instrument may have different distortions due to factors such as position, viewing angle, and occlusion. Therefore, the above method is used to correct the deformity of each pointer instrument, which can improve the correction accuracy and recognition accuracy of each pointer instrument.

[0095] The present application also provides a device for identifying inspection images of pointer-type instruments. Figure 2 , the device comprises:

[0096] The acquisition module 201 is used to acquire the center coordinates of each scale value of the pointer instrument in the first inspection image, wherein the first inspection image is determined according to the image collected for the pointer instrument during the inspection process, and the first inspection image includes a pointer instrument.

[0097] The correction point determination module 202 is used to determine a preset number of center coordinates as correction points according to the center coordinates of each scale value, wherein the correction points are not on a straight line, and are used to perform deformity correction on the first inspection image.

[0098] It should be understood that the device corresponds to the above-mentioned pointer instrument inspection image recognition method embodiment, and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0099] In the above scheme, correction points are selected in the center coordinates of the scale values ​​and it is ensured that the correction points are not on a straight line. The selection of correction points is an important step in the correction algorithm. The selected correction points have a better image deformity correction effect, thereby reducing errors and improving reading accuracy.

[0100] Figure 3 The schematic diagram of the device structure provided in the embodiment of the present application is as follows: Figure 3 As shown, the device includes a processor 301, a memory 302 and a bus 303; wherein the processor 301 and the memory 302 communicate with each other through the bus 303. The processor 301 is used to call the program instructions in the memory 302 to execute the methods provided by the above-mentioned method embodiments. In some embodiments, the device can be a robot, etc., specifically, it can be a hanging rail, a drone, a legged robot and other equipment, or it can be other mobile inspection devices.

[0101] The processor 301 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0102] The memory 302 may include but is not limited to random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.

[0103] An embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method steps described in any one of the above embodiments and the combination of the embodiments.

[0104] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.

[0105] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the methods provided by the above-mentioned method embodiments.

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

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

[0108] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

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

Claims

1. A method for identifying inspection images of pointer-type instruments, characterized in that: include: Obtaining the center coordinates of each scale value of a pointer-type instrument in a first inspection image, wherein the first inspection image is determined according to an image collected for the pointer-type instrument during an inspection process, and the first inspection image includes a pointer-type instrument; A preset number of center coordinates are determined as correction points according to the center coordinates of each scale value, wherein the correction points are not on a straight line and are used to perform deformity correction on the first inspection image.

2. The method according to claim 1, characterized in that: The preset number is 4, and determining the preset number of center coordinates as correction points according to the center coordinates of each scale value includes: Among the multiple initial convex quadrilaterals surrounded by four central coordinates, multiple candidate convex quadrilaterals are determined according to the diagonal angles of the multiple initial convex quadrilaterals, wherein the candidate convex quadrilateral is the initial convex quadrilateral with the smallest absolute value of the difference between the diagonal angle and the right angle; A target convex quadrilateral is determined from the multiple candidate convex quadrilaterals, wherein four center coordinates corresponding to the target convex quadrilateral are the correction points.

3. The method according to claim 2, characterized in that The step of determining a target convex quadrilateral from the plurality of candidate convex quadrilaterals comprises: Calculating the areas of the plurality of candidate convex quadrilaterals; Determine the candidate convex quadrilateral with the largest area as the target convex quadrilateral.

4. The method according to claim 2, characterized in that: Before determining a plurality of candidate convex quadrilaterals among the plurality of initial convex quadrilaterals according to the diagonal angles of the plurality of initial convex quadrilaterals, the method further comprises: Convert the two diagonals of the initial convex quadrilateral into vectors, and calculate the trigonometric function value corresponding to the angle between the two vectors; The diagonal angle is determined according to the trigonometric function value.

5. The method according to claim 1, characterized in that After determining a preset number of center coordinates as correction points according to the center coordinates of each scale value, the method further includes: Performing deformity correction on the first inspection image according to the correction point to obtain a corrected inspection image; For each pointer in the corrected inspection image, calculate the pointer angle between the pointer and the horizontal direction according to the coordinates of the two end points of the pointer in the corrected inspection image; The reading result of the pointer instrument is determined according to the scale value of the pointer instrument in the first inspection image, the central coordinates of the scale value in the corrected inspection image, the pointer angle and the prior knowledge of the position angle of each scale value of the pointer instrument.

6. The method according to claim 1, characterized in that Before obtaining the center coordinates of each scale value of the pointer-type instrument in the first inspection image, the method further includes: Detect the area of ​​each scale value; Get the coordinates of the upper left vertex, upper right vertex, lower right vertex, and lower left vertex of the area where each scale value is located; The average value of the coordinates of the upper left vertex, the upper right vertex, the lower right vertex, and the lower left vertex is determined as the center coordinate of the corresponding scale value.

7. The method according to any one of claims 1 to 6, characterized in that: Before obtaining the center coordinates of each scale value of the pointer-type instrument in the first inspection image, the method further includes: Acquire a second inspection image, where the second inspection image is an image collected for the pointer-type instrument during the inspection process, and the second inspection image includes a plurality of pointer-type instruments; Determine a detection area corresponding to each pointer instrument in the second inspection image; Determine an image corresponding to one of the multiple detection areas as the first inspection image; Optical character recognition is performed on the first inspection image to obtain the center coordinates of each scale value.

8. A device for identifying inspection images of pointer-type instruments, characterized in that: include: An acquisition module, used for acquiring the center coordinates of each scale value of a pointer-type instrument in a first inspection image, wherein the first inspection image is determined according to an image collected for the pointer-type instrument during an inspection process, and the first inspection image includes a pointer-type instrument; A correction point determination module is used to determine a preset number of center coordinates as correction points according to the center coordinates of each scale value, wherein the correction points are not on a straight line, and is used to perform deformity correction on the first inspection image.

9. A device comprising: A processor, a memory and a bus, wherein the processor and the memory communicate with each other via the bus; the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A distortion image correction method and device based on corner detection

    CN109409366A

  • Reading identification method for pointer type instrument

    CN118351521A

  • Method and system for monitoring GIS instrument sulfur hexafluoride data based on edge computing

    US11790516B1