Industrial meter adaptive reading method based on general element understanding

CN122990716APending Publication Date: 2026-10-27CHINA RAILWAY ELECTRIFICATION (XIAN) COMM EQUIP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611171568.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

当面对巡检现场未见过的表计形态(即零样本场景)时,现有模型往往直接失效,导致系统的泛化部署成本极高

Benefits of technology

本发明提出通用要素理解与知识库驱动范式,将深度学习任务解耦为表计通用要素的提取,结合模板知识库实现了对未知形态表计的零样本自适应读数,大幅降低了定制化数据的采集成本和现场部署周期;通过融合深度特征提取与相机点位先验矩阵,在恶劣光照、高反光及大角度倾斜等复杂工况下,仍能鲁棒地估计单应性矩阵并精准完成表盘透视校正;基于多维代价矩阵与几何先验约束构建刻度匹配与补全机制,实现了对被遮挡或污损刻度的精准重构,有效消除了因局部特征缺失导致的读数跳变误差;此外,提出具有校正奖励机制的多维置信度评估模型,克服了传统深度学习输出概率缺乏物理可解释性的局限,通过动态融合目标检测、指针提取、刻度匹配及透视校正等多维质量指标,为无人化巡检系统提供了极具可解释性的决策支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990716A_ABST
    Figure CN122990716A_ABST
Patent Text Reader

Abstract

The application discloses an industrial meter adaptive reading method based on general element understanding, and the method comprises the following steps: obtaining an image of an industrial meter to be read and performing perspective correction; inputting the corrected image of the industrial meter to be read into a preset meter recognition model to output detection and recognition data of each basic element of the industrial meter; obtaining the geometric characteristics of a pointer and the confidence score of the pointer in the preliminary detection area of the pointer in the detection and recognition data through a preset pointer extraction algorithm; performing abnormal recognition and missing completion on the detection and recognition data based on an industrial meter template knowledge base to obtain a recognized scale point set and matching and completion confidence; and determining the industrial meter count and the reading confidence score according to the geometric characteristics of the pointer and the recognized scale point set. Through the generalization extraction capability of the deep learning model on the general elements of the meter, and in combination with the pre-constructed template knowledge base, high-precision and high-robust adaptive reading of known and unknown industrial meters is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer vision and image processing technology, and more specifically, to an adaptive reading method for industrial meters based on general element understanding. Background Technology

[0002] In unmanned inspections of industrial settings such as substations, water plants, and chemical plants, the automatic reading of various mechanical pointer instruments is a core component. Due to the wide variety of instruments on site (such as voltmeters, pressure gauges, and oil temperature gauges), their diverse shapes, and their often complex and variable physical environments, intelligent reading methods face significant challenges in practical applications.

[0003] Currently, existing automatic reading technologies for pointer-type meters mainly fall into two categories: one is based on traditional image processing methods, relying on manual feature operators such as edge detection and Hough transform to extract the geometric information of the dial and pointer; the other is based on deep learning methods, directly regressing the reading through neural networks end-to-end, or training a dedicated target and key point localization model to extract meter elements. However, in practical applications, these methods mainly suffer from the following two main drawbacks: (1) Poor generalization ability and high dependence on customized data: Traditional image processing algorithms (such as circle / line extraction based on edge detection and Hough transform) are extremely sensitive to changes in lighting and reflections on glass dials, and have very poor robustness. At present, mainstream deep learning methods (such as end-to-end reading regression or customized key point detection) often require the collection of massive amounts of data for each specific model of dial to be retrained. When faced with meter forms that have not been seen in the inspection site (i.e., zero-sample scenarios), existing models often fail directly, resulting in extremely high generalization deployment costs for the system.

[0004] (2) Lack of spatial topological understanding, weak resistance to occlusion and interpretability: Due to the limited shooting angle, meter images acquired in industrial sites often suffer from severe perspective distortion. At the same time, the dial scale is often obscured by large pointers or surface dirt. Existing methods mostly perform direct inference from images, lacking a deep understanding of the "general geometric topological relationship of meters", resulting in completely erroneous readings under occlusion conditions. In addition, the confidence level output by existing systems often comes from deep learning models, lacking interpretability based on physical and geometric rules, making it difficult to meet the stringent requirements for high reliability in industrial scenarios.

[0005] Therefore, the existing technology has defects and urgently needs improvement. Summary of the Invention

[0006] In view of the above problems, the purpose of this invention is to provide an adaptive reading method for industrial meters based on the understanding of general elements. This invention aims to utilize the generalization extraction capability of deep learning models for general elements of meters, combined with a pre-built template knowledge base, to achieve high-precision and robust adaptive reading of industrial meters of known and unknown forms.

[0007] The first aspect of this invention provides an adaptive reading method for industrial meters based on general element understanding, comprising: Construct a preset meter identification model, an industrial meter template knowledge base, and location calibration information; Acquire images of industrial meters to be read; Based on the industrial meter template knowledge base and the point calibration information, perspective correction is performed on the image of the industrial meter to be identified. The corrected image of the industrial meter to be identified is input into a preset meter recognition model for basic element detection and recognition. The detection area and confidence level of each basic element of the industrial meter are integrated to obtain detection and recognition data. The basic elements of the industrial meter include, but are not limited to, the industrial meter body, dial area, pointer, scale points and scale values. Using a preset pointer extraction algorithm, the geometric features and pointer confidence score of the pointer are obtained within the initial pointer detection area in the detection and recognition data. Based on the industrial meter template knowledge base, the detection and identification data is anomaly identification and missing data completion to obtain the identification scale point set and the matching and completion confidence. The industrial meter readings and reading confidence scores are determined based on the geometric features of the pointer and the set of identification scale points.

