A method and apparatus for identifying measurement results of a digital instrument

By using preset template information and a support vector machine character recognition model, the system automatically extracts and recognizes the images and characters on the display screen of digital instruments, solving the problems of low efficiency and poor security in digital instrument data recognition, and achieving efficient and accurate automatic recognition of instrument data.

CN116469109BActive Publication Date: 2025-11-25HUAZHONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310399968.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2025-11-25
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

In existing technologies, data recognition of digital instruments relies on manual input, which is inefficient and poses safety risks in high-risk environments. Furthermore, deep learning methods require a large amount of manually labeled data, resulting in poor applicability.

Method used

The digital instrument display image is extracted from the grayscale image of the target scene using preset template information. The character image is recognized using a support vector machine character recognition model. The position of the decimal point is determined through feature matching and image processing, thereby realizing the automatic recognition of the digital instrument.

Benefits of technology

It achieves efficient and accurate identification of digital instruments, reduces data processing time and neural network training costs, is applicable to various instrument models, and improves identification efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116469109B_ABST
    Figure CN116469109B_ABST
Patent Text Reader

Abstract

The application provides a kind of digital instrument measurement result identification method and device, belong to image recognition technical field, the method includes: according to preset template information, from target scene gray scale image, the display screen image of digital instrument is extracted;Multiple character images are extracted from the display screen image, and the position of decimal point relative to multiple character images is determined;The character image includes: digital character image and unit character image;Each character image is input into character recognition model, and the identification result of each character image is output;According to the identification result of each character image and the position of decimal point, the measurement result of the digital instrument is determined.The application reduces the tedious work such as collection, marking and training of data set in deep learning, improves work efficiency;The application also supports setting template information of multiple different models of digital resistance meter, to facilitate users with different needs, and is more suitable.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, and particularly relates to a measurement result recognition method and device of a digital instrument. BACKGROUND

[0002] The recognition and recording of work equipment data are widely used in various industrial fields, but at present, in many scenarios, the work conditions are limited, and the production cost and equipment complexity are required, so many instrument and meter equipment used for measurement do not have a special communication interface for data transmission, which leads to the inability to directly obtain the measured data, and the data needs to be input and stored into the computer by relying on manual operation. The use of manual method needs to consume a large amount of manual time and effort, which brings higher cost expenditure, and manual operation can usually only identify and record data in ordinary non-dangerous situations, and in some specific situations, such as high temperature, high pressure and too many equipment, it is obviously not feasible to use manual operation to record equipment data, which not only affects the accuracy of data acquisition, but also may affect the personal safety of workers.

[0003] The working environment of the digital instrument may exist in the conditions of high pressure, high current and large number of equipment, therefore, machine vision is used to assist data reading and input, which greatly improves the work efficiency and recognition accuracy, and guarantees the safety of workers.

[0004] However, the method of using deep learning to train neural network to identify data on the digital instrument has two unavoidable problems: first, it needs to rely on manual operation to collect data, mark data and train neural network model, which greatly increases the work burden of workers and is low in work efficiency; second, when the neural network is applied to other scenes of numbers and characters, it is likely to produce incorrect results, and the applicability is poor. SUMMARY

[0005] The present application provides a measurement result recognition method and device of a digital instrument, which solves the defects in the prior art, realizes high efficiency and high precision of the digital instrument, and has strong applicability.

[0006] In a first aspect, the present application provides a measurement result recognition method of a digital instrument, comprising: extracting a display screen image of the digital instrument from a target scene gray-scale image according to preset template information; extracting a plurality of character images from the display screen image and determining the position of a decimal point relative to the plurality of character images; the character images comprising: a digital character image and a unit character image; inputting each character image into a character recognition model to output a recognition result of each character image; determining the measurement result of the digital instrument according to the recognition result of each character image and the position of the decimal point; the preset template information comprising a template image and template position data; wherein the template position data respectively comprises position information of the digital instrument and the display screen of the digital instrument in the template image.

