Pointer type instrument reading automatic identification method, device and equipment and storage medium

By adopting a combination method of key point detection model and instrument classification model in the inspection robot, the problem of low automation of pointer instrument recognition and susceptibility to light is solved, and higher robustness and automation recognition capabilities are achieved.

CN119649148APending Publication Date: 2025-03-18中科开创(广州)智能科技发展有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411827764.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing inspection robots have low automation in recognition of pointer instruments and are susceptible to light conditions to cause misidentification.

Method used

The key point identification method is used to identify the pointer instrument images, including the pointer rotation center point, pointer end point, range starting point and range end point. By calculating the coordinate vectors of these key points, the rotation angle and angle proportion of the pointer are identified, and the range is automatically identified in combination with the instrument classification model, and the reading of the pointer is finally calculated.

Benefits of technology

It significantly reduces the workload of data annotation, improves the robustness and adaptability of the system, can automatically identify multiple types of instruments, and improves the degree of automation and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649148A_ABST
    Figure CN119649148A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent identification of instruments and meters, in particular to an automatic identification method, device and equipment for reading of a pointer type instrument and a storage medium, and the method comprises the steps: carrying out the key point identification of a pointer type instrument image based on a key point detection model; wherein the key points comprise a pointer rotation center point, a pointer tail end point, a range starting point and a range ending point; calculating a coordinate vector of each key point by taking the rotation center point of the pointer as a starting point; based on the coordinate vector, according to the rotation direction of the pointer, identifying the rotation angle of the current pointer and the corresponding angle proportion; identifying a measuring range corresponding to the pointer type instrument image based on an instrument classification model; and calculating the dial reading corresponding to the current pointer based on the measuring range and the angle proportion. According to the method, the workload of data annotation of the inspection robot in the instrument panel reading process can be remarkably reduced, and the influence of illumination condition changes on the recognition accuracy is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent identification of instruments and meters, and in particular to a method, device, equipment and storage medium for automatic identification of pointer-type instrument readings. Background Art

[0002] In industrial environments such as power distribution rooms, inspection robots need to automatically identify pointer instruments to understand and grasp the working status of the equipment in real time. Traditional reading recognition methods usually rely on image segmentation algorithms. First, the scale lines and pointer areas of the instrument are separated from the background, and then a series of image processing steps (such as ring dial expansion, binarization, etc.) are used to determine the pointer position and finally calculate the instrument reading. However, this method has several significant problems: first, before using the image segmentation algorithm, a large number of training images need to be carefully manually annotated, especially each scale line and pointer outline need to be described in detail, which is a tedious and time-consuming process; second, since image processing operations are sensitive to lighting conditions, changes in ambient light can easily lead to misidentification, thereby affecting the robustness of the system; finally, the instrument range in the traditional method is manually preset, lacks flexibility, cannot adapt to the needs of various types of instruments, and has a low degree of automation.

[0003] Therefore, the existing inspection robot's recognition method for pointer instruments has a low degree of automation and is easily affected by lighting conditions, resulting in misrecognition, which is an urgent problem to be solved. Summary of the invention

