Instrument screen reading method and equipment based on image recognition technology
By taking and processing photos of the instrument display screen, combined with OCR recognition technology, a data recognition template is established, which solves the problem of data meaning orientation in the data recognition of special instrument display screens, and realizes automatic recognition and matching, improving recognition efficiency and accuracy.
Patent Information
- Application Number
- CN202411980317.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-27
AI Technical Summary
The existing OCR recognition technology is difficult to define the objects and corresponding conditions described by each data in batches on the display screen of special scientific instruments, resulting in the lack of scientific significance of the identified data and requires manual editing.
By taking photos of the instrument display screen, recording the pixel coordinates of the display frame, establishing a conversion function from the pixel coordinate system to the target coordinate system, combining the character values and pixel coordinate values recognized by OCR, a data recognition template is generated to achieve automatic data recognition and matching.
It realizes automatic identification and matching of special instrument display data, solves the problem of data meaning orientation, improves the accuracy and efficiency of data recognition, and reduces the need for manual editing.
Smart Images

Figure CN120047932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an instrument screen reading method and device based on image recognition technology. Background Art
[0002] Existing OCR recognition technology focuses on dealing with two problems. One is the text recognition problem; the other is the layout analysis (or table recognition) problem. In applications, pictures can be taken with a mobile phone to obtain the characters in the picture and list them in a certain layout. This is sufficient to meet the requirements in many daily applications, but it is not enough in some special usage scenarios.
[0003] In some occasions where high-end scientific instruments are often used, such as physical experiments, chemical experiments, etc., problems of detecting data collection always occur. Due to some technical or commercial reasons, the conclusion data of the instrument can sometimes only be displayed on the screen and manually recorded on another medium, rather than directly output in the form of API or file export. If the data content can be obtained by OCR recognition at this time, the accuracy and efficiency of professional work can be improved to a certain extent. However, there is a key unsolved problem in existing OCR recognition technology:
[0004] The problem of data directivity, that is, batch determination of what the object and corresponding conditions described by each data are. For example, Figure 1 It means that the "recall rate" of "OTSU" is "63.84%". In the display recognition of special instruments, in addition to recognizing text and table layouts, it is also necessary to determine the meaning direction of each table data. This can make the recognized data have scientific significance. Otherwise, the problem of manual editing cannot be avoided and no substantial help can be provided. Summary of the Invention
[0005] The purpose of the present invention is to provide an instrument screen reading method and device based on image recognition technology.
[0006] To solve the above problems, the present invention provides an instrument screen reading method based on image recognition technology, including:
[0007] Step S1, take a photo of the display screen with data, variable names and display screen borders of the conclusion data of the instrument display screen to be recognized;
[0008] Step S2, record the starting pixel coordinates and ending pixel coordinates of each side of the display screen border with the pixel coordinates of the display screen photo;
[0009] Step S3, based on the starting pixel coordinates and ending pixel coordinates of the four sides of the display screen border, obtain the first conversion function p 0 (x,y);
[0010] Step S4. Based on each character value range and the corresponding pixel coordinate values in the display screen photo returned by OCR recognition, obtain the corresponding pixel data group m;
[0011] Step S5. Use the first conversion function p 0 (x, y) to convert the pixel data group m to the target coordinate values and form a data recognition template mt. The data recognition template mt includes: the target coordinate values of the variable name, the target coordinate values of the data value, and the corresponding vector values;
[0012] Step S6. Obtain the instance data group L of the one-dimensional coordinate sequence of the instance photo of the instrument display screen to be recognized;
[0013] Step S7. Based on the instance data group L of the one-dimensional coordinate sequence and the data recognition template mt, obtain the data value and variable name corresponding to the instance photo.
[0014] Further, in the above method, in Step S2, based on the starting pixel coordinates and the ending pixel coordinates, the pixel point coordinates of the four sides of the display screen photo are in the form of 4 pairs of coordinate values. The 4 pairs of coordinate values are respectively denoted as:
[0015]
[0016] Among them, (px 1-0 py 1-0 ) is the starting pixel coordinate of the first side of the display screen border, and (px 1-1 py 1-1 ) is the ending pixel coordinate of the first side;
[0017] (px 2-0 py 2-0 ) is the starting pixel coordinate of the second side of the display screen border, and (px 2-1 py 2-1 ) is the ending pixel coordinate of the second side;
[0018] (px 3-0 py 3-0 ) is the starting pixel coordinate of the third side of the display screen border, and (px 3-1 py 3-1 ) is the ending pixel coordinate of the third side;
[0019] (px 4-0 py 4-0 ) is the starting pixel coordinate of the fourth side of the display screen border, and (px 4-1 py 4-1 ) is the ending pixel coordinate of the fourth side.
[0020] Further, in the above method, in step S3, based on the starting pixel coordinates and ending pixel coordinates of the four sides of the display screen border, a first conversion function from the pixel coordinate system to the target coordinate system is obtained, denoted as p 0 (x, y), including:
[0021] Based on the starting pixel coordinates and ending pixel coordinates of the four sides of the display screen border, four plane straight lines are obtained. The intersections of the four plane straight lines are calculated to obtain the corresponding four corner point coordinates. The corner point closest to the origin of the pixel point coordinates is selected as the origin of the target coordinate system. Since the screen is commonly rectangular, two straight lines passing through the origin of this target coordinate system are selected as the x and y axes. Through the plane coordinate transformation formula, the first conversion function from the pixel coordinate system to the target coordinate system can be obtained, denoted as p 0 (x, y).
[0022] Further, in the above method, in step S4, based on each character value range in the display screen photo returned by OCR recognition and the corresponding pixel coordinate values of each character value range, a corresponding pixel data group m is obtained, including:
[0023] Based on each character value range in the display screen photo returned by OCR recognition and the corresponding pixel coordinate values of each character value range, where each character value range corresponds to a data value or a variable name; calculate the average coordinate value of the pixel points within each character range; based on the average coordinate value of the pixel points within each character range, calculate the vector value of the variable name pointed to by the data value;
[0024] Group and record the average coordinate value of the pixel points of the data value, the average coordinate value of the pixel points of the variable name text, and the vector value of the corresponding data value pointing to the variable name to obtain the pixel data group m, where the starting point of the vector value is the data value and the ending point of the vector value is the variable name.
[0025] Further, in the above method, the pixel data group m is represented as follows:
[0026]
[0027] Among them, the first column (x n-0 y n-0 ) in the pixel data group m is the average coordinate value of the variable name, the second column (x n-1 y n-1 ) is the average coordinate value of the data value, and the third column is the corresponding vector value (vx n vy n );
[0028] 0 represents the end point, and 1 represents the starting point;
[0029] n represents the serial number of the vector value.
[0030] Further, in the above method, the data recognition template mt is expressed as follows:
[0031]
[0032] Among them, the first column (xt n-0 yt n-0 ) is the target coordinate value of the variable name, the second column (xt n-1 yt n-1 ) is the target coordinate value of the data value, and the third column is the corresponding vector value (vxt n vyt n ).
[0033] Further, in the above method, in step S6, obtaining the instance data group L of the one-dimensional coordinate sequence of the instance photo of the instrument display screen to be recognized includes:
[0034] Step S61, photographing and inputting the instance photo of the instrument display screen to be recognized, where the instance photo covers the display screen border and conclusion data and is clearly displayed;
[0035] Step S62, using the same method as in steps S2 and S3, obtaining the second conversion function from the pixel coordinate system to the target coordinate system of the instance photo, denoted as p 1 (x, y);
[0036] Step S63, based on each character value range and the pixel coordinate value corresponding to each character value in the instance photo returned by OCR recognition, where each character value corresponds to a data value or a variable name; calculating the average coordinate value of the pixel points within each character range, and using the conversion function p 1 (x, y) to convert the average coordinate value of the pixel points into the target coordinate value to obtain the instance data group L of the one-dimensional coordinate sequence. The instance data group L is expressed as:
[0037]
[0038] Among them, (XT n YT n ) represents the target coordinate value of the nth character value range in the instance photo.
[0039] Further, in the above method, in step S7, based on the instance data group L of the one-dimensional coordinate sequence and the data recognition template mt, obtaining the data value and variable name corresponding to the instance photo includes:
[0040] Step S71: Compare each target coordinate value in the instance data group L with the coordinate values in the first two columns of the data recognition template mt, i.e., the target coordinate values of variable names or the target coordinate values of data values. When the error between the coordinate value of a certain target coordinate value and the target coordinate value of the variable name or the target coordinate value of the data value in the data recognition template mt is less than the preset threshold, then match the corresponding variable name or data value in the data recognition template mt for this target coordinate value as the data value and variable name in the instance photo;
[0041] Step S72: After each target coordinate value in the instance data group L is matched, calculate the vector value formed by the combined data value and variable name of the instance photo. When this combined vector value is consistent with a certain vector value in the data recognition template mt, and the data value at the starting point and the variable name at the ending point of the combined vector value are consistent with a certain vector value in the data recognition template mt and match, it is determined that the match is successful. Then, use the data value corresponding to the starting point of the corresponding vector value in the data recognition template mt as the data value corresponding to the instance photo, and use the variable name corresponding to the ending point of the corresponding vector value in the data recognition template mt as the variable name corresponding to the instance photo.
[0042] According to another aspect of the present invention, there is provided a computer-readable storage medium having computer-executable instructions stored thereon, wherein when the computer-executable instructions are executed by a processor, the processor is caused to: execute the method described in any one of the above.
[0043] According to another aspect of the present invention, there is provided a calculator device, which includes:
[0044] a processor; and
[0045] a memory arranged to store computer-executable instructions, and when the executable instructions are executed, the processor is caused to: execute the method described in any one of the above.
[0046] Compared with the prior art, the existing OCR technology does not solve the problem of the meaning orientation of the recognized data. Based on the existing OCR technology, the present invention realizes it through the superposition of data processing by returning the recognized character values and the pixel coordinate values of the recognizable range of the picture by OCR. The present invention is low-cost and repeatable, and has a simple operation. It can assign variables to each recognized data, can batch process the problem of the meaning orientation of the data after the recognition of the display content of special instruments, and realizes true fast data recognition and processing.
[0047] In addition, the present invention can circumvent the technical barriers of data transmission. The present invention can quickly obtain the output data of some special devices without the need for API authorization, achieving simple operations. Data can be automatically obtained and matched only by taking a photo with a mobile phone, and the implementation cost is low. There are a large number of open-source resources for OCR, and the object can be achieved by integrating the algorithm of the present invention internally. Description of the Drawings
[0048] Figure 1 It is a schematic diagram of the conclusion data table displayed on the screen of the instrument according to an embodiment of the present invention. Detailed Embodiment
[0049] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0050] As Figure 1 shown, the present invention provides a method for reading the screen of an instrument based on image recognition technology, including:
[0051] Step S1, calibrating the data recognition template: For the display screen of the conclusion data of the instrument display screen to be recognized, take a photo of the display screen with data, variable names, and the display screen border to construct the recognition template, which needs to be able to clearly display all the required content;
[0052] Step S2, marking the display screen border in the display screen photo: Record the starting pixel coordinates and ending pixel coordinates of each side of the display screen border with the pixel coordinates of the display screen photo. Based on the starting pixel coordinates and ending pixel coordinates, obtain the pixel coordinates of the four sides of the display screen photo in the form of 4 pairs of coordinate values, and the 4 pairs of coordinate values are respectively recorded as:
[0053]
[0054] Among them, (px 1-0 py 1-0 ) is the starting pixel coordinate of the first side of the display screen border, and (px 1-1 py 1-1 ) is the ending pixel coordinate of the first side;
[0055] (px 2-0 py 2-0 ) is the starting pixel coordinate of the second side of the display screen border, and (px 2-1 py 2-1 ) is the ending pixel coordinate of the second side;
[0056] (px 3-0 py 3-0 ) is the starting pixel coordinate of the third side of the display screen border, and (px 3-1py 3-1 ) is the end pixel coordinate of the third side;
[0057] (px 4-0 py 4-0 ) is the starting pixel coordinate of the fourth side of the display screen border, and (px 4-1 py 4-1 ) is the end pixel coordinate of the fourth side;
[0058] Step S3, based on the starting pixel coordinates and end pixel coordinates of the four sides of the display screen border, obtain the first conversion function from the pixel coordinate system to the target coordinate system, denoted as p 0 (x, y): Based on the starting pixel coordinates and end pixel coordinates of the four sides of the display screen border, obtain 4 plane straight lines, find the intersections of the four plane straight lines to obtain the corresponding 4 corner point coordinates; select the corner point closest to the origin of the pixel point coordinates as the origin of the target coordinate system. Since the screen is usually rectangular, select the two straight lines passing through the origin of this target coordinate system as the x and y axes; through the plane coordinate transformation formula, obtain the first conversion function from the pixel coordinate system to the target coordinate system, denoted as p 0 (x, y);
[0059] Step S4, based on each character value range in the display screen photo returned by OCR recognition and the pixel coordinate values corresponding to each character value range, obtain the corresponding pixel data group m: Based on each character value range in the display screen photo returned by OCR recognition and the pixel coordinate values corresponding to each character value range, where each character value range corresponds to a data value or a variable name; calculate the average coordinate value of the pixel points within each character range; based on the average coordinate value of the pixel points within each character range, calculate the vector value of the variable name pointed to by the data value;
[0060] Group and record the average coordinate value of the pixel points of the data value, the average coordinate value of the pixel points of the variable name text, and the vector value of the variable name pointed to by the corresponding data value to obtain the pixel data group m, where the starting point of the vector value is the data value and the end point of the vector value is the variable name:
[0061]
[0062] Among them, the first column (x n-0 y n-0 ) in the pixel data group m is the average coordinate value of the variable name, the second column (x n-1 y n-1 ) is the average coordinate value of the data value, and the third column is the corresponding vector value (vx n vy n );
[0063] 0 represents the end point, and 1 represents the starting point;
[0064] n represents the serial number of the vector value.
[0065] Here, as Figure 1 shown, the data value is, for example, a specific numerical value in a table such as 50.67% or 63.84%, and the variable name is, for example, the first column (such as OTSU, etc.) and the first row (such as recall rate, etc.) in the table. n represents the serial number of the arrow. There are two arrows in each row of the figure, where one arrow points to the left and one arrow points upward.
[0066] The vector value is a red arrow in the horizontal or vertical direction. The starting point of the arrow is the data value, and the ending point of the arrow is the variable name. (vx 1 vy 1 ) represents Figure 1 the vector value of the red horizontal arrow in 2 vy 2 ) represents Figure 1 the vector value of the red vertical arrow in
[0067] Step S5, based on the first conversion function p 0 (x, y), obtain the data recognition template mt corresponding to the pixel data group m: Use the first conversion function p 0 (x, y) to convert the pixel data group m to the target coordinate values and form the data recognition template mt, including: the target coordinate values of the variable name, the target coordinate values of the data value, and the corresponding vector value;
[0068]
[0069] Among them, the first column (xt n-0 yt n-0 ) is the target coordinate value of the variable name, the second column (xt n-1 yt n-1 ) is the target coordinate value of the data value, and the third column is the corresponding vector value (vxt n vyt n ).
[0070] Step S6, obtain the instance data group L of the one-dimensional coordinate sequence of the instance photo of the instrument display screen to be recognized;
[0071] Step S61, photograph and input the instance photo of the instrument display screen to be recognized. The instance photo covers the display screen border and the conclusion data and is clearly shown;
[0072] Step S62, use the same method as in steps S2 and S3 to obtain the second conversion function from the pixel coordinate system to the target coordinate system of the instance photo, denoted as p 1 (x, y);
[0073] Step S63: Based on each character value range and the pixel coordinate value corresponding to each character value in the instance photo returned by OCR recognition, where each character value corresponds to a data value or a variable name; calculate the average coordinate value of the pixel points within each character range, and use the conversion function p 1 (x, y) to convert the average coordinate value of the pixel points into a target coordinate value, so as to obtain an instance data group L of a one-dimensional coordinate sequence. The instance data group L is expressed as:
[0074]
[0075] where, (XT n YT n ) represents the target coordinate value of the nth character value range in the instance photo.
[0076] Step S7: Based on the instance data group L of the one-dimensional coordinate sequence and the data recognition template mt, obtain the data value and variable name corresponding to the instance photo;
[0077] Step S71: Compare each target coordinate value in the instance data group L with the coordinate values in the first two columns of the data recognition template mt, that is, the target coordinate value of the variable name or the target coordinate value of the data value. When the error between the coordinate value of a certain target coordinate value and the target coordinate value of the variable name or the target coordinate value of the data value in the data recognition template mt is less than the preset threshold, then match the variable name or data value corresponding to the target coordinate value in the data recognition template mt as the data value and variable name in the instance photo;
[0078] Step S72: After each target coordinate value in the instance data group L is matched, calculate the vector value composed of the data value and variable name corresponding to the instance photo. When the combined vector value is consistent with a certain vector value in the data recognition template mt, and the data value at the starting point and the variable name at the ending point of the combined vector value are consistent with a certain vector value in the data recognition template mt and match, it is determined that the match is successful. Then, use the data value corresponding to the starting point of the corresponding vector value in the data recognition template mt as the data value corresponding to the instance photo, and use the variable name corresponding to the ending point of the corresponding vector value in the data recognition template mt as the variable name corresponding to the instance photo.
[0079] According to another aspect of the present invention, there is provided a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor is caused to: execute the method described in any one of the above.
[0080] According to another aspect of the present invention, there is provided a calculator device, which includes:
[0081] a processor; and
[0082] A memory arranged to store computer-executable instructions that, when executed, cause the processor to: execute the method according to any one of the above.
[0083] In summary, the existing OCR technology does not solve the problem of the semantic reference of the recognized data. Based on the existing OCR technology, the present invention realizes it by superimposing data processing through the character values recognized by OCR and the pixel coordinate values of the recognizable range of the picture. The present invention is low-cost and repeatable, and has a simple operation. It can assign variables to each recognized data, and can batch process the problem of the semantic reference of the data after recognizing the display content of special instruments, realizing true fast data recognition and processing.
[0084] In addition, the present invention can circumvent the technical barriers of data transmission. The present invention does not require API authorization and licensing, and can quickly obtain the output data of some special devices. It realizes a simple operation. The data can be automatically obtained and matched only by taking a photo with a mobile phone. The implementation cost is low. There are a large number of open-source resources for OCR. By integrating the algorithm of the present invention internally, the purpose can be achieved.
[0085] For the detailed content of the system embodiments of the present invention, reference may specifically be made to the corresponding parts of the method embodiments, which will not be elaborated herein.
[0086] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments may be referred to each other.
[0087] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0088] Obviously, those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. An instrument screen reading method based on image recognition technology, characterized in that: include: Step S1, the display screen of the conclusion data of the display screen of the instrument to be identified, taking a photo of the display screen with data, variable names and display screen border; Step S2, recording the starting pixel coordinates and the ending pixel coordinates of each edge of the display screen frame using the pixel coordinates of the display screen photo; Step S3, obtaining a first conversion function p0(x, y) from a pixel coordinate system to a target coordinate system based on the starting pixel coordinates and the ending pixel coordinates of the four sides of the display screen frame; Step S4, obtaining a corresponding pixel data group m based on each character value range in the display screen photo returned by OCR recognition and the pixel coordinate value corresponding to each character value range; Step S5, using the first conversion function p0(x, y), converting the pixel data group m to the target coordinate value, and forming a data recognition template mt, the data recognition template mt includes: the target coordinate value of the variable name, the target coordinate value of the data value and the corresponding vector value; Step S6, obtaining an instance data set L of a single-dimensional coordinate sequence of an instance photo of the instrument display screen to be identified; Step S7, based on the instance data group L of the single-dimensional coordinate sequence and the data recognition template mt, obtain the data value and variable name corresponding to the instance photo.
2. The instrument screen reading method based on image recognition technology as claimed in claim 1, characterized in that: In step S2, based on the starting pixel coordinates and the ending pixel coordinates, the pixel coordinates of the four sides of the display screen photo are obtained in the form of four pairs of coordinate values, and the four pairs of coordinate values are recorded as follows: Among them, (px 1-0 py 1-0 ) is the starting pixel coordinate of the first edge of the display frame, (px 1-1 py 1-1 ) is the ending pixel coordinate of the first edge; (px 2-0 py 2-0 ) is the starting pixel coordinate of the second edge of the display frame, (px 2-1 py 2-1 ) is the ending pixel coordinate of the second edge; (px 3-0 py 3-0 ) is the starting pixel coordinate of the third side of the display frame, (px 3-1 py 3-1 ) is the ending pixel coordinate of the third edge; (px 4-0 py 4-0 ) is the starting pixel coordinate of the fourth side of the display frame, (px 4-1 py 4-1 ) is the ending pixel coordinate of the fourth edge.
3. The instrument screen reading method based on image recognition technology as claimed in claim 1, characterized in that: Step S3, based on the starting pixel coordinates and the ending pixel coordinates of the four sides of the display screen frame, obtain a first conversion function from the pixel coordinate system to the target coordinate system, denoted as p0(x, y), including: Based on the starting pixel coordinates and ending pixel coordinates of the four sides of the display screen frame, four plane straight lines are obtained, and the intersection of the four plane straight lines is obtained to obtain the corresponding four corner point coordinates; the corner point closest to the origin of the pixel point coordinates is selected as the origin of the target coordinate system, and two straight lines passing through the origin of the target coordinate system are selected as the x and y axes; through the plane coordinate transformation formula, the first conversion function from the pixel coordinate system to the target coordinate system can be obtained, which is recorded as p0(x,y).
4. The instrument screen reading method based on image recognition technology as claimed in claim 1, characterized in that: Step S4, based on each character value range in the display screen photo returned by OCR recognition and the pixel coordinate value corresponding to each character value range, obtain the corresponding pixel data group m, including: Based on each character value range in the display screen photo returned by OCR recognition and the pixel coordinate value corresponding to each character value range, wherein each character value range corresponds to a data value or a variable name; calculating the average coordinate value of the pixel points within each character range; based on the average coordinate value of the pixel points within each character range, calculating the vector value of the variable name pointed to by the data value; The average coordinate value of the pixel points of the data value, the average coordinate value of the pixel points of the variable name text and the vector value pointing to the variable name corresponding to the data value are recorded in groups to obtain the pixel data group m, wherein the starting point of the vector value is the data value and the end point of the vector value is the variable name.
5. The instrument screen reading method based on image recognition technology as claimed in claim 4, characterized in that: The pixel data group m is represented as follows: Among them, the first column (x n-0 y n-0 ) is the average coordinate value of the variable name, and the second column (x n-1 y n-1 ) is the average coordinate value of the data value, and the third column is the corresponding vector value (vx n vy n ); 0 represents the end point, 1 represents the starting point; n represents the sequence number of the vector value.
6. The instrument screen reading method based on image recognition technology as claimed in claim 1, characterized in that: The data identification template mt is expressed as follows: Among them, the first column (xt n-0 yt n-0 ) is the target coordinate value of the variable name, and the second column (xt n-1 yt n-1 ) is the target coordinate value of the data value, and the third column is the corresponding vector value (vxt n vyt n ).
7. The instrument screen reading method based on image recognition technology as claimed in claim 1, characterized in that: Step S6, obtaining an instance data set L of a single-dimensional coordinate sequence of an instance photo of the instrument display screen to be identified, including: Step S61, taking and inputting an example photo of the display screen of the instrument to be identified, wherein the example photo includes the display screen frame and conclusion data and is displayed clearly; Step S62, using the same method as steps S2 and S3, obtain a second conversion function of the instance photo from the pixel coordinate system to the target coordinate system, recorded as p1(x, y); Step S63, based on each character value range in the example photo returned by OCR recognition and the pixel coordinate value corresponding to each character value, wherein each character value corresponds to a data value or a variable name; calculate the average coordinate value of the pixel points within each character range, and use the conversion function p1(x, y) to convert the average coordinate value of the pixel points into the target coordinate value, so as to obtain an example data group L of a single-dimensional coordinate sequence, and the example data group L is expressed as: Among them, (XT n YT n ) represents the target coordinate value of the nth character value range in the instance photo.
8. The instrument screen reading method based on image recognition technology as claimed in claim 1, characterized in that: Step S7, based on the instance data group L of the single-dimensional coordinate sequence and the data recognition template mt, obtain the data value and variable name corresponding to the instance photo, including: Step S71, compare each target coordinate value in the instance data group L with the coordinate values in the first two columns of the data recognition template mt, i.e., the target coordinate value of the variable name or the target coordinate value of the data value. When the error between the coordinate value of a certain target coordinate value and the target coordinate value of the variable name or the target coordinate value of the data value in the data recognition template mt is less than a preset threshold, the target coordinate value is matched to the variable name or data value in the data recognition template mt as the data value and variable name in the instance photo; Step S72, when each target coordinate value in the instance data group L is matched, the vector value composed of the data value and variable name corresponding to the instance photo is calculated. When the vector value composed of this combination is consistent with a vector value in the data recognition template mt, and the data value of the starting point and the variable name of the end point of the combined vector value are consistent with a vector value in the data recognition template mt, and the combination is matched, the match is deemed to be successful, and the data value corresponding to the starting point of the corresponding vector value in the data recognition template mt is used as the data value corresponding to the instance photo, and the variable name corresponding to the end point of the corresponding vector value in the data recognition template mt is used as the variable name corresponding to the instance photo.
9. A computer-readable storage medium having computer-executable instructions stored thereon, wherein: When the computer executable instructions are executed by a processor, the processor is caused to: perform the method according to any one of claims 1 to 8.
10. A computer device, wherein: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to: perform a method as claimed in any one of claims 1 to 8.