[0007] According to the measurement result recognition method of the digital instrument provided by the present application, before extracting the display screen image of the digital instrument from the target scene gray-scale image according to the preset template information, the method further comprises: obtaining a target video containing the digital instrument; extracting a target scene image with the same size as the template image in the preset template information from the target video; and converting the target scene image into a target scene gray-scale image.

[0008] According to the measurement result recognition method of the digital instrument provided by the present application, the extracting of the display screen image of the digital instrument from the target scene gray-scale image according to the preset template information comprises: obtaining a digital instrument template image from the template image according to the position information of the digital instrument in the template image, and converting the digital instrument template image into a standard template gray-scale image; determining a digital instrument scene image from the target scene gray-scale image by performing feature matching on the standard template gray-scale image and the target scene gray-scale image; converting the digital instrument scene image into a digital instrument scene standard image with the same form as the standard template gray-scale image; and extracting the display screen image from the digital instrument scene standard image according to the position information of the display screen of the digital instrument in the template image.

[0009] According to the measurement result recognition method of the digital instrument provided by the present application, the extracting of the plurality of character images from the display screen image comprises: performing image processing on the display screen image to obtain a character contour on the display screen image; extracting the digital character image from the character contour in the order from left to right and from top to bottom; and extracting the unit character image from the character contour in the order from right to left.

[0010] The application provides a measurement result identification method of a digital instrument, which determines the position of a decimal point relative to a plurality of character images, comprising: obtaining pixel data between each digital character image; and determining the position of the decimal point relative to each digital character image according to the pixel data of the area between each digital character image.

[0011] The application provides a measurement result identification method of a digital instrument, wherein the character recognition model is a support vector machine; and the character recognition model is trained in advance using character image samples and sample labels corresponding to the character image samples.

[0012] The application provides a measurement result identification method of a digital instrument, wherein the standard template gray image and the target scene gray image are subjected to feature matching, specifically, the standard template gray image and the target scene gray image are subjected to feature matching using Orb feature points.

[0013] The application provides a measurement result identification method of a digital instrument, wherein the image form of the template image is that the imaging center is the shooting position, the shooting angle is a positive direction perpendicular to the digital instrument, the digital instrument is completely displayed in the template image, and the proportion of the digital instrument in the template image is greater than a preset threshold.

[0014] The application provides a measurement result identification method of a digital instrument, wherein the digital instrument is a digital resistance meter.

[0015] In a second aspect, the application further provides a measurement result identification device of a digital instrument, comprising:

[0016] A display screen image extraction module is configured to extract a display screen image of a digital instrument from a target scene gray image according to preset template information.

[0017] A character image extraction module is configured to extract a plurality of character images from the display screen image and determine the position of a decimal point relative to the plurality of character images; the character images comprise digital character images and unit character images.

[0018] A character image recognition module is configured to input each character image into a character recognition model and output the recognition result of each character image.

[0019] A measurement result determination module is configured to determine the measurement result of the digital instrument according to the recognition result of each character image and the position of the decimal point.

[0020] The preset template information comprises a template image and template position data; wherein the template position data respectively comprises the position information of the digital instrument and the display screen of the digital instrument in the template image.

[0021] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the measurement result identification method of any of the above digital meters when executing the program.

[0022] The present application only needs to set the template information simply, and does not need to use a large number of digital meter images to make the data set and the long training of the neural network, effectively reducing the time and effort spent on data processing and neural network training, shortening the cycle from the prototype design to the actual application of the product, enabling the user to use faster, high efficiency; at the same time, the present application supports setting the template information of a plurality of different models of digital meters to facilitate the user's different needs, and has strong applicability. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0024] Figure 1 is a flowchart of the measurement result identification method of the digital meter provided by the present application;

[0025] Figure 2 is a structural schematic diagram of the measurement result identification device of the digital meter provided by the present application;

[0026] Figure 3 is a structural schematic diagram of the electronic device provided by the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the present application more clear, the technical scheme in the present application will be described clearly and completely in the following by combining the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0028] It should be noted that in the description of the embodiments of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitation, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device comprising the element.