[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for automatic recognition of pointer instrument readings, aiming to solve the technical problems that the existing inspection robot's recognition method for pointer instruments has a low degree of automation and is easily affected by lighting conditions and causes misrecognition.

[0005] In order to achieve the above-mentioned invention object, the present application proposes a method for automatically identifying the reading of a pointer-type instrument, the method comprising:

[0006] Based on the key point detection model, key points of the pointer instrument image are identified; wherein the key points include the pointer rotation center point, the pointer end point, the range start point and the range end point;

[0007] Calculate the coordinate vector of each key point with the pointer rotation center point as the starting point;

[0008] Based on the coordinate vector, identify the current pointer rotation angle and the corresponding angle ratio according to the pointer rotation direction;

[0009] Identify the range corresponding to the pointer instrument image based on the instrument classification model;

[0010] Based on the measuring range and the angle ratio, the dial reading corresponding to the current pointer is calculated.

[0011] Furthermore, before the step of performing key point recognition on the pointer instrument image based on the key point detection model, the following steps are included:

[0012] Annotating a preset number of the pointer-type instrument images with data on key points to form training data;

[0013] Data training is performed based on the training data to form the key point detection model.

[0014] Furthermore, the step of calculating the coordinate vectors of each key point starting from the pointer rotation center point includes:

[0015] Identify the coordinate values ​​of the pointer rotation center point, the pointer end point, the range starting point and the range end point;

[0016] Taking the pointer rotation center point as the starting point, the coordinate vector formed by the coordinate value of the starting point to the coordinate value of the pointer end point, the coordinate value of the range starting point and the coordinate value of the range end point is calculated.

[0017] Furthermore, the step of identifying the current pointer rotation angle and the corresponding angle ratio based on the coordinate vector and the pointer rotation direction includes:

[0018] Calculate the angle between the coordinate vector corresponding to the starting point of the range and the coordinate vector corresponding to the end point of the pointer, that is, the rotation angle A of the current pointer in the clockwise direction;

[0019] Calculate the angle between the coordinate vector corresponding to the starting point of the measuring range and the coordinate vector corresponding to the end point of the measuring range, that is, the total rotation angle B of the dial in the clockwise direction;

[0020] Based on the formula rate=A / B, the angle ratio of the current pointer is calculated.

[0021] Furthermore, before the step of identifying the range corresponding to the pointer-type instrument image based on the instrument classification model, the method further comprises:

[0022] The images of pointer instruments with different measuring ranges are divided into different types to form training data; each type contains the same measuring range;

[0023] Image classification training is performed based on the training data to form the instrument classification model.

[0024] Furthermore, the step of identifying the range corresponding to the pointer instrument image based on the instrument classification model includes:

[0025] Preprocessing the input pointer instrument image;

[0026] The preprocessed pointer instrument image is sent to the trained instrument classification model, and the probability distribution of each category is output through forward propagation calculation;

[0027] The category with the highest probability is taken as the final classification result;

[0028] According to the classification result, the type and range corresponding to the pointer instrument image are determined.

[0029] Furthermore, the step of calculating the dial reading corresponding to the current pointer based on the measuring range and the angle ratio includes:

[0030] Use the formula value = rate × LC to calculate the dial reading corresponding to the current pointer, where rate is the angle proportion of the current pointer within the range; LC is the range value.

[0031] The second aspect of the present application provides a pointer-type instrument reading automatic recognition device, comprising:

[0032] A recognition module, for performing key point recognition on a pointer-type instrument image based on a key point detection model; wherein the key points include a pointer rotation center point, a pointer end point, a range start point, and a range end point;

[0033] The first calculation module is used to calculate the coordinate vector of each key point with the pointer rotation center point as the starting point;

[0034] The second calculation module is used to identify the current rotation angle of the pointer and the corresponding angle ratio according to the rotation direction of the pointer based on the coordinate vector;

[0035] A range recognition module, used to recognize the range corresponding to the pointer instrument image based on the instrument classification model;

[0036] The reading calculation module is used to calculate the dial reading corresponding to the current pointer based on the range and the angle ratio.

[0037] A third aspect of the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0038] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any one of the above methods when executed by a processor.

[0039] Beneficial effects:

[0040] The key point detection algorithm is used to automatically detect the four key point positions of the instrument's pointer rotation center point, pointer end point, range start point, and range end point. Then, through the corresponding angle calculation, the angle proportion of the pointer position within the range can be obtained. Due to the use of the key point detection algorithm, when annotating images, only four key point information needs to be annotated, which can significantly reduce the workload of data annotation. After detecting the key point position, there is no need to perform image processing operations. It has good adaptability to lighting changes and other conditions, and its robustness is greatly enhanced. At the same time, the image classification algorithm is used to automatically identify the corresponding instrument range without manual preset. It has a high degree of intelligence and can identify multiple types of instruments at the same time, with good flexibility and adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a flow chart of a method for automatically identifying pointer-type instrument readings according to an embodiment of the present application;

[0042] Figure 2 This is a schematic block diagram of the structure of a pointer-type instrument reading automatic recognition device according to an embodiment of the present application;