[0008] In this solution, the perspective correction of the image of the industrial meter to be identified based on the industrial meter template knowledge base and the point calibration information includes: A set of key points is extracted from the image of the industrial meter to be identified using a preset feature extraction algorithm. and its corresponding descriptor subsets Construct the feature set of the dial area ; Load the template key point set of the standard template image from the industrial meter template knowledge base. and template descriptor subset Construct a standard template image feature set ; The feature set of the dial area and the standard template image feature set Input to a preset feature matching algorithm, outputting a set of feature point matching pairs M; Mismatched points in the matching pair set M are removed using a random sampling consistency algorithm, and the online homography matrix between the image of the industrial meter to be identified and the standard template image is calculated by minimizing the reprojection error. ; Calculate the perspective correction quality score : ; in, The number of interior points after removing mismatched points. The preset threshold number of saturation points, This represents the average reprojection error. For the maximum tolerance error, These are the weighting coefficients; When the perspective correction quality score When the score exceeds a preset quality score threshold, the online homography matrix will be... Determined as the transformation matrix ; Conversely, determine whether the point calibration information contains an image correction transformation matrix that meets the reading requirements. If so, then the image correction transformation matrix will be... Determined as the transformation matrix If not, then the transformation matrix will be... Set as identity matrix ; Based on the transformation matrix Perspective correction is performed on the image of the industrial meter to be read.

[0009] In this scheme, the method for calculating the geometric features includes: The geometric features include orientation consistency scores. Length score Regional scores Distance score and morphological score ; The pointer rotation center is obtained based on the industrial meter template knowledge base. The ideal operating area and pointer length range ; Candidate line segments are identified and a set of candidate line segments is constructed within the initial detection area of ​​the pointer; for each candidate line segment i, the corresponding morphological features are calculated; the morphological features include at least the midpoint. Both ends and Length of straight line segment Direction vector Line width uniformity and background contrast; Rotation center of the pointer Starting from the midpoint of candidate line segment i Construct a reference vector for the endpoint Calculate the reference vector and the direction vector The acute angle between them ; According to the acute angle Calculate the directional consistency score ; The length of the straight segment With the pointer length range Compare the results to determine the length score. ; The region score is determined based on the positional relationship between candidate line segment i and the ideal activity region. ; Calculate the distance from candidate line segment i to the pointer rotation center. Determine the distance score by calculating the vertical distance. ; The shape score is calculated based on the line width uniformity and background contrast of candidate line segment i. ; Construct a multidimensional geometric feature score vector for candidate line segment i: .

[0010] In this scheme, the calculation method for the pointer confidence score is as follows: Set the weighting coefficient W and the overall score threshold. ; ; Based on the weighting coefficients and multidimensional geometric feature scoring vector Calculate the overall confidence score for each candidate line segment. : ; All candidate line segments are sorted in descending order of their overall confidence scores. When it exists When the maximum comprehensive confidence score is reached, the candidate line segment corresponding to the highest value is determined as the pointer. Conversely, for < The candidate line segments are filtered, and the remaining candidate line segments are selected based on their shape scores. The largest candidate line segment is determined as the pointer; The overall confidence score corresponding to the pointer is determined as the pointer confidence score. .

[0011] This plan also includes: When no candidate line segments remain after filtering, calculate the perpendicular distance from each diagonal in the initial detection area of ​​the pointer to the pointer's rotation center, and determine the diagonal with the smallest perpendicular distance as the pointer. Determined as pointer confidence score .

[0012] In this solution, the step of performing anomaly identification and missing data completion on the detection and identification data based on the industrial meter template knowledge base to obtain the identification scale point set and matching and completion confidence scores includes: Construct a set of tick points With template tick point set The combined cost matrix between ; ; in, For the comprehensive cost matrix The matrix elements represent tick points. With template scale points The matching cost; For spatial distance, scale point With template scale points The polar angle deviation relative to their respective centers The sequence similarity between the OCR text and the template ground truth value. , and These are the weighting coefficients; For the comprehensive cost matrix The solution is performed, and the matching quality score is calculated based on the total matching cost. And based on the matching quality score Determine the mapping relationship between each scale point and the corresponding template scale point; Project the template scale points that have not been mapped onto the circular scale distribution fitting curve, and determine the completed scale points based on the coordinates of the template scale points on the circular scale distribution fitting curve. The scale points that establish the mapping relationship and the completed scale points are integrated to obtain the set of identification scale points; Calculate the set of chord lengths between adjacent scale points in the identification scale point set, and calculate the geometric rationality score based on the preset geometric rationality index. ; The matching quality score and the geometric rationality score Perform weighted summation to determine the confidence levels for matching and completion. .

[0013] In this scheme, the method for constructing the circular scale distribution fitting curve is specifically as follows: The scale points within the basic elements of industrial meters are normalized, and the pointer rotation center O is introduced as a priori constraint to limit the fitting center. The search boundary is determined, and curve fitting is performed on the normalized scale points to construct a circular scale distribution fitting curve. If fitting fails or the fit center is not found If the offset from the pointer rotation center O exceeds the preset offset threshold, a backoff mechanism is triggered: a circular scale distribution fitting curve is constructed with the pointer rotation center O as the center and the average Euclidean distance from all scale points to the pointer rotation center O as the radius.