[0029] The following will be described in conjunction with Figures 1-3 The measurement result identification method and device of the digital instrument provided by the embodiments of the present application are described.

[0030] Figure 1 The flowchart of the measurement result identification method of the digital instrument provided by the present application is shown in FIG. 1, which includes but is not limited to the following steps: Figure 1

[0031] Step 101: Extract the display screen image of the digital instrument from the target scene gray scale image according to the preset template information.

[0032] The target scene gray scale image is a gray scale image containing the measurement result of the digital instrument to be identified. It can be understood that the target scene gray scale image can be obtained by manual shooting or from an existing video file, and the present embodiment is not limited in this regard.

[0033] The preset template information includes a template image and template position data. The template image uses an image captured by a camera or a video camera with a resolution of not less than 960*540, and the shooting angle of the template image is perpendicular to the digital instrument in the positive direction. The digital instrument needs to be completely captured in the template image and achieve the highest possible proportion, for example, greater than a preset threshold (such as 95%).

[0034] The template position data includes the position information of the digital instrument and the display screen of the digital instrument in the template image, respectively.

[0035] The digital instrument can be a digital resistance meter, a digital current meter, a digital voltage meter, etc. Various digital instruments with numerical display function. The present application mainly takes the digital resistance meter as an example to explain the technical solution.

[0036] The position information of the digital instrument and the display screen of the digital instrument can be obtained by manual framing. For example, the user can first manually frame the position of the digital instrument in the template image, and further frame the position of the display screen in the area where the digital instrument is located. Finally, the template image and the corresponding template position data are stored to obtain the preset template information in the present application.​

[0037] Step 102: extracting a plurality of character images from the display screen image, and determining the position of the decimal point relative to the plurality of character images.

[0038] The character images include: a numerical character image and a unit character image. The positions of the numerical character image, the unit character image and the decimal point are effective information for identifying the measurement result of the digital instrument.

[0039] Optionally, the present application can extract the corresponding character images according to the features of the numerical character contour and the unit character contour of the seven-segment LED tube by using an image recognition algorithm.

[0040] Since the position of the decimal point is in the middle and lower part of each number, the present application can focus on monitoring (image recognition) the middle and lower part of each numerical character image, so as to determine the position of the decimal point.

[0041] Step 103: inputting each character image into a character recognition model, and outputting the recognition result of each character image.

[0042] The character recognition model is trained in advance by using character image samples and sample labels corresponding to the character image samples.

[0043] Step 104: determining the measurement result of the digital instrument according to the recognition result of each character image and the position of the decimal point.

[0044] It can be understood that the display value of the digital instrument can be determined according to the recognition result of each numerical character image and the position of the decimal point; the measurement unit corresponding to the display value can be determined according to the character recognition result of the unit character image; and finally the measurement result of the digital instrument can be determined according to the display value and the corresponding unit.

[0045] For example, for a digital instrument (such as a digital resistance meter), the character recognition model is used to perform character recognition on a plurality of numerical character images respectively, and the recognition results are “1”, “2”, “3” and “4” in turn; the character recognition model is used to perform character recognition on the unit character image, and the recognition result is “Ω”; the image recognition technology is used to determine that the decimal point is located between the characters “2” and “3”; and finally the final recognition result of the digital resistance meter is 12.34Ω.

[0046] It should be noted that those skilled in the art can easily determine the order of the recognition results according to the position of the character image in the target scene gray image, and thus the order of the recognition results is not described here.

[0047] In addition, the present application does not make specific limitation on display precision and measurement range of the digital instrument, as long as the digital instrument has identifiable digital characters and unit characters according to the present application.

[0048] The present application only needs simple template information setting, and does not need to use a large number of digital instrument images to make data sets and long neural network training, effectively reducing the time and effort spent on data processing and neural network training, shortening the cycle from prototype design to practical application, enabling users to use faster, high efficiency; at the same time, the present application supports setting template information of multiple different models of digital instruments to facilitate users with different needs, and has strong applicability.