[0043] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application;

[0044] Figure 4 This is a schematic diagram of key points of a pointer instrument according to an embodiment of the present application.

[0045] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "a", "an", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.

[0048] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0049] Reference Figure 1 The embodiment of the present invention provides a method for automatically identifying the reading of a pointer instrument, comprising steps S1-S5, specifically:

[0050] S1. Recognize key points of a pointer instrument image based on a key point detection model, wherein the key points include a pointer rotation center point, a pointer end point, a range start point, and a range end point;

[0051] S2, calculate the coordinate vector of each key point with the pointer rotation center point as the starting point;

[0052] S3. Based on the coordinate vector and according to the direction of the pointer rotation, identify the current pointer rotation angle and the corresponding angle ratio;

[0053] S4, identifying the range corresponding to the pointer instrument image based on the instrument classification model;

[0054] S5. Based on the measuring range and the angle ratio, calculate the dial reading corresponding to the current pointer.

[0055] In step S1, a trained key point detection model is first used to process the input pointer instrument image. The model is trained by deep learning technology and can automatically identify four key points in the image: the pointer rotation center point, the pointer end point, the range start point and the range end point. The position information of these key points is crucial for subsequent calculations. Compared with traditional methods, this method greatly reduces the workload of manual annotation because only these four key points need to be annotated instead of each scale line. In addition, the key point detection algorithm is very robust and can accurately identify key points even when the lighting conditions change, thereby improving the reliability and adaptability of the entire system.

[0056] Reference Figure 4 , in step S2, the coordinate vector of each key point relative to the center point of pointer rotation is calculated. (Wherein, the center point of pointer rotation is set to O, the end point of pointer is set to P, the starting point of the range is set to S, and the end point of the range is set to E) Specifically, the center point of pointer rotation is set to the origin (x0, y0), and then the distances and directions from the other three key points, the end point of the pointer, the starting point of the range, and the end point of the range to the center point of pointer rotation are calculated to obtain their respective corresponding coordinate vectors OP, OS, and OE. The purpose of this is to facilitate subsequent angle calculations. By converting the problem into a vector operation in a two-dimensional plane, the calculation process is simplified, and the position of the pointer and its angular relationship relative to the range can be more intuitively represented. This step is a bridge between the key point position and the angle calculation, ensuring the accuracy of reading recognition.

[0057] In step S3, the coordinate vector obtained in the previous step is used to perform angle calculation. First, determine the clockwise rotation angle A between vector OS and vector OP, and the rotation angle B between vector OS and vector OE in the same direction. These two angles can be obtained by the inner product and outer product between the vectors. Once A and B are obtained, the angle ratio rate = A / B of the current position of the pointer within the entire range can be calculated. This method based on geometric principles is not only simple and efficient in calculation, but also avoids the error accumulation problem caused by directly processing complex image data, further improving the recognition accuracy. At the same time, because mathematical formulas are used instead of complex image processing algorithms, the system is less sensitive to environmental changes and has better stability and generalization capabilities.

[0058] In step S4, another trained deep learning model, the instrument classification model, is used to automatically identify the specific type and range of the instrument in the input image. This model has been fully trained in advance with a large number of instrument images of different types and ranges, and can accurately distinguish various types of instruments. When a new instrument image is input, it will output a probability distribution, indicating the probability that the image belongs to each category; the category with the highest probability is selected as the final result, and the actual range LC of the instrument in the image is determined accordingly. Compared with the traditional manual preset range method, this method can flexibly cope with a variety of different specifications of instruments, and can realize automatic recognition of the range without manual intervention, which greatly improves the intelligence level of the system.

[0059] In step S5, the actual reading value is obtained by combining the previously calculated angle ratio rate and the known instrument range LC through a simple multiplication operation value = rate * LC. This is a step that directly applies mathematical formulas, with clear logic and easy implementation. In this way, we can quickly and accurately obtain the current reading of the pointer instrument, which can show good performance both in laboratory and industrial field environments. Overall, this method not only improves work efficiency, but also enhances the degree of automation of the system, enabling it to operate continuously and stably without supervision, meeting the needs of modern intelligent inspection.