[0014] In this solution, determining the industrial meter reading based on the geometric features of the pointer and the set of identification scale points includes: When the meter type is a circular or elliptical meter, based on the fitted center Establish a polar coordinate system; Calculate the vector polar angle of the pointer in the direction of the geometric line. ; Obtain the vector polar angle from the scale sequence. angular range ; According to the vector polar angle In the angular range Linear interpolation is performed on the angle proportions to determine the industrial meter readings.

[0015] In this solution, determining the industrial meter reading based on the geometric features of the pointer and the set of identification scale points further includes: When the meter type is a linear instrument, calculate the intersection point of the geometric line of the pointer and the line connecting the adjacent scale points. ; Calculate the intersection point The industrial meter readings are determined by linear interpolation based on the proportion of Euclidean distance between adjacent scale segments.

[0016] In this scheme, the calculation method for the reading confidence score is as follows: Based on the confidence level of the detection results The pointer confidence score and the confidence level of the matching and completion Perform a weighted summation to determine the baseline confidence level. ; Perspective correction quality score As a reward factor, the base confidence level Perform dynamic corrections to determine the final reading confidence score. .

[0017] Compared with the prior art, the present invention has the following significant advantages: This invention proposes a general element understanding and knowledge base-driven paradigm, decoupling deep learning tasks into the extraction of general meter elements. Combined with a template knowledge base, it achieves zero-sample adaptive reading of meters with unknown shapes, significantly reducing the cost of customized data collection and the on-site deployment cycle. By fusing deep feature extraction with camera point prior matrices, it can robustly estimate the homography matrix and accurately complete dial perspective correction even under complex conditions such as poor lighting, high reflectivity, and large-angle tilt. Based on a multi-dimensional cost matrix and geometric prior constraints, a scale matching and completion mechanism is constructed, enabling accurate reconstruction of occluded or damaged scales and effectively eliminating reading jump errors caused by missing local features. Furthermore, a multi-dimensional confidence evaluation model with a correction reward mechanism is proposed, overcoming the limitation of traditional deep learning output probabilities lacking physical interpretability. By dynamically fusing multi-dimensional quality indicators such as target detection, pointer extraction, scale matching, and perspective correction, it provides highly interpretable decision support for unmanned inspection systems. Attached Figure Description

[0018] Figure 1 The flowchart illustrates an adaptive reading method for industrial meters based on general element understanding provided by the present invention. Detailed Implementation

[0019] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0020] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0021] Figure 1 The flowchart illustrates an adaptive reading method for industrial meters based on general element understanding provided by the present invention.

[0022] like Figure 1 As shown, this invention discloses an adaptive reading method for industrial meters based on general element understanding, comprising: S101, Construct a preset meter identification model, an industrial meter template knowledge base, and point calibration information; S102, acquire the image of the industrial meter to be read; S103, perform perspective correction on the image of the industrial meter to be read based on the industrial meter template knowledge base and point calibration information; S104, The calibrated image of the industrial meter to be read is input into the preset meter recognition model for basic element detection and recognition. The detection area and confidence of the detection results of each basic element of the industrial meter are integrated to obtain the detection and recognition data. The basic elements of the industrial meter include, but are not limited to, the industrial meter body, dial area, pointer, scale point and scale value. S105, through a preset pointer extraction algorithm, obtains the geometric features and pointer confidence score of the pointer in the preliminary pointer detection area of ​​the detection and recognition data; S106, Based on the industrial meter template knowledge base, perform anomaly identification and missing data completion on the detection and identification data to obtain the set of identification scale points and the matching and completion confidence; S107, determine the industrial meter readings and reading confidence score based on the geometric characteristics of the pointer and the set of identification scale points.

[0023] According to embodiments of the present invention, by utilizing the generalization recognition capability of deep learning models and an industrial meter template knowledge base, it is possible to efficiently and reliably read the readings of various types of industrial meters (including known and unknown forms).

[0024] The pre-defined meter recognition model is a deep learning model. This model learns from a large dataset of industrial meter images (obtainable through historical recognition data and the internet), enabling it to generalize the recognition of basic elements of industrial meters (including but not limited to the meter body, dial area, pointer, scale points, and scale values). The industrial meter template knowledge base is also pre-built using this large dataset of industrial meter images. It includes, but is not limited to, geometric feature templates for various types of industrial meters, association rules for basic elements, scale point position relationships, and scale-reading mapping relationships. The point calibration information stores image correction transformation matrices pre-calibrated and stored for specific camera deployment locations. Transformation matrix This represents the ideal imaging correction state of the meter at that point under normal operating conditions.

[0025] The preset meter recognition model can be a task-specific optimized model or a general vision foundation model. If it is a task-specific optimized model, it will at least include an object detection model, a semantic segmentation or instance segmentation model, and a pose estimation algorithm model. The object detection model is used to locate and classify basic elements such as the industrial meter body, dial area, scale points, and scale values. This model can employ a deep learning model based on a convolutional neural network (CNN) or Transformer architecture to support accurate detection of small and multi-scale targets. The semantic segmentation or instance segmentation model is used for pixel-level fine-grained recognition and region extraction of basic elements such as dial area, pointers, or scales. This model can employ a deep learning model based on a convolutional neural network (CNN) or Transformer architecture. The pose estimation algorithm model is used to estimate the pointer's pose to obtain its geometric features. This model can also employ a deep learning model based on a convolutional neural network (CNN) or Transformer architecture, and it can simultaneously output the pointer's location and orientation information.