[0049] Based on the content of the above embodiment, as an optional embodiment, the present application also provides a digital instrument measurement result recognition method, before extracting the display screen image of the digital instrument from the target scene gray scale image according to the preset template information, further comprising: obtaining a target video containing a digital instrument; extracting a target scene image with the same size as the template image in the preset template information from the target video; and converting the target scene image into a target scene gray scale image.

[0050] The shooting of the target video needs to rely on a camera and other hardware devices, and the resolution of the video stream obtained by the device should not be lower than 960*540, and the imaging effect of the video data stream with too low quality is poor, which will have a certain influence on recognition. The present application can use OpenCV to read the video data stream shot by the camera frame by frame, save the video frame read by OpenCV as a target scene image, adjust the size of the image to 960*540, and convert it into a scene gray scale image (target scene gray scale image) for subsequent step processing.

[0051] The digital instrument measurement result recognition method provided by the present application embodiment can obtain the target scene image from the target video in real time, and convert the target scene image into a target scene gray scale image, which is convenient for subsequent processing and can also realize high real-time performance.

[0052] Based on the content of the above embodiment, as an optional embodiment, the application further provides a measurement result identification method of a digital instrument, which extracts a display screen image of a digital instrument from a target scene gray scale image according to preset template information, comprising: obtaining a digital instrument template image from the template image according to position information of the digital instrument in the template image, and converting the digital instrument template image into a standard template gray scale image; determining a digital instrument scene image from the target scene gray scale image by performing feature matching on the standard template gray scale image and the target scene gray scale image; converting the digital instrument scene image into a digital instrument scene standard image with the same image form as the standard template gray scale image; and extracting the display screen image from the digital instrument scene standard image according to the position information of the display screen of the digital instrument in the template image.

[0053] It should be noted that feature matching is a method for identifying objects in computer vision. It refers to using a computer to extract information from multiple images, calculating the data information around the pixel points on the image, and determining whether the pixel points in the image belong to an image feature according to the calculation result. After calculating the feature point information on different images, the calculated results are matched, and finally the similar feature point data on different images is obtained in the form of pairs.

[0054] The position information of the digital instrument and the display screen of the digital instrument in the template image can be determined according to the template position data in the preset template information; the image form of the standard template gray scale image is: a gray scale image, and the digital instrument is horizontally centered and fills the entire image. The specific implementation process of this embodiment is described below.

[0055] The application can crop a digital instrument template image from a template image according to preset template information, and the size of the digital instrument template image is adjusted to 960 pixels in height and 540 pixels in width. Then the digital instrument template image is converted into a gray scale image (i.e. a standard template gray scale image).

[0056] Alternatively, the application can also use a histogram equalization method to optimize the standard template gray scale image, and the specific process can be understood by those skilled in the art, which is not described here.

[0057] After completing the above template standardization operation, a matching algorithm is used to calculate the feature data of the digital instrument template image. The feature data includes a plurality of feature points and feature descriptors, and the feature points and the feature descriptors are one-to-one corresponding. The feature descriptor is used to describe the feature information contained by the feature point.

[0058] Correspondingly, the application further acquires feature data of the target scene gray image. Thus, the application uses the key points and feature descriptors of the target scene gray image and the key points and feature descriptors of the standard template gray image to perform matching calculation, obtains pixel point coordinates with high matching degrees, and calculates a homography matrix from the standard template gray image to the target scene gray image according to the matching pixel point coordinates. Finally, the homography matrix is used to locate the position of the digital resistance meter in the target scene gray image, so as to acquire the digital instrument scene image.

[0059] Only the homography matrix from the standard template gray image to the digital instrument scene image can be obtained through feature matching. Since the position and orientation of the digital instrument scene image are random, the application uses an inverse transformation to transform the digital instrument scene image into an image with the same image form as the standard template image. The matrix used in the inverse transformation is the inverse matrix of the homography matrix, and the digital instrument scene standard image can be obtained by using the matrix for transformation.

