Binocular evaporation ruler scale identification and detection method

Through the binocular evaporation scale recognition and detection method, combined with OCR technology and linear regression fitting, the problem of traditional evaporation measurement relying on manual observation is solved, and high-precision and real-time evaporation monitoring is achieved.

CN119672687APending Publication Date: 2025-03-21HEFEI HYDROLOGIC & WATER RESOURCES BUREAU OF ANHUI PROVINCE +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411703632.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

Traditional evaporation measurement methods rely on manual observation, resulting in limited data accuracy and timeliness, and continuous and real-time monitoring cannot be achieved.

Method used

The binocular evaporation scale scale recognition detection method is used, combined with OCR technology and linear regression fitting, and the upper and lower end scales of the evaporation scale are photographed by a binocular camera, and the reading frame and scale pointer are identified using text detection and text recognition models, the distance and angle of key points are calculated, and the scale value is fitted.

Benefits of technology

It realizes high-precision scale reading recognition in complex environments, improves the recognition accuracy in complex lighting conditions and variable environments, and provides a more convenient and accurate scale reading acquisition method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672687A_ABST
    Figure CN119672687A_ABST
Patent Text Reader

Abstract

The invention discloses a binocular evaporation ruler scale identification and detection method, which comprises the following steps: collecting an initial calibrated scale image as a data set, and preprocessing to obtain an evaporation ruler image; training a text detection and text recognition model by using the marked evaporation ruler image, detecting a square reading frame and a scale pointer frame of the evaporation ruler image by using the text detection model, and recognizing digits of the square reading frame by using the text recognition model to obtain a square reading recognition result; two cameras are used for shooting the upper end rotating shaft scale and the lower end graduated scale of the evaporation ruler respectively, the upper end obtains the scale through the decision tree, and the lower end estimates the scale value by calculating the distance and angle value of the key point and fitting linear regression; and a corrected scale value is obtained by fusing the upper and lower results, so that a final scale value is obtained. According to the method, multiple technical means are combined, the recognition accuracy under the complex illumination condition and the changeable environment is improved, rapid recognition is achieved through an efficient algorithm, and the real-time reading requirement is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of evaporation scale reading recognition, and in particular to a binocular evaporation scale recognition and detection method. Background Art

[0002] Traditional evaporation measurement methods mainly rely on manual observation, which is not only time-consuming and labor-intensive, but also the accuracy and timeliness of the data are limited by human factors and environmental conditions. In the context of the rapid development of information and intelligent technology, the use of computer vision solutions to replace manual observation data provides new possibilities for improving the accuracy and efficiency of evaporation monitoring. At the same time, continuous and real-time monitoring of evaporation can be achieved, thereby providing more reliable data support for the scientific management and decision-making of water resources. Summary of the invention

[0003] In order to improve the accuracy of evaporation water testing by the Hydrological Bureau, this paper proposes a binocular evaporation scale recognition and detection method based on OCR, target and key point detection.

[0004] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical scheme:

[0005] The present invention provides a binocular evaporation ruler scale recognition and detection method, comprising the following steps:

[0006] Step 1, collect the initial scale image as a data set, perform preprocessing, and obtain the evaporation scale image;

[0007] Step 2: Use the annotated evaporation ruler image to train text detection and text recognition models, use the text detection model to detect the square reading frame and scale pointer frame of the evaporation ruler image, and then use the text recognition model to recognize the numbers in the square reading frame to obtain the square reading recognition result;

[0008] Step 3: Use two cameras to photograph the upper axis scale and the lower scale of the evaporation ruler respectively. The upper scale is obtained through the decision tree, and the lower scale is estimated by calculating the distance and angle value of the key points and fitting the linear regression.

[0009] Step 4: Obtain the corrected scale value by fusing the upper and lower results to obtain the final scale value.

[0010] Further technology of the present invention:

[0011] Preferably, the text recognition model is used to recognize the numbers in the square reading frame to obtain the square reading recognition result:

[0012] 1) Preprocess the input text image to improve the recognition accuracy;

[0013] 2) Based on text detection, the text area is extracted from the original image according to the results of text positioning;

[0014] 3) Extract useful features from images of text regions for training or recognition models;

[0015] 4) Use the annotated data set to train the text recognition model, input the extracted features into the recognition algorithm, and obtain the text recognition results;

[0016] 5) Post-process the recognition results to eliminate incorrectly recognized numbers or non-numbers and find the correct scale pointer 0.

[0017] Preferably, the processing steps for the upper image are:

[0018] Get the '0' on the block and the numbers at the same height by height layering;

[0019] The data at the same height are ranked horizontally to obtain the two numbers closest to '0' and the decision tree is constructed to determine which of the two numbers is the upper scale value S.