[0026] If it is a general vision model, the preset meter recognition model can adopt a general vision model (such as the DINO series model) based on the Transformer architecture and trained by large-scale self-supervised learning. The general vision features learned by it can be applied to various downstream tasks such as target detection, semantic segmentation or feature extraction to improve the generalized recognition ability of basic elements of industrial meters.

[0027] The industrial meter template knowledge base contains template information for each type of industrial meter. This template information constructs a mapping from image pixel space to physical reading space, specifically including: (1) Visual registration reference information: This is used to achieve spatial alignment between the industrial meter to be read and the template, including template image data and a feature index library. The template image data serves as the front view image of the meter as a standard reference, while the feature index library consists of a set of key points obtained after feature extraction from the template image and their corresponding feature descriptor sequences. The feature descriptor sequences are pre-calculated and stored in a serialized format during the knowledge base construction phase, and are used to directly load them during the online reading phase for perspective correction matching.

[0028] (2) Semantic geometric topology information: used to describe the spatial distribution and logical relationships of the instrument's basic elements, including the rotation center and scale distribution model. The rotation center is the pixel coordinate of the ideal physical rotation center of the meter pointer in the template image coordinate system. The scale distribution model is a sequence of pixel coordinates of standard scale points in the template image coordinate system. The geometric shape of the scale point distribution (such as arc radius, starting angle, and ending angle), and the logical association index between the center coordinates of the scale value text area and the corresponding scale point.

[0029] (3) Reading Calculation Configuration Information: This guides the execution of the reading algorithm and includes reading strategy and pointer configuration parameters. The reading strategy includes the reading algorithm type specified for this type of meter (e.g., angle method, distance method), the physical reading conversion method between each standard scale point, and the physical reading value corresponding to each standard scale point. Pointer configuration parameters: the theoretical length range of the pointer. Width and color feature parameters are used to initialize the parameters of the pointer extraction algorithm.

[0030] According to an embodiment of the present invention, perspective correction is performed on the image of the industrial meter to be identified based on an industrial meter template knowledge base and point calibration information, including: A set of key points is extracted from the image of the industrial meter to be identified using a preset feature extraction algorithm. and its corresponding descriptor subsets Construct the feature set of the dial area ; Load the template key point set of the standard template image from the industrial meter template knowledge base. and template descriptor subset Construct a standard template image feature set ; Feature set of the dial area and standard template image feature set Input to a preset feature matching algorithm, outputting a set of feature point matching pairs M; Mismatched points in the matching pair set M are eliminated using a random sampling consistency algorithm, and the online homography matrix between the image of the industrial meter to be identified and the standard template image is calculated by minimizing the reprojection error. ; Calculate the perspective correction quality score : ; in, The number of interior points after removing mismatched points. The preset threshold number of saturation points, This represents the average reprojection error. For the maximum tolerance error, These are the weighting coefficients; When the perspective correction quality score When the score exceeds the preset quality score threshold, the online homography matrix will be... Determined as a transformation matrix ; Conversely, determine whether the point calibration information contains an image correction transformation matrix that meets the reading requirements. If so, then the image correction transformation matrix will be... Determined as a transformation matrix If not, then the transformation matrix will be... Set as identity matrix ; Based on the transformation matrix Perspective correction is performed on the images of industrial meters to be read.

[0031] It should be noted that the standard template image feature set Alternatively, a preset feature extraction algorithm can be used to calculate the feature set of the dial area from a standard template image. and standard template image feature set Then, the correspondence between feature points in the two sets is predicted by a preset feature matching algorithm, and a set of feature point matching pairs with high confidence is output, M.

[0032] in, , The initial values ​​are all 0.5. Those skilled in the art can adjust them according to actual needs. The value is dynamically adjusted.

[0033] Then, the perspective correction quality score is determined based on the correction transformation matrix. And whether there is a pre-stored correction transformation matrix in the point calibration information. Information (When an image correction transformation matrix corresponding to a standard template image exists, it is determined that the recognition requirements are met, and the transformation matrix is ​​identified as the image correction transformation matrix). ), determine the final transformation matrix used for correction. Among them, the identity matrix This indicates that no correction will be performed.

[0034] The preset feature extraction algorithm and the preset feature matching algorithm can be implemented by at least one of the following combinations: (1) Traditional methods based on local image features: Pre-defined feature extraction algorithms can use scale-invariant feature transform (SIFT), speed-up robust feature (SURF), or orientation fast and rotation descriptor (ORB) algorithms to extract local feature points and their descriptors with scale and rotation invariance from the image; Pre-defined feature matching algorithms can use brute-force matching or approximate nearest neighbor matching algorithms based on FLANN (Fast Library for Approximate Nearest Neighbors) to match feature points; (2) Modern methods based on deep learning: The preset feature extraction algorithm can adopt a feature extraction model based on deep neural networks to extract robust local feature points and their high-dimensional descriptors from the image; the preset feature matching algorithm can adopt a feature matching model based on deep learning (such as based on attention mechanism or graph neural network) to achieve high-confidence feature matching by learning the semantic relationship between features.

[0035] Furthermore, the Random Sample Consensus (RANSAC) algorithm and the minimization of reprojection error calculation are both known techniques, and should be selected by those skilled in the art based on actual needs. The preset saturation point threshold and preset quality score threshold should also be set by those skilled in the art based on actual needs.

[0036] Finally, using the final determined transformation matrix The pixels in the region of interest image of the instrument under test are reverse-sampled at the pixel level to generate a corrected front view.