[0060] Since the coordinate positions of the display screen have been divided in the pre-set template position data, the coordinate positions are directly used to crop the digital instrument scene standard image, so that the display screen image can be obtained.

[0061] It can be understood that, in the traditional machine vision method for recognizing a digital resistance meter, the data on the liquid crystal display screen is often acquired by relying on fixed positions and angles, and then a seven-segment numeral tube segmentation method and a machine learning algorithm are used to recognize the image. However, this method has great limitations, and slight changes in the instrument can lead to incorrect recognition results. The application uses the feature matching method, greatly improves the recognition accuracy of the target instrument, and can obtain correct results in the case that the instrument is rotated, inclined and displaced. Meanwhile, the method can also support rapid replacement of the target instrument model and facilitate recognition of other types of digital instruments.

[0062] Based on the content of the above embodiment, as an optional embodiment, the application further provides a digital instrument measurement result recognition method. The standard template gray image and the target scene gray image are subjected to feature matching, specifically, the Orb feature points are used to perform feature matching on the standard template gray image and the target scene gray image.

[0063] That is, the application uses the Orb operator to calculate the feature points and feature descriptors in the standard template gray image and the target scene gray image. The following is a brief description thereof.

[0064] ORB (Oriented FAST and Rotated BRIEF) feature points are the combination of the detection method of FAST feature points and BRIEF feature descriptors, and improvements and optimizations are made on the basis of them.

[0065] ORB uses an optimized FAST algorithm to detect feature points. The definition of FAST feature points is based on the image gray value around the feature points. A circle of pixel values around the candidate feature point is detected. If there are enough pixel points in the field around the candidate point that are different enough from the gray value of the candidate point, the candidate point is considered a feature point. The selection of the radius of the circle around the candidate point is a very important parameter. Here, in order to be simple and efficient, a radius of 3 is used, and a total of 16 peripheral pixels need to be compared. Since the FAST algorithm extracted feature points do not have scale invariance, this leads to the inability to match the corresponding feature points after the image is scaled. In order to improve the shortcomings, ORB solves the scale invariance and rotation invariance through the pyramid and centroid calibration based on FAST, i.e., Oriented FAST.

[0066] The description of the feature points calculated by the above method contains the structure shown in the following table:

[0067] attribute name use angle Point direction, 0-360 degrees. class_id Cluster id. octave Image pyramid group where the point is located. pt Point coordinates response Degree of representation of the point as a feature point. size Feature point neighborhood diameter.

[0068] ORB uses an improved Rotated BRIEF algorithm to calculate the descriptor of a feature point. The BRIEF algorithm calculates a binary string feature descriptor. It selects n pairs of pixel points p i , q i (i = 1, 2, …, n) in the neighborhood of each feature point. Then, the gray values of each point pair are compared. If I(p i )>I(q i ), a 1 is generated in the binary string, otherwise a 0 is generated, I(p) represents a calculation function. All point pairs are compared, and a binary string of length n is generated. Generally, n is 128, 256 or 512, and n = 256 is used in this patent. Rotated BRIEF uses Steered BRIEF (rotation invariance improvement) and correlation of improved feature point descriptors to optimize the feature point descriptor.

[0069] After the feature points and feature descriptors of the standard template image and the target scene gray image are calculated, the two are matched. Since the feature descriptors are stored in 01 vectors with a length of 256, the difference between two vectors represents the similarity of the two, and the smaller the modulus is, the higher the similarity is. Therefore, the k nearest neighbor (k = 2) method can be used to calculate the two target scene gray image feature descriptors that are most similar to the standard template image and the descriptors, and all the two most similar feature descriptors are calculated in turn.

[0070] The matching results need to be further screened to obtain the optimal results. The principle used is that the feature descriptor of the standard template image is m, the two nearest scene image feature descriptors are n1 and n2, and according to the previous nearest distance matching principle, there is ||n1|| < ||n2||. Then, only when n1 and n2 are similar enough, n1 can be considered as an effective feature matching point, otherwise, n1 and n2 are similar to m, and such results are mostly invalid results.