[0060] Through steps S1-S5, the embodiment of the present invention provides an efficient and robust method for automatic identification of pointer instrument readings. The method uses a key point detection model and an image classification model to reduce the workload of manual annotation, improve the adaptability to lighting changes, and realize automatic identification of various types of instruments. This method not only improves the degree of automation, but also enhances the flexibility and reliability of the system, and is suitable for intelligent inspection and monitoring needs in various industrial environments.

[0061] In one embodiment, before the step of performing key point recognition on the pointer instrument image based on the key point detection model, the following steps are included:

[0062] S10, annotating a preset number of pointer-type instrument images with data on key points to form training data;

[0063] S11. Performing data training based on the training data to form the key point detection model.

[0064] In this embodiment, we first need to collect a certain number of pointer instrument images as training samples. These images should cover instrument images of different types, different ranges, and different lighting conditions to ensure that the model has good generalization ability. Then, based on professional image annotation tools or software, we accurately annotate the four key points in each image - the pointer rotation center point, the pointer end point, the range start point, and the range end point. Figure 4 , let the pointer rotation center point be O, the pointer end point be P, the range start point be S, and the range end point be E. When annotating, it is necessary not only to mark the position coordinates of each key point, but also to record the attribute information corresponding to the point, such as the type of point. After all images are annotated, a structured training dataset is formed, which contains the image and its corresponding key point location information. Compared with the traditional image segmentation method, this method only needs to annotate 4 key points, which greatly reduces the workload of manual annotation. Once enough annotated data is obtained, the key point detection model can be trained. Select a suitable deep learning framework (such as TensorFlow, PyTorch, etc.), define the model architecture, and use the annotated dataset for supervised learning. During the training process, the model will continuously adjust its internal parameters to minimize the difference between the predicted key point position and the actual annotated position. In order to prevent overfitting, regularization techniques, data augmentation strategies, and appropriate validation sets may also be needed to monitor the model performance. After multiple iterations of optimization, when the performance of the model on the validation set reaches a satisfactory level, the model training can be considered complete and can be used for actual key point detection tasks. Deep learning algorithms can learn complex feature representations, making key point positioning more accurate. Once the model is trained, it can process new image data very quickly to meet the needs of real-time applications.

[0065] In one embodiment, the step of calculating the coordinate vectors of each key point starting from the pointer rotation center point includes:

[0066] S20, identifying the coordinate values ​​of the pointer rotation center point, the pointer end point, the range starting point and the range end point;

[0067] S21, taking the pointer rotation center point as the starting point, calculating the coordinate vector formed by the coordinate value of the starting point to the coordinate value of the pointer end point, the coordinate value of the range starting point and the coordinate value of the range end point.

[0068] In this embodiment, the key point detection model trained in the previous step (S1) is first used to process the input pointer instrument image, and the position information of the four key points is extracted from it. Specifically, the model will output the two-dimensional coordinate (x, y) value of each key point in the image. The four key points are: the coordinates of the pointer rotation center point are (x0, y0), the coordinates of the pointer end point are (x1, y1), the coordinates of the range starting point are (x2, y2), and the coordinates of the range end point are (x3, y3). Accurately obtaining the coordinate values ​​of these key points is the basis for all subsequent calculations. They not only define the position of the pointer, but also define the measurement range of the entire instrument. At this time, the corresponding vector calculation uses the coordinates corresponding to the pointer rotation center point as the starting point to calculate the coordinate vectors corresponding to other key points: vector 0P (coordinate vector corresponding to the pointer end point): (x1-x0, y1-y0); vector 0S (coordinate vector corresponding to the range starting point): (x2-x0, y2-y0); vector 0E (coordinate vector corresponding to the range end point): (x3-x0, y3-y0). The key point positions are converted into vector form, so that the angle can be calculated using vector operations. This method simplifies the complexity of the problem. Vector operations are simpler and more efficient than directly processing image pixels. The position relationship of the pointer relative to the range can be intuitively seen through the vector, which helps to quickly understand the status of the instrument. At the same time, the calculation based on geometric relationships is not affected by the image background or lighting conditions, ensuring the consistency and reliability of the results.