[0037] Furthermore, the execution order of the perspective correction step, as well as the steps of identifying basic elements and finely extracting pointers for industrial meters, can be adjusted. Specifically, the meter can be corrected through perspective first, followed by the detection of key elements and fine extraction of the pointer; or the key elements and fine extraction of the pointer can be performed first, followed by perspective correction. In the latter step, the coordinate information of all basic elements of the industrial meter obtained from the detection of key elements and fine extraction of the pointer also needs to be simultaneously processed based on the transformation matrix. Transform to the calibrated dial image coordinate system.

[0038] According to an embodiment of the present invention, a method for calculating geometric features includes: Geometric features include orientation consistency score Length score Regional scores Distance score and morphological score ; Obtain the pointer rotation center based on the industrial meter template knowledge base The ideal operating area and pointer length range ; Candidate line segments are identified and a set of candidate line segments is constructed within the initial detection area of ​​the pointer; for each candidate line segment i, the corresponding morphological features are calculated; the morphological features include at least the midpoint. Both ends and Length of straight line segment Direction vector Line width uniformity and background contrast; Rotate the center of the pointer Starting from the midpoint of candidate line segment i Construct a reference vector for the endpoint Calculate the reference vector and direction vector The acute angle between them ; Based on the acute angle Calculate the directional consistency score ; Length of the straight segment With pointer length range Compare the results to determine the length score. ; The region score is determined based on the positional relationship between candidate line segment i and the ideal activity area. ; Calculate the distance from candidate line segment i to the pointer rotation center. Determine the distance score by calculating the vertical distance. ; The shape score is calculated based on the line width uniformity and background contrast of candidate line segment i. ; Construct a multidimensional geometric feature score vector for candidate line segment i: .

[0039] It should be noted that pixel analysis can be performed on the pointer's initial detection area to filter out straight line segments with a pixel length greater than a preset pixel length (such as 10 pixel values) and identify them as candidate straight line segments.

[0040] A pre-constructed relationship table between acute angles and directional consistency scores is used. In this table, the smaller the acute angle, the higher the corresponding directional consistency score. Each acute angle has a corresponding directional consistency score. Furthermore, when the acute angle... Less than the preset direction threshold If the candidate line segment is not found, it should be directly eliminated.

[0041] By the length of the straight line segment With pointer length range The degree of matching determines the length score. If the length of the straight line segment Within the pointer length range Within, the length score is calculated. for If the length of the straight line segment Less than However, if the length exceeds the preset minimum tolerance length, the length score will be lower. for If neither of the above two conditions is met, then the length score will be awarded. for .

[0042] Next, the region score is determined by judging whether candidate line segment i is located within the ideal activity area. If candidate line segment i is completely within the ideal activity area, then the area score is... for If the activity area partially overflows the ideal activity area, the area score will be calculated accordingly. for If the activity is completely outside the ideal activity area, the area score will be [not specified]. It is 0.

[0043] in, > > The specific value is set by those skilled in the art based on actual needs.

[0044] Similarly, a relationship table between the vertical distance from the candidate line segment to the pointer rotation center and the distance score is pre-constructed. In this relationship table, the smaller the vertical distance, the higher the corresponding distance score, and each vertical distance has a corresponding distance score.

[0045] The morphological score is determined by weighted summation of the line width uniformity and background contrast of candidate line segment i. In the weighted summation process, the initial weights of line width uniformity and background contrast are both 0.5, and the sum of the two weights is 1. Those skilled in the art can dynamically adjust the weights according to actual needs.

[0046] Wherein, direction vector Reference vector The calculation methods for line width uniformity and background contrast can all be achieved using existing technologies, and will not be elaborated here.

[0047] Among them, the ideal active area of ​​the pointer and the pointer length range Preset pixel length, preset direction threshold Both the preset minimum tolerance length and the preset minimum tolerance length are set by those skilled in the art according to actual needs.

[0048] According to an embodiment of the present invention, the method for calculating the pointer confidence score is as follows: Set the weighting coefficient W and the overall score threshold. ; ; Based on weighting coefficients and multidimensional geometric feature scoring vector Calculate the overall confidence score for each candidate line segment. : ; All candidate line segments are sorted in descending order of their overall confidence scores. When it exists When the maximum comprehensive confidence score is reached, the candidate line segment corresponding to the highest value is determined as the pointer. Conversely, for < The candidate line segments are filtered, and the remaining candidate line segments are selected based on their shape scores. The largest candidate line segment is determined as the pointer; The overall confidence score corresponding to the pointer is determined as the pointer confidence score. .

[0049] It should be noted that the weighting coefficients and comprehensive score threshold All settings are configured by those skilled in the art based on actual needs.

[0050] According to an embodiment of the present invention, it further includes: When no candidate line segments remain after filtering, calculate the perpendicular distance from each diagonal in the initial detection area of ​​the pointer to the pointer's rotation center, and determine the diagonal with the smallest perpendicular distance as the pointer. Determined as pointer confidence score .

[0051] It should be noted that the diagonal is determined based on the connection between vertices in the initial detection area by the pointer.