[0071] After the high-quality matching results are screened, the feature point pixel positions of the descriptors are indexed from the feature descriptors, and the projection matrix (i.e., the homography matrix) from the standard template gray image to the target scene gray image can be calculated through the point set. The matrix can be used to mark the position of the digital resistance table in the scene image. The inverse matrix of the projection matrix can be calculated to convert the inclined and rotated digital resistance table image (i.e., the digital instrument scene image) in the scene into an image consistent with the image form of the standard template image, i.e., a digital instrument scene standard image with a forward vertical direction and an occupancy ratio greater than 95%. Then, the digital resistance table display screen image can be obtained by using the template information for cutting.

[0072] Based on the content of the above embodiment, as an optional embodiment, the application further provides a digital instrument measurement result recognition method. A plurality of character images are extracted from the display screen image, including: performing image processing on the display screen image to obtain character contours on the display screen image; extracting the digital character images from the character contours in a left-to-right and top-to-bottom order; and extracting the unit character images from the character contours in a right-to-left order.

[0073] Specifically, the display screen image is subjected to Otsu binarization, dilation and erosion image morphological operation and other pretreatments to remove noise on the screen and make it have a larger contrast and clear distinguishability.

[0074] In the embodiment, the character contour on the display screen image can be extracted by using the existing image recognition algorithm. Further, the segmented digital character image is screened from the contour in the order from left to right and from top to bottom and in accordance with the feature of the liquid crystal display seven-segment tube. In the case that the unit of the digital instrument is displayed on the right side of the screen, the image of the unit of measurement is screened from the character contour in the order from right to left. The subsequent use of the character recognition model to recognize the digital image and the unit character image can obtain the final result.

[0075] The measurement result recognition method of the digital instrument provided in the embodiment combines the distribution characteristics of the effective information on the digital instrument, extracts the character image in the preset order, and makes the character extraction process more reasonable, thereby effectively improving the extraction efficiency of the character image.

[0076] Based on the content of the above embodiment, as an optional embodiment, the application further provides a measurement result recognition method of a digital instrument, which determines the position of a decimal point relative to a plurality of character images, comprising: obtaining pixel data between each digital character image; and determining the position of the decimal point relative to each digital character image according to the pixel data of the area between each digital character image.

[0077] Specifically, the position of the decimal point is calculated according to the proportion of black pixel values in the area between each digital character image. The area with the largest proportion of black pixel values is the position of the decimal point.

[0078] Based on the content of the above embodiment, as an optional embodiment, the application further provides a measurement result recognition method of a digital instrument, wherein the character recognition model is a support vector machine; and the character recognition model is trained in advance by using character image samples and sample labels corresponding to the character image samples.

[0079] The support vector machine (SVM) is a generalized linear classifier for classifying data in a supervised learning manner, and has great advantages in solving small and medium-sized data sets. After considering the number of characters recognized by the support vector machine and the actual test, it is finally determined to use a linear kernel to calculate the hyperplane, and the effect of the linear kernel is better than that of other kernels. The training process of the support vector machine is described in combination with specific embodiments.

[0080] The application uses the data set of common liquid crystal displays and seven-segment tubes collected on the Internet to extract the required character images. Further, the application can also use software programs to generate some required character images to make up for the shortage of the Internet search data set, so that the training data used by the support vector machine is more sufficient, and the recognition accuracy of the support vector machine is further improved.

[0081] Since the formats and sizes of the character images obtained from the Internet are different, the character images need to be converted to a uniform format before being provided to the support vector machine for training. The present application can convert all the character images to binary images with only black and white, and then convert the resolution of the images to images with a height of 128 pixels and a width of 64 pixels. Finally, all the images are subjected to a data set enhancement method, including rotation, scaling and noise operations, to obtain the character image samples required by the present application.