[0069] In one embodiment, the step of identifying the current pointer rotation angle and the corresponding angle ratio based on the coordinate vector and the pointer rotation direction includes:

[0070] S30, calculating the angle between the coordinate vector corresponding to the starting point of the measuring range and the coordinate vector corresponding to the end point of the pointer, that is, the rotation angle A of the current pointer in the clockwise direction;

[0071] S31, calculating the angle between the coordinate vector corresponding to the starting point of the measuring range and the coordinate vector corresponding to the end point of the measuring range, that is, the total rotation angle B of the dial in the clockwise direction;

[0072] S32. Based on the formula rate=A / B, calculate the angle ratio of the current pointer.

[0073] In this embodiment, the coordinate vectors OS, OP and OE of the pointer rotation center point, the pointer end point, the range start point and the range end point have been obtained. In order to calculate the angle A of the pointer from the range start point S to the current position of the pointer end point, the angle formula between the vectors can be used: Based on the known coordinate vector, the current pointer rotation angle is calculated in a clockwise direction. Usually, the pointer rotates in a clockwise direction. If there are special cases, it is calculated according to the actual rotation direction of the pointer. Figure 4 , at this time, you need to calculate the angle A first (assuming that the angle from vector 0S to vector 0P through clockwise rotation is A, that is, the rotation angle between the current pointer and the starting point of the range), the calculation process is as follows:

[0074] Dot product: dotA=(x2-x0)*(x1-x0)+(y2-y0)*(y1-y0);

[0075] Determinant: detA = (x2-x0)*(y1-y0)-(y2-y0)*(x1-x0);

[0076] Angle: ThetaA=arctan(detA / dotA);

[0077] When ThetaA>0, A=ThetaA;

[0078] When ThetaA<0, A=2*PI+ThetaA, where PI is the circumference of a circle.

[0079] Then calculate the angle B (assuming that the angle from vector 0S to vector 0E through clockwise rotation is B, that is, the rotation angle from the starting point of the range to the end point of the range), the calculation process is as follows:

[0080] Dot product: dotB=(x2-x0)*(x3-x0)+(y2-y0)*(y3-y0);

[0081] Determinant: detB = (x2-x0)*(y3-y0)-(y2-y0)*(x3-x0);

[0082] Angle: ThetaB = arctan(detB / dotB);

[0083] When ThetaB>0, B=ThetaB;

[0084] When ThetaB<0, B=2*PI+ThetaB, where PI is pi. The total rotation angle B represents the maximum range of the instrument, and it is a benchmark for standardizing the actual position of the pointer. By calculating B, the specific position of the pointer can be converted into a ratio relative to the entire range, thereby obtaining the final reading value. That is, after A and B are calculated, the angle ratio of the pointer position can be further obtained by the following formula: rate=A / B; through the precise angle calculation in this embodiment, the position of the pointer on the dial can be accurately determined, thereby improving the accuracy of the reading, accurately calculating the ratio of the pointer relative to the range, and providing accurate angle information for the final reading calculation. After detecting the position of the key point, the coordinates and vectors are directly calculated to obtain the angle ratio of the pointer position within the range, without the need for image processing operations, and it has good adaptability to conditions such as changes in illumination, and its robustness is greatly enhanced. This method is suitable for various types of pointer instruments, regardless of their range size or scale distribution, and can accurately reflect the position of the pointer.

[0085] In one embodiment, before the step of identifying the range corresponding to the pointer-type instrument image based on the instrument classification model, the following steps are included:

[0086] S40, dividing the pointer-type instrument images of different measuring ranges into different types to form training data; wherein each type contains the same measuring range;

[0087] S41. Perform image classification training based on the training data to form the instrument classification model.