[0020] Preferably, the processing steps for the lower image are:

[0021] Use the obtained scale pointer 0 box and the two boxes before and after the scale pointer 0 to calculate their particle coordinates respectively, and use the obtained coordinates to calculate the distance of the particle between every two boxes;

[0022] Then calculate the angles formed by the two boxes before and after the scale pointer 0 and the box of the scale pointer 0;

[0023] Finally, the estimated scale value Y can be obtained through the linear regression equation.

[0024] The number y closest to the scale pointer 0 will be obtained, and the final lower end estimated value R

[0025] R=yx10+Y.

[0026] Preferably, step 4 is specifically as follows:

[0027] Get the first decimal digit a and the unit digit b of the lower estimated value R;

[0028] Compare a and S. If the absolute value of Sa is greater than 5 and S is greater than a, it means that the lower estimated value is 1 more than the estimated value, so 1 needs to be subtracted and S replaces a. If a is greater than S, it means that the lower estimated value is underestimated by 1, so 1 needs to be added and S replaces a. In other cases, directly replace a with S.

[0029] The beneficial effect of the present invention is that the method combines the OCR technology with methods such as fitting linear regression equations, and can still achieve high-precision scale reading recognition in a complex environment.

[0030] This method combines multiple technical means to improve the recognition accuracy under complex lighting conditions and changing environments, providing users with a more convenient and accurate way to obtain scale readings and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 It is a schematic diagram of the process of the present invention.

[0033] Figure 2 It is a schematic diagram of the lower end scale of the present invention.

[0034] Figure 3 It is a schematic diagram of the scale of the upper end rotating shaft of the present invention.

[0035] Figure 4 It is a schematic diagram of angle α in the upper image of the present invention.

[0036] Figure 5 This is the decision tree construction process of the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be further described in detail below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention but not all. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0038] like Figure 1 The present invention provides a binocular evaporation ruler scale recognition and detection method, comprising the following steps:

[0039] Step 1: Collect the initial scale image as a data set and perform preprocessing to obtain the evaporation scale image. The preprocessing includes image rotation and color jittering to enhance the robustness of the model under various conditions.

[0040] Step 2: Use the annotated evaporation ruler image to train text detection and text recognition models, use the text detection model to detect the square reading frame and scale pointer frame of the evaporation ruler image, and then use the text recognition model to recognize the numbers in the square reading frame to obtain the square reading recognition result;

[0041] Training the text detection model is as follows:

[0042] Collect sufficient annotated data, including images and corresponding object bounding boxes or keypoints.

[0043] Data preprocessing: Perform operations such as scaling and normalizing the image to adapt it to the model input; perform data enhancement processing such as rotation, cropping, color change, etc. to improve the generalization ability of the model.

[0044] Select the model architecture, configure the model parameters, and build the loss function.

[0045] The model is trained using the training data, the loss is calculated via forward propagation, and the model weights are updated via backpropagation.

[0046] Evaluate model performance on the validation set using metrics such as accuracy, recall, and mAP, and optimize the model based on the evaluation results, including adjusting the network structure, using more complex loss functions, or improving data enhancement strategies;

[0047] Get the text detection model.

[0048] The text recognition model is used to recognize the numbers in the square reading box to obtain the square reading recognition results:

[0049] 1) Preprocess the input text image to improve the recognition accuracy;

[0050] 2) Based on text detection, the text area is extracted from the original image according to the results of text positioning;

[0051] 3) Extract useful features from images of text regions for training or recognition models;

[0052] 4) Use the annotated data set to train the text recognition model, input the extracted features into the recognition algorithm, and obtain the text recognition results;

[0053] 5) Post-process the recognition results to eliminate incorrectly recognized numbers or non-numbers and find the correct scale pointer 0.

[0054] Step 3: Use two cameras to photograph the upper axis scale and the lower scale of the evaporation ruler respectively. The upper scale is obtained through the decision tree, and the lower scale is estimated by calculating the distance and angle value of the key points and fitting the linear regression.

[0055] Processing steps for the bottom image:

[0056] Use the obtained scale pointer 0 box and key digital scale box to calculate their particle coordinates respectively, and use the obtained coordinates to calculate X xy ,X xz ,X yz Length, that is, the distance between each two boxes. Figure 2 .

[0057] Then calculate the angle α formed by the two key frames (the two frames before and after the scale pointer 0) connected to the frame of the scale pointer 0, as follows: Figure 2 .

[0058] Use linear regression to fit the equation that solves the scale value:

[0059] Y=β0+β1X xy +β2X xz +β3X yz