[0082] The present application can convert the character image samples to one-dimensional data of a preset length, train and test the support vector machine according to an 8:2 ratio of training set to test set, and obtain a character recognition model. Alternatively, the type of the support vector machine can be a conventional C_SVC type, and the main parameters of the support vector machine are set as follows: linear kernel and penalty coefficient of 2.67.

[0083] In summary, the support vector machine has the characteristics of multi-classification, fast recognition speed and friendly support for small and medium-sized data sets. The present application selects the support vector machine as the character recognition model for character recognition (the number of character types on the liquid crystal display screen of the digital instrument is small), which can further effectively improve the accuracy and efficiency of character recognition.

[0084] Figure 2 is a structural schematic diagram of a measurement result recognition device of a digital instrument provided by the present application, as shown in Figure 2 The device comprises a display screen image extraction module 201, a character image extraction module 202, a character image recognition module 203 and a measurement result determination module 204.

[0085] The display screen image extraction module 201 is configured to extract the display screen image of the digital instrument from the target scene gray-scale image according to preset template information.

[0086] The character image extraction module 202 is configured to extract a plurality of character images from the display screen image and determine the position of the decimal point relative to the plurality of character images; the character images include digital character images and unit character images.

[0087] The character image recognition module 203 is configured to input each character image into a character recognition model and output the recognition result of each character image.

[0088] The measurement result determination module 204 is configured to determine the measurement result of the digital instrument according to the recognition result of each character image and the position of the decimal point.

[0089] The preset template information includes a template image and template position data; the template position data includes the position information of the digital instrument and the display screen of the digital instrument in the template image, respectively.

[0090] It should be noted that the measurement result identification device of the digital instrument provided by the embodiment of the present application can execute the measurement result identification method of the digital instrument described in any of the above embodiments in specific operation, and the embodiment will not be repeated here.

[0091] Figure 3 is a structural schematic diagram of an electronic device provided by the present application, as Figure 3 shown, the electronic device can include a processor 310, a communications interface 320, a memory 330 and a communications bus 340, wherein the processor 310, the communications interface 320 and the memory 330 complete mutual communication through the communications bus 340. The processor 310 can call the logical instructions in the memory 330 to execute the measurement result identification method of the digital instrument, which includes: extracting the display screen image of the digital instrument from the target scene gray scale image according to the preset template information; extracting a plurality of character images from the display screen image and determining the position of the decimal point relative to the plurality of character images; the character images include: digital character images and unit character images; inputting each character image into a character recognition model to output the recognition result of each character image; determining the measurement result of the digital instrument according to the recognition result of each character image and the position of the decimal point; the preset template information includes template images and template position data; wherein the template position data respectively includes the position information of the digital instrument and the display screen of the digital instrument in the template image.

[0092] In addition, the logical instructions in the memory 330 described above can be implemented in the form of a software functional unit and sold or used as an independent product when used, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0093] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method for identifying a measurement result of a digital instrument provided by any of the above embodiments, the method comprising: extracting a display screen image of the digital instrument from a target scene gray-scale image according to preset template information; extracting a plurality of character images from the display screen image and determining a position of a decimal point relative to the plurality of character images; the character images comprising: a digital character image and a unit character image; inputting each character image into a character recognition model to output an identification result of each character image; determining the measurement result of the digital instrument according to the identification result of each character image and the position of the decimal point; the preset template information comprising a template image and template position data; wherein the template position data respectively comprises position information of the digital instrument and the display screen of the digital instrument in the template image.

[0094] In another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method for identifying a measurement result of a digital instrument provided by any of the above embodiments, the method comprising: extracting a display screen image of the digital instrument from a target scene gray-scale image according to preset template information; extracting a plurality of character images from the display screen image and determining a position of a decimal point relative to the plurality of character images; the character images comprising: a digital character image and a unit character image; inputting each character image into a character recognition model to output an identification result of each character image; determining the measurement result of the digital instrument according to the identification result of each character image and the position of the decimal point; the preset template information comprising a template image and template position data; wherein the template position data respectively comprises position information of the digital instrument and the display screen of the digital instrument in the template image.