[0088] In this embodiment, first, a large number of pointer instrument images of different ranges need to be collected as training samples. These images should cover as many different types and specifications of instruments as possible to ensure that the model has good generalization ability. Next, these images are annotated and divided into different categories according to the range. For example, all instruments with a range of 0-100 can be classified into one category, and instruments with a range of 0-200 can be classified into another category, and so on. Each category should contain a sufficient number of sample images of the same range so that the model can learn the unique characteristics of each range of instruments. By classifying instrument images of different ranges, clear learning goals can be provided for subsequent deep learning models. This labeled data set is the basis for training image classification models. It helps the model understand the differences between different types of instruments, so that the range of unknown instruments can be accurately identified in practical applications. Once the training data set is prepared, the instrument classification model can be trained. You can choose a suitable deep learning framework (such as TensorFlow, PyTorch, etc.) and define a neural network architecture suitable for image classification tasks. Commonly used network structures include convolutional neural networks (CNN), residual networks (ResNet), etc. Next, use the prepared training data set to train the model, and by continuously adjusting the model parameters, minimize the gap between the predicted category and the actual category. In order to prevent overfitting, it may also be necessary to adopt regularization techniques (such as Dropout), data enhancement strategies (such as rotation, scaling, etc.) and set a validation set to monitor model performance. After multiple iterations of optimization, when the performance of the model on the validation set reaches a satisfactory level, the model training can be considered complete and can be used for actual instrument range recognition tasks. This embodiment provides strong support for the subsequent automatic recognition of pointer instrument readings. This method not only improves work efficiency, but also enhances the intelligence of the system, enabling it to continue to operate stably and unattended, meeting the needs of modern intelligent inspections.

[0089] In one embodiment, the step of identifying the range corresponding to the pointer instrument image based on the instrument classification model includes:

[0090] S50, preprocessing the input pointer instrument image;

[0091] S51, sending the preprocessed pointer instrument image to the trained instrument classification model, and outputting the probability distribution of each category through forward propagation calculation;

[0092] S52, taking the category with the highest probability as the final classification result;

[0093] S53: Determine the type and range corresponding to the pointer instrument image according to the classification result.

[0094] In this embodiment, firstly, preprocessing ensures that the input image meets the requirements of the model and can maintain the key features of the image to the greatest extent. This can improve the performance and stability of the model. After the preprocessing is completed, the image is sent to the trained instrument classification model. The model will extract features and classify the image through a series of network structures such as convolutional layers, pooling layers, and fully connected layers. During the forward propagation process, each layer will calculate and pass information to the next layer based on its weight parameters until the last layer outputs a vector containing the probabilities of each category. This vector represents the probability of the input image belonging to each category. Through forward propagation, the model can extract useful features from the input image and judge the category to which the image belongs based on this. This process is automated and does not require manual intervention. After obtaining the probability distribution of all categories, the category with the highest probability is selected as the final classification result. This means that the model believes that the input image is most likely to belong to this category. According to the determined classification result, the corresponding instrument type and range are found. Each category is pre-associated with a specific range, so once the category is determined, the corresponding range can be immediately known. For example, if the model classifies an image as "0-100", the meter scale for that image would be 0-100.

[0095] In one embodiment, the step of calculating the dial reading corresponding to the current pointer based on the range and the angle ratio includes:

[0096] S60. Use the formula value=rate×LC to calculate the dial reading corresponding to the current pointer, where rate is the angle proportion of the current pointer within the range; LC is the range value.

[0097] In this embodiment, rate is the angle ratio of the pointer within the range, which is obtained by calculating the ratio between the angle A of the pointer relative to the starting point of the range and the total rotation angle B. LC is the specific range value of the pointer instrument identified by the instrument classification model. Use the formula value = rate × LC to calculate the dial reading corresponding to the current pointer. Through simple multiplication operations, the reading can be calculated quickly and accurately, and the angle ratio can be converted into the actual reading value to provide the final measurement result. Regardless of the specific type or range of the instrument, as long as the angle ratio and range value can be correctly identified, this formula can be applied to obtain the correct reading.

[0098] Reference Figure 2 , is a needle meter reading automatic recognition device in one embodiment of the present application, the device comprises:

[0099] The recognition module 100 is used to recognize key points of the pointer instrument image based on the key point detection model; wherein the key points include the pointer rotation center point, the pointer end point, the range start point and the range end point;

[0100] The first calculation module 200 is used to calculate the coordinate vector of each key point with the pointer rotation center point as the starting point;