[0052] According to an embodiment of the present invention, anomaly identification and missing data completion are performed on detection and identification data based on an industrial meter template knowledge base to obtain a set of identification scale points and matching and completion confidence levels, including: Construct a set of tick points With template tick point set The combined cost matrix between ; ; in, For the comprehensive cost matrix The matrix elements represent tick points. With template scale points The matching cost; For spatial distance, scale point With template scale points The polar angle deviation relative to their respective centers The sequence similarity between the OCR text and the template ground truth value. , and These are the weighting coefficients; For the comprehensive cost matrix The solution is performed, and the matching quality score is calculated based on the total matching cost. And based on the matching quality score Determine the mapping relationship between each scale point and the corresponding template scale point; Project the template scale points that have not been mapped onto the circular scale distribution fitting curve, and determine the completed scale points based on the coordinates of the template scale points on the circular scale distribution fitting curve. The scale points that establish the mapping relationship and the completed scale points are integrated to obtain the set of recognition scale points; Calculate the set of chord lengths between adjacent scale points in the identification scale point set, and calculate the geometric rationality score based on the preset geometric rationality index. ; Match quality score and geometric rationality score Perform weighted summation to determine the confidence levels for matching and completion. .

[0053] It should be noted that the comprehensive cost matrix Matrix elements Based on scale points With template scale points The scale point is obtained by weighting the spatial distance between them, the polar angle deviation relative to their respective rotation centers, and the sequence similarity of the scale value recognition results. With template scale points The matching cost between them. Wherein, the weight coefficients... , and The values ​​are all set by those skilled in the art according to actual needs.

[0054] The comprehensive cost matrix is ​​calculated using a pre-set globally optimal matching algorithm (such as the Hungarian algorithm, KM algorithm, etc.). The solution is performed to obtain the one-to-one mapping relationship between the detection point and the template point that minimizes the total matching cost; the matching quality score is calculated based on the total matching cost obtained by summing all matrix elements. Match quality score The matching quality score can be calculated using a lookup table method and pre-built. A relationship table exists between the total matching cost and the total matching cost. In this table, each total matching cost corresponds to a matching quality score. It is negatively correlated with the total matching cost. Subsequently, the matching quality score is mapped to the interval of 0 to 1 using a non-linear function (such as the Sigmoid function, piecewise function, etc.) to quantify the degree of similarity between the current detection scale point and the standard template scale point.

[0055] For template tick points without established mapping relationships, during the projection process, the Euclidean distance between the template tick point and the circular tick distribution fitting curve is minimized, and the corresponding coordinates of the template tick point on the circular tick distribution fitting curve are calculated. These corresponding coordinates are then determined as the completed tick points.

[0056] Among them, the preset geometric rationality index can be the coefficient of variation of chord length. chord length coefficient of variation It is determined by calculating the ratio of the standard deviation of the chord length data to the mean chord length.

[0057] The pre-defined geometric rationality index (chord length variation coefficient) will be used. Input a pre-built table showing the relationship between preset geometric rationality indices and geometric rationality scores, and output the geometric rationality scores. In the table showing the relationship between the preset geometric rationality index and the geometric rationality score, each value of the preset geometric rationality index corresponds to a geometric rationality score.

[0058] Among them, the matching quality score and geometric rationality score The weighting coefficients are set by those skilled in the art according to actual needs, and the sum of the weighting coefficients of the two is 1.

[0059] According to an embodiment of the present invention, the method for constructing a circular scale distribution fitting curve is as follows: The scale points within the basic elements of industrial meters are normalized, and the pointer rotation center O is introduced as a prior constraint to limit the fitting center. The search boundary is determined, and curve fitting is performed on the normalized scale points to construct a circular scale distribution fitting curve. If fitting fails or the fit center is not found If the offset from the pointer rotation center O exceeds the preset offset threshold, a backoff mechanism is triggered: a circular scale distribution fitting curve is constructed with the pointer rotation center O as the center and the average Euclidean distance from all scale points to the pointer rotation center O as the radius.

[0060] It should be noted that the purpose of normalizing the scale points within the basic elements of industrial meters is to eliminate the influence of image resolution and size differences, transforming them to a uniform relative scale. A parameter fitting algorithm (based on existing technology and not elaborated here) is used to perform curve fitting on the scale points, with the pointer rotation center O introduced as a prior constraint to limit the fitting center. The search boundary is determined, and a scale curve is fitted to construct a circular scale distribution fitting curve.

[0061] Among them, the fitting center The offset from the pointer rotation center O is determined by calculating the pixel distance between them, and the preset offset threshold is set by those skilled in the art according to actual needs.

[0062] According to an embodiment of the present invention, determining the readings of an industrial watch based on the geometric features of the pointer and a set of identification scale points includes: When the meter type is round or elliptical, based on the fitted center Establish a polar coordinate system; Calculate the vector polar angle of the pointer along the geometric straight line. ; Obtain the vector polar angle from the scale sequence. angular range ; According to the vector polar angle In the angle range Linear interpolation is performed on the angle proportions to determine the industrial meter readings.

[0063] It should be noted that the meter type can be determined by the meter type identifier defined in the industrial meter template knowledge base, which includes at least round, elliptical, and linear meters. (Within the angle range) middle, These are the polar angles of adjacent scale points.

[0064] In the process of reading industrial meters, the vector polar angle is first determined. and its angular range ,as well as and Corresponding physical values To address the problem of jumping across zero points caused by the periodicity of angles, the angle difference function performs a step on the difference. Modulo correction strictly constrains the results to... Within the range, ensure that the difference between any two angles always represents a continuous positive arc length, thereby eliminating interpolation discontinuities caused by abrupt changes in the absolute value of the angle. Calculate the starting scale of the angle interval where the pointer is located. The effective angular displacement and the total effective angular displacement over the entire angular interval are used as the ratio of the two as the normalized position scaling factor t. The scaling factor t is then substituted into the linear interpolation formula. Determine the industrial meter readings R.