[0095] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0096] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0097] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for recognizing measurement results from a digital instrument, characterized in that, include: Based on the preset template information, extract the display screen image of the digital instrument from the grayscale image of the target scene; Multiple character images are extracted from the display screen image, and the position of the decimal point relative to the multiple character images is determined; the character images include: numeric character images and unit character images; Each character image is input into the character recognition model, and the recognition result of each character image is output. The measurement result of the digital instrument is determined based on the recognition result of each character image and the position of the decimal point; The preset template information includes a template image and template position data; wherein, the template position data includes the position information of the digital instrument and the display screen of the digital instrument in the template image; The step of extracting the display screen image of the digital instrument from the grayscale image of the target scene according to the preset template information includes: Based on the position information of the digital instrument in the template image, a digital instrument template image is obtained from the template image, and the digital instrument template image is converted into a standard template grayscale image; the standard template grayscale image is in the form of a grayscale image, and the digital instrument is horizontally centered and fills the entire image; By performing feature matching between the standard template grayscale image and the target scene grayscale image, a digital instrument scene image is determined from the target scene grayscale image; The digital instrument scene image is converted into a standard digital instrument scene image with the same image format as the standard template grayscale image; Based on the position information of the digital instrument's display screen in the template image, the display screen image is extracted from the digital instrument scene standard image; Feature matching is performed between the standard template grayscale image and the target scene grayscale image, specifically as follows: The standard template grayscale image and the target scene grayscale image are matched using Orb feature points.

2. The method for recognizing measurement results of a digital instrument according to claim 1, characterized in that, Before extracting the digital instrument display image from the grayscale image of the target scene based on preset template information, the process also includes: Acquire the target video containing digital meters; Extract a target scene image from the target video that has the same size as the template image in the preset template information; The target scene image is converted into a grayscale image of the target scene.

3. The method for recognizing measurement results of a digital instrument according to claim 1, characterized in that, Extracting multiple character images from the display screen image, including: Perform image processing on the display screen image to obtain the character outlines on the display screen image; The digital character image is extracted from the character outline in a left-to-right, top-to-bottom order; and, The unit character image is extracted from the character outline in a right-to-left order.

4. The method for recognizing measurement results of a digital instrument according to claim 1, characterized in that, Determining the position of the decimal point relative to multiple character images includes: Obtain pixel data between the images of each numeric character; The position of the decimal point relative to each of the digit character images is determined based on the pixel data of the regions between each digit character image.

5. The method for recognizing measurement results of a digital instrument according to claim 1, characterized in that, The character recognition model is a support vector machine; the character recognition model is trained in advance using character image samples and the corresponding sample labels of the character image samples.

6. The method for recognizing measurement results of a digital instrument according to claim 1, characterized in that, The template image has the following characteristics: the shooting position is at the center of the image, the shooting angle is perpendicular to the digital instrument, the digital instrument is fully displayed in the template image, and the proportion of the digital instrument in the template image is greater than a preset threshold.

7. The method for recognizing measurement results of a digital instrument according to claim 1, characterized in that, The digital instrument is a digital resistance meter.

8. A measurement result recognition device for a digital instrument, characterized in that, A method for recognizing measurement results of a digital instrument according to any one of claims 1 to 7 includes: The display screen image extraction module is used to extract the display screen image of the digital instrument from the grayscale image of the target scene according to the preset template information; A character image extraction module is used to extract multiple character images from the display screen image and determine the position of the decimal point relative to the multiple character images; the character images include: numeric character images and unit character images; The character image recognition module is used to input each character image into the character recognition model and output the recognition result of each character image; The measurement result determination module is used to determine the measurement result of the digital instrument based on the recognition result of each character image and the position of the decimal point; The preset template information includes a template image and template position data; wherein, the template position data includes the position information of the digital instrument and the display screen of the digital instrument in the template image.

Citation Information

Patent Citations

  • Automatic recognition method for meter based on machine vision

    CN107967471A

  • Character detection and recognition method for various types of digital display instruments

    CN115116071A