[0060] By inputting the true scale value, angle, and distance, we can get the parameters β0, β1, β2, and β3 of the linear regression equation.

[0061] Finally, the estimated scale value Y can be obtained through the linear regression equation.

[0062] Processing steps for the upper image:

[0063] like Figure 3 , layered by height to get the '0' on the block and the numbers at the same height.

[0064] The data at the same height is ranked horizontally to get the two numbers closest to '0'

[0065] The constructed decision tree is used to determine which of the two numbers is the upper scale value S.

[0066] Decision tree construction process:

[0067] By calculation Figure 4 The angle α in the equation, the difference Dis between distance1 and distance2, is used to calculate the Gini impurity construction decision. For example, the formula:

[0068]

[0069] Where n is the number of different categories in the dataset. is the sample proportion of the i-th category in the dataset.

[0070] Since the Gini impurity of angle α is larger than Dis, the right side is selected for the Dis root node distance difference greater than 1.16, and the angle needs to be judged when the angle is greater than 103. The left side is selected when the angle is less than 103. The right side is selected. Finally, angle α is selected as the leaf node in the leaf node of the angle, such as Figure 5 .

[0071] Step 4: Obtain the corrected scale value by fusing the upper and lower results to obtain the final scale value.

[0072] Revised lower end estimate:

[0073] Get the first decimal digit a and the units digit b of the lower estimated value R.

[0074] Compare a and S. If the absolute value of Sa is greater than 5 and S is greater than a, it means that the lower estimated value is 1 more than the estimated value, so 1 needs to be subtracted and S replaces a. If a is greater than S, it means that the lower estimated value is underestimated by 1, so 1 needs to be added and S replaces a. In other cases, directly replace a with S.

[0075] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

Claims

1. A binocular evaporation ruler scale recognition and detection method, characterized in that: The following steps are involved: Step 1, collect the initial scale image as a data set, perform preprocessing, and obtain the evaporation scale image; Step 2: Use the annotated evaporation ruler image to train text detection and text recognition models, use the text detection model to detect the square reading frame and scale pointer frame of the evaporation ruler image, and then use the text recognition model to recognize the numbers in the square reading frame to obtain the square reading recognition result; Step 3: Use two cameras to photograph the upper axis scale and the lower scale of the evaporation ruler respectively. The upper scale is obtained through the decision tree, and the lower scale is estimated by calculating the distance and angle value of the key points and fitting the linear regression. Step 4: Obtain the corrected scale value by fusing the upper and lower results to obtain the final scale value.

2. The binocular evaporation ruler scale recognition and detection method according to claim 1, characterized in that: The text recognition model is used to recognize the numbers in the square reading box to obtain the square reading recognition results: 1) Preprocess the input text image to improve the recognition accuracy; 2) Based on text detection, the text area is extracted from the original image according to the results of text positioning; 3) Extract useful features from images of text areas for training or recognition models; 4) Use the annotated data set to train the text recognition model, input the extracted features into the recognition algorithm, and obtain the text recognition results; 5) Post-process the recognition results to eliminate incorrectly recognized numbers or non-numbers and find the correct scale pointer 0.

3. The binocular evaporation ruler scale recognition and detection method according to claim 2, characterized in that: Processing steps for the upper image: Get the '0' on the block and the numbers at the same height by height layering; The data at the same height are ranked horizontally to obtain the two numbers closest to '0' and the decision tree is constructed to determine which of the two numbers is the upper scale value S.

4. The binocular evaporation ruler scale recognition and detection method according to claim 3, characterized in that: Processing steps for the bottom image: Use the obtained scale pointer 0 box and the two boxes before and after the scale pointer 0 to calculate their particle coordinates respectively, and use the obtained coordinates to calculate the distance of the particle between every two boxes; Then calculate the angles formed by the two boxes before and after the scale pointer 0 and the box of the scale pointer 0; Finally, the estimated scale value Y can be obtained through the linear regression equation. The number y closest to the scale pointer 0 will be obtained, and the final lower end estimated value R; R=yx10+Y.

5. The binocular evaporation ruler scale recognition and detection method according to claim 4, characterized in that: Step 4 is as follows: Get the first decimal digit a and the unit digit b of the lower estimated value R; Compare a and S. If the absolute value of Sa is greater than 5 and S is greater than a, it means that the lower estimated value is 1 more than the estimated value, so 1 needs to be subtracted and S replaces a. If a is greater than S, it means that the lower estimated value is underestimated by 1, so 1 needs to be added and S replaces a. In other cases, directly replace a with S.

Citation Information

Cited By

  • Calibrated scale use normalization detection method and system for teaching examination

    CN121352628A

  • A standardized testing method and system for rulers used in teaching and examinations

    CN121352628B