[0065] According to an embodiment of the present invention, determining the readings of an industrial meter based on the geometric features of the pointer and a set of identification scale points further includes: When the meter type is a linear instrument, calculate the intersection of the pointer geometric line and the line connecting adjacent scale points. ; Calculate the intersection point The industrial meter readings are determined by linear interpolation based on the proportion of Euclidean distance between adjacent scale segments.

[0066] It should be noted that when the meter type is a linear instrument, the industrial meter reading is calculated using a circular or elliptical instrument by calculating the intersection point. The ratio of the distance to the initial value of the adjacent scale point and the total distance between adjacent scale points is used as the normalized position scaling factor t. Then, the scaling factor t is substituted into the linear interpolation formula. Determine the industrial meter readings R.

[0067] According to an embodiment of the present invention, the method for calculating the confidence score of the reading is as follows: Based on the confidence level of the test results Pointer confidence score and matching and completion confidence Perform a weighted summation to determine the baseline confidence level. ; Perspective correction quality score As a reward factor, the baseline confidence level Perform dynamic corrections to determine the final reading confidence score. .

[0068] It should be noted that, in the weighted summation process, the confidence level of the detection results... Pointer confidence score and matching and completion confidence The specific values ​​of each weight coefficient are set by those skilled in the art according to actual needs, and the sum of the three weight coefficients is 1.

[0069] Then, perspective correction quality scores are introduced. As a reward factor, the baseline confidence level Dynamic adjustments are made, and during the dynamic adjustment process, the base confidence level is adjusted. Incremental rewards will be implemented, with the reward amount varying from... and preset reward coefficient (Set by those skilled in the art according to actual needs) jointly determine, to reflect the positive impact of perspective correction quality on the final reading, and output the final reading confidence score. .

[0070] All information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals (including but not limited to signals transmitted between user terminals and other devices) involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the "images of industrial meters to be read" and the "industrial meter template knowledge base" involved in this disclosure were obtained with full authorization.

[0071] This invention discloses an adaptive reading method for industrial meters based on general element understanding. The method includes: acquiring an image of the industrial meter to be read and performing perspective correction; inputting the corrected image of the industrial meter to be read into a preset meter recognition model, and outputting detection and recognition data of each basic element of the industrial meter; using a preset pointer extraction algorithm, acquiring the geometric features and pointer confidence score of the pointer within the preliminary detection area of ​​the pointer in the detection and recognition data; performing anomaly identification and missing data completion based on an industrial meter template knowledge base, obtaining a set of recognition scale points and matching and completion confidence scores; and determining the industrial meter reading and reading confidence score based on the geometric features of the pointer and the set of recognition scale points. By utilizing the generalization extraction capability of deep learning models for general elements of meters, combined with a pre-built template knowledge base, high-precision and robust adaptive reading of industrial meters with known and unknown forms is achieved.

[0072] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0073] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0074] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0075] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0076] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. An adaptive reading method for industrial meters based on general element understanding, characterized in that, include: Construct a preset meter identification model, an industrial meter template knowledge base, and location calibration information; Acquire images of industrial meters to be read; Based on the industrial meter template knowledge base and the point calibration information, perspective correction is performed on the image of the industrial meter to be identified. The corrected image of the industrial meter to be identified is input into a preset meter recognition model for basic element detection and recognition. The detection area and confidence level of each basic element of the industrial meter are integrated to obtain detection and recognition data. The basic elements of the industrial meter include, but are not limited to, the industrial meter body, dial area, pointer, scale points and scale values. Using a preset pointer extraction algorithm, the geometric features and pointer confidence score of the pointer are obtained within the initial pointer detection area in the detection and recognition data. Based on the industrial meter template knowledge base, the detection and identification data is anomaly identification and missing data completion to obtain the identification scale point set and the matching and completion confidence. The industrial meter readings and reading confidence scores are determined based on the geometric features of the pointer and the set of identification scale points.

2. The adaptive reading method for industrial meters based on general element understanding according to claim 1, characterized in that, The perspective correction of the image of the industrial meter to be read based on the industrial meter template knowledge base and the point calibration information includes: A set of key points is extracted from the image of the industrial meter to be identified using a preset feature extraction algorithm. and its corresponding descriptor subsets Construct the feature set of the dial area ; Load the template key point set of the standard template image from the industrial meter template knowledge base. and template descriptor subset Construct a standard template image feature set ; The feature set of the dial area and the standard template image feature set Input to a preset feature matching algorithm, outputting a set of feature point matching pairs M; Mismatched points in the matching pair set M are removed using a random sampling consistency algorithm, and the online homography matrix between the image of the industrial meter to be identified and the standard template image is calculated by minimizing the reprojection error. ; Calculate the perspective correction quality score : ; in, The number of interior points after removing mismatched points. The preset threshold number of saturation points, This represents the average reprojection error. For the maximum tolerance error, These are the weighting coefficients; When the perspective correction quality score When the score exceeds a preset quality score threshold, the online homography matrix will be... Determined as a transformation matrix ; Conversely, determine whether the point calibration information contains an image correction transformation matrix that meets the reading requirements. If so, then the image correction transformation matrix will be... Determined as a transformation matrix If not, then the transformation matrix will be... Set as identity matrix ; Based on the transformation matrix Perspective correction is performed on the image of the industrial meter to be read.