[0101] The second calculation module 300 is used to identify the current rotation angle of the pointer and the corresponding angle ratio according to the rotation direction of the pointer based on the coordinate vector;

[0102] A range recognition module 400, for recognizing the range corresponding to the pointer-type instrument image based on the instrument classification model;

[0103] The reading calculation module 500 is used to calculate the dial reading corresponding to the current pointer based on the range and the angle ratio.

[0104] In one embodiment, the above device further includes a first model training module, including:

[0105] A labeling unit, used for labeling a preset number of pointer-type instrument images with key point data to form training data;

[0106] The first training unit is used to perform data training based on the training data to form the key point detection model.

[0107] In one embodiment, the first calculation module 200 includes:

[0108] A first identification unit, used to identify the coordinate values ​​of the pointer rotation center point, the pointer end point, the range starting point and the range end point;

[0109] The vector calculation unit is used to calculate the coordinate vector formed between the coordinate value of the starting point to the coordinate value of the pointer end point, the coordinate value of the starting point of the range and the coordinate value of the end point of the range, taking the pointer rotation center point as the starting point.

[0110] In one embodiment, the second calculation module 300 includes:

[0111] A first rotation angle calculation unit, used to calculate the angle between the coordinate vector corresponding to the starting point of the range and the coordinate vector corresponding to the end point of the pointer, that is, the rotation angle A of the current pointer in the clockwise direction;

[0112] A second rotation angle calculation unit is used to calculate the angle between the coordinate vector corresponding to the starting point of the measuring range and the coordinate vector corresponding to the end point of the measuring range, that is, the total rotation angle B of the dial in the clockwise direction;

[0113] Proportion calculation unit, used for formula-based Calculate the current pointer's angle ratio.

[0114] In one embodiment, the apparatus further includes a second model training module, including:

[0115] A division unit is used to divide the pointer instrument images of different measuring ranges into different types to form training data; each type contains the same measuring range;

[0116] The second training unit is used to perform image classification training based on the training data to form the instrument classification model.

[0117] In one embodiment, the range identification module 400 includes:

[0118] A preprocessing unit, used for preprocessing the input pointer instrument image;

[0119] The probability output unit is used to send the pre-processed pointer instrument image to the trained instrument classification model, and output the probability distribution of each category through forward propagation calculation;

[0120] The final classification unit is used to select the category with the highest probability as the final classification result;

[0121] According to the classification result, the type and range corresponding to the pointer instrument image are determined.

[0122] In one embodiment, the reading calculation module 500 includes:

[0123] The formula calculation unit is used to calculate the dial reading corresponding to the current pointer using the formula value=rate×LC, where rate is the angle proportion of the current pointer within the range; LC is the range value.

[0124] Reference Figure 3 In the embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store usage data in the process of the pointer meter reading automatic identification method. The network interface of the computer device is used to communicate with an external terminal through a network connection. Furthermore, the above-mentioned computer device can also be provided with an input device and a display screen. When the above-mentioned computer program is executed by a processor, a method for automatically identifying the readings of pointer instruments is implemented, including the following steps: performing key point identification on a pointer instrument image based on a key point detection model; wherein the key points include a pointer rotation center point, a pointer end point, a range start point, and a range end point; calculating the coordinate vectors of each key point with the pointer rotation center point as the starting point; based on the coordinate vector, according to the pointer rotation direction, identifying the current pointer rotation angle and the corresponding angle ratio; identifying the range corresponding to the pointer instrument image based on the instrument classification model; and calculating the dial reading corresponding to the current pointer based on the range and the angle ratio.

[0125] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0126] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for automatically identifying the reading of a pointer-type instrument is implemented, including the following steps: based on a key point detection model, key point recognition is performed on a pointer-type instrument image; wherein the key points include a pointer rotation center point, a pointer end point, a range start point, and a range end point; the coordinate vectors of each key point are calculated with the pointer rotation center point as the starting point; based on the coordinate vector, according to the pointer rotation direction, the rotation angle of the current pointer and the corresponding angle ratio are identified; based on the instrument classification model, the range corresponding to the pointer-type instrument image is identified; based on the range and the angle ratio, the dial reading corresponding to the current pointer is calculated. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0127] Those of ordinary skill 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SyTchl iTk) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0128] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.