3. The adaptive reading method for industrial meters based on general element understanding according to claim 1, characterized in that, The method for calculating the geometric features includes: The geometric features include orientation consistency scores. Length score Regional scores Distance score and morphological score ; The pointer rotation center is obtained based on the industrial meter template knowledge base. The ideal operating area and pointer length range ; Candidate line segments are identified and a set of candidate line segments is constructed within the initial detection area of ​​the pointer; for each candidate line segment i, the corresponding morphological features are calculated; the morphological features include at least the midpoint. Both ends and Length of straight line segment Direction vector Line width uniformity and background contrast; Rotation center of the pointer Starting from the midpoint of candidate line segment i Construct a reference vector for the endpoint Calculate the reference vector and the direction vector The acute angle between them ; According to the acute angle Calculate the directional consistency score ; The length of the straight segment With the pointer length range Compare the results to determine the length score. ; The region score is determined based on the positional relationship between candidate line segment i and the ideal activity region. ; Calculate the distance from candidate line segment i to the pointer rotation center. Determine the distance score by calculating the vertical distance. ; The shape score is calculated based on the line width uniformity and background contrast of candidate line segment i. ; Construct a multidimensional geometric feature score vector for candidate line segment i: 。 4. The adaptive reading method for industrial meters based on general element understanding according to claim 1, characterized in that, The specific method for calculating the pointer confidence score is as follows: Set the weighting coefficient W and the overall score threshold. ; ; Based on the weighting coefficients and multidimensional geometric feature scoring vector Calculate the overall confidence score for each candidate line segment. : ; All candidate line segments are sorted in descending order of their overall confidence scores. When it exists When the maximum comprehensive confidence score is reached, the candidate line segment corresponding to the highest value is determined as the pointer. Conversely, for < The candidate line segments are filtered, and the remaining candidate line segments are selected based on their shape scores. The largest candidate line segment is determined as the pointer; The overall confidence score corresponding to the pointer is determined as the pointer confidence score. .

5. The adaptive reading method for industrial meters based on general element understanding according to claim 4, characterized in that, Also includes: When no candidate line segments remain after filtering, calculate the perpendicular distance from each diagonal in the initial detection area of ​​the pointer to the pointer's rotation center, and determine the diagonal with the smallest perpendicular distance as the pointer. Determined as pointer confidence score .

6. The adaptive reading method for industrial meters based on general element understanding according to claim 3, characterized in that, The process of identifying anomalies and completing missing data based on the industrial meter template knowledge base to obtain a set of identification scale points and matching and completion confidence levels includes: Construct a set of tick points With template tick point set The combined cost matrix between ; ; in, For the comprehensive cost matrix The matrix elements represent tick points. With template scale points The matching cost; For spatial distance, scale point With template scale points The polar angle deviation relative to their respective centers The sequence similarity between the OCR text and the template ground truth value. , and These are the weighting coefficients; For the comprehensive cost matrix The solution is performed, and the matching quality score is calculated based on the total matching cost. And based on the matching quality score Determine the mapping relationship between each scale point and the corresponding template scale point; Project the template scale points that have not been mapped onto the circular scale distribution fitting curve, and determine the completed scale points based on the coordinates of the template scale points on the circular scale distribution fitting curve. The scale points that establish the mapping relationship and the completed scale points are integrated to obtain the set of identification scale points; Calculate the set of chord lengths between adjacent scale points in the identification scale point set, and calculate the geometric rationality score based on the preset geometric rationality index. ; The matching quality score and the geometric rationality score Perform weighted summation to determine the confidence levels for matching and completion. .

7. The adaptive reading method for industrial meters based on general element understanding according to claim 6, characterized in that, The method for constructing the circular scale distribution fitting curve is as follows: The scale points within the basic elements of industrial meters are normalized, and the pointer rotation center O is introduced as a priori constraint to limit the fitting center. The search boundary is determined, and curve fitting is performed on the normalized scale points to construct a circular scale distribution fitting curve. If fitting fails or the fit center is not found If the offset from the pointer rotation center O exceeds the preset offset threshold, a backoff mechanism is triggered: a circular scale distribution fitting curve is constructed with the pointer rotation center O as the center and the average Euclidean distance from all scale points to the pointer rotation center O as the radius.

8. The adaptive reading method for industrial meters based on general element understanding according to claim 7, characterized in that, The step of determining the industrial meter reading based on the geometric features of the pointer and the set of identification scale points includes: When the meter type is a circular or elliptical meter, based on the fitted center Establish a polar coordinate system; Calculate the vector polar angle of the pointer in the direction of the geometric line. ; Obtain the vector polar angle from the scale sequence. angular range ; According to the vector polar angle In the angle range Linear interpolation is performed on the angle proportions to determine the industrial meter readings.

9. The adaptive reading method for industrial meters based on general element understanding according to claim 8, characterized in that, The step of determining the industrial meter reading based on the geometric features of the pointer and the set of identification scale points further includes: When the meter type is a linear instrument, calculate the intersection point of the geometric line of the pointer and the line connecting the adjacent scale points. ; Calculate the intersection point The industrial meter readings are determined by linear interpolation based on the proportion of Euclidean distance between adjacent scale segments.

10. The adaptive reading method for industrial meters based on general element understanding according to claim 6, characterized in that, The specific method for calculating the confidence score of the reading is as follows: Based on the confidence level of the detection results The pointer confidence score and the confidence level of the matching and completion Perform a weighted summation to determine the baseline confidence level. ; Perspective correction quality score As a reward factor, the base confidence level Perform dynamic corrections to determine the final reading confidence score. .