[0129] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for automatically identifying the reading of a pointer instrument, characterized in that: The method comprises: Based on the key point detection model, key points of the pointer instrument image are identified; wherein the key points include the pointer rotation center point, the pointer end point, the range start point and the range end point; Calculate the coordinate vector of each key point with the pointer rotation center point as the starting point; Based on the coordinate vector, identify the current pointer rotation angle and the corresponding angle ratio according to the pointer rotation direction; Identify the range corresponding to the pointer instrument image based on the instrument classification model; Based on the measuring range and the angle ratio, the dial reading corresponding to the current pointer is calculated.

2. The method for automatically identifying the reading of a pointer meter according to claim 1, characterized in that: Before the step of performing key point recognition on the pointer instrument image based on the key point detection model, the method includes: Annotating a preset number of the pointer-type instrument images with data on key points to form training data; Data training is performed based on the training data to form the key point detection model.

3. The method for automatically identifying the reading of a pointer meter according to claim 1, characterized in that: The step of calculating the coordinate vectors of each key point starting from the pointer rotation center point includes: Identify the coordinate values ​​of the pointer rotation center point, the pointer end point, the range starting point and the range end point; Taking the pointer rotation center point as the starting point, the coordinate vector formed by the coordinate value of the starting point to the coordinate value of the pointer end point, the coordinate value of the range starting point and the coordinate value of the range end point is calculated.

4. The method for automatically identifying the reading of a pointer meter according to claim 1, characterized in that: The step of identifying the current pointer rotation angle and the corresponding angle ratio based on the coordinate vector and the pointer rotation direction includes: Calculate the angle between the coordinate vector corresponding to the starting point of the range and the coordinate vector corresponding to the end point of the pointer, that is, the rotation angle A of the current pointer in the clockwise direction; Calculate the angle between the coordinate vector corresponding to the starting point of the measuring range and the coordinate vector corresponding to the end point of the measuring range, that is, the total rotation angle B of the dial in the clockwise direction; Based on the formula Calculate the current pointer's angle ratio.

5. The method for automatically identifying the reading of a pointer meter according to claim 1, characterized in that: Before the step of identifying the measuring range corresponding to the pointer-type instrument image based on the instrument classification model, the method includes: The images of pointer instruments with different measuring ranges are divided into different types to form training data; each type contains the same measuring range; Image classification training is performed based on the training data to form the instrument classification model.

6. The method for automatically identifying pointer meter readings according to claim 1, characterized in that: The step of identifying the range corresponding to the pointer-type instrument image based on the instrument classification model includes: Preprocessing the input pointer instrument image; The preprocessed pointer instrument image is sent to the trained instrument classification model, and the probability distribution of each category is output through forward propagation calculation; The category with the highest probability is taken as the final classification result; According to the classification result, the type and range corresponding to the pointer instrument image are determined.

7. The method for automatically identifying pointer meter readings according to claim 1, characterized in that: The step of calculating the dial reading corresponding to the current pointer based on the measuring range and the angle ratio includes: Use the formula value = rate × LC to calculate the dial reading corresponding to the current pointer, where rate is the angle proportion of the current pointer within the range; LC is the range value.

8. A pointer-type instrument reading automatic recognition device, characterized in that: include: A recognition module, used for performing key point recognition on a pointer instrument image based on a key point detection model; The key points include the pointer rotation center point, the pointer end point, the range starting point and the range end point; The first calculation module is used to calculate the coordinate vector of each key point with the pointer rotation center point as the starting point; The second calculation module is used to identify the current rotation angle of the pointer and the corresponding angle ratio according to the rotation direction of the pointer based on the coordinate vector; A range recognition module, used to recognize the range corresponding to the pointer instrument image based on the instrument classification model; The reading calculation module is used to calculate the dial reading corresponding to the current pointer based on the range and the angle ratio.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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

Citation Information

Cited By

  • State recognition method, electronic equipment and computer readable storage medium

    CN120726612A