An image-based scale recognition method

By setting special patterns at the left and right ends of the scale lines and adopting coding and error detection and correction mechanisms, the problem of computer algorithms being unable to accurately identify the scale is solved, realizing high-precision automatic scale identification, which is suitable for automated monitoring.

CN116189163BActive Publication Date: 2026-04-21ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV OF TECH
Filing Date
2022-12-28
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, computer algorithms struggle to accurately identify scale values, especially in applications such as the draft of shipping vessels, where the accuracy is insufficient, hindering the widespread adoption of the technology.

Method used

This paper proposes an image-based scale recognition method. By setting special patterns at the left and right ends of the scale lines, boundary detection and correction are performed. Encoding and error detection and correction mechanisms are used to achieve automatic recognition of the scale lines.

Benefits of technology

It improves the accuracy and reliability of scale recognition, and can accurately identify scale values ​​under tilted or obstructed conditions, making it suitable for unattended automated monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116189163B_ABST
    Figure CN116189163B_ABST
Patent Text Reader

Abstract

This invention discloses an image-based scale recognition method, comprising the following steps: 1) Designing scale lines for computer recognition: 1.1) Setting patterns at the left and right ends of the scale lines to distinguish the left and right boundaries; 1.2) Encoding the middle scale value of the scale lines; 2) Attaching the scale lines to the side wall of the liquid container being measured; 3) Acquiring scale line images: Using a camera to capture images of the scale lines at the side wall of the liquid container; 4) Sending the acquired scale line images to an algorithm recognizer: 4.1) Detecting and locating the scale area through the left and right boundaries of the image; if there is inversion or tilt, correcting the scale area; 4.2) Recognizing the scale lines and converting the scale line encoding into a bit sequence; 4.3) Performing error detection and correction; 5) Outputting the scale value. This invention provides a novel scale encoding pattern that facilitates computer recognition and achieves high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and more specifically to an image-based scale recognition method. Background Technology

[0002] Using rulers to measure length and height is a common engineering measurement practice in production and daily life, such as monitoring the oil level in oil depots, the water depth of bridges, or the draft of large cargo ships in ports. Generally, fixed graduation marks are set, and the scale value is identified by the distance the liquid level reaches the graduation mark. This measurement observation is either done manually by visual inspection or by manually identifying the value through monitoring video footage. In recent years, the use of artificial intelligence visual computing to automatically identify graduations has gradually emerged, thus achieving unattended scale monitoring. This involves the recognition of Arabic numeral characters on the graduation marks and the counting of the evenly spaced graduation marks, which is related to computer pattern recognition, specifically the recognition of printed numeral characters and straight lines. Because of this, the graduation values ​​and graduation marks currently prepared for manual identification may not be suitable for computer algorithm recognition. For example, the automatic identification of the draft of shipping ships by computer algorithms is not yet widely adopted; insufficient recognition accuracy in this area is one of the main reasons affecting the widespread adoption of this technology. Summary of the Invention

[0003] In view of the problems existing in the prior art, the present invention provides a reasonably designed image-based scale recognition method.

[0004] The technical solution of the present invention is as follows:

[0005] An image-based scale recognition method includes the following steps:

[0006] 1) Design scale lines for computer recognition:

[0007] 1.1) Set patterns at the left and right ends of the scale lines to distinguish the left and right boundaries;

[0008] 1.2) Encode the intermediate scale values ​​of the scale lines;

[0009] 2) Place the graduation line on the side wall of the container containing the liquid being measured;

[0010] 3) Acquire scale line image: Use a camera to capture the image of the scale line on the side wall of the liquid container;

[0011] 4) Input the acquired scale line image into the algorithm recognizer:

[0012] 4.1) Detect and locate the scale area using the left and right boundary images. If there is inversion or tilt, correct the scale area.

[0013] First, due to the special pattern markings on the left and right boundaries (e.g., the markings on the right are vertically alternating black and white, while those on the left are vertically aligned black and white), pixel analysis can detect and locate the left and right boundaries of the scale line. Then, by obtaining the orientation of the left and right boundary markings (whether the markings on the left are vertically alternating black and white or vertically aligned black and white, and whether the markings on the right are vertically alternating black and white or vertically aligned black and white), it is determined whether an inversion has occurred. If no inversion has occurred, the height difference between the left and right boundaries can estimate the angle of tilt during image capture, and this angle is used to perform image pixel rotation transformation, thereby correcting the tilt.

[0014] 4.2) Identify the scale lines and convert their encoding into a bit sequence;

[0015] The black and white block sequence is detected from left to right on the corrected scale line. White is treated as 0 and black as 1, and the black and white block sequence is mapped to a 0 and 1 bit sequence.

[0016] 4.3) Perform error detection and correction using a decoding mechanism;

[0017] 5) Output the scale value.

[0018] Furthermore, each scale line and its left and right boundaries are arranged in a linear pattern by square blocks of one unit height.

[0019] Furthermore, step 1.1) involves connecting black and white squares at the left and right ends of the scale lines to form different patterns; wherein the left end of the scale line has a constant period, while the right end of the scale line changes periodically, that is, the black squares on adjacent scale lines change periodically from left to right.

[0020] Furthermore, in step 1.2), N black and white squares are used to encode the scale value, which is equivalent to N bits. Of these, 2 / N bits are used for digital encoding, and the remaining 2 / N bits are used for redundant encoding for error detection and correction.

[0021] Furthermore, the height of the black and white cubes is equal to the thickness of the scale lines.

[0022] Furthermore, when encoding each tick mark, avoid using a coding segment of 4 consecutive squares of the same color. This is designed to achieve the exclusion of two adjacent tick marks. The so-called exclusion means that when the algorithm performs pixel analysis, it can automatically avoid confusing the pixels of adjacent tick marks with pixels of the same tick mark.

[0023] Furthermore, the upper, middle, and lower adjacent scale lines have a repulsive design to avoid confusion during line calibration and to facilitate calibration when tilted, allowing for the differentiation of adjacent scale lines.

[0024] Furthermore, there is no gap between adjacent scale lines, forming a seamless connection.

[0025] Furthermore, the error detection and correction coding adopts Reed-Solom, and the decoding mechanism adopts the Reed-Solom decoding mechanism.

[0026] The beneficial effects of this invention are as follows:

[0027] 1) This invention provides a novel scale coding pattern that is easy for computers to recognize and achieves high accuracy;

[0028] 2) The difference in black and white intervals at the left and right boundaries can be used to distinguish between them, thus achieving left-right and inversion correction;

[0029] 3) Error detection and correction codes are used in the design coding of the scale line numbers to protect the design, so that the scale value can still be detected even if the scale line is damaged, obscured, or contaminated.

[0030] 4) The calibration of the scale lines is achieved by the repulsion (incompatibility) of adjacent scale lines. Attached Figure Description

[0031] Figure 1 This is a diagram of the video scale system of the present invention;

[0032] Figure 2 This is a symbolic diagram of the left and right boundary patterns of the present invention;

[0033] Figure 3 This is a schematic diagram of a coding segment consisting of four consecutive squares of the same color, as described in this invention.

[0034] Figure 4 This is a flowchart of the process of the present invention;

[0035] Figure 5 This is a schematic diagram of the scale line image in an embodiment of the present invention;

[0036] Figure 6 This is a schematic diagram of the scale line image after correction according to an embodiment of the present invention. Detailed Implementation

[0037] The present invention will be further described below with reference to the accompanying drawings.

[0038] This invention designs a scale value encoding pattern specifically for computer algorithm recognition. During scale recognition, a camera is used to capture the image, and a computer algorithm extracts features from the image to identify the scale value.

[0039] like Figure 1 As shown, the recognition system includes a designed scale coding pattern, a camera, and a recognition algorithm; the design of the scale coding pattern facilitates computer algorithm processing to achieve high recognition accuracy.

[0040] 1) Design of the left and right boundaries of the scale lines, and the left and right endpoints of the scale lines for inverted detection; such as... Figure 2 As shown, distinct patterns are set at the left and right boundaries of the scale lines. For example, different patterns are formed by connecting M black and white squares at the left and right ends of the scale lines respectively; the left end has a constant period, while the right end shows a period of two, that is, the black squares on adjacent scale lines change back and forth in a left-right cycle. If the scale is inverted, it can still be distinguished by the difference in the black and white intervals at the left and right boundaries, thus allowing for correction.

[0041] 2) The encoding of the middle scale values ​​on the graduation lines facilitates line correction when shooting at tilted or rotated angles. Furthermore, the adjacent upper, middle, and lower scale lines have an exclusion design, preventing confusion during line correction. Encoding possible scale numbers are 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0, 10, 20, 30, 40, ...

[0042] Specifically, N black and white squares are used to encode the scale value, which is equivalent to N bits. 2 / N bits are used for digital encoding, and the remaining 2 / N bits are used for redundant encoding for error detection and correction, such as Lisso code.

[0043] Note: In the coding design of each scale line, avoid using a coding segment of 4 consecutive squares of the same color. This design prevents recognition errors caused by adjacent squares being confused when the scale is tilted. Figure 3 As shown.

[0044] The workflow diagram of the recognizer is as follows: Figure 4 As shown.

[0045] 1) Attach the scale pattern to the side wall of the container containing the liquid being measured;

[0046] The design of the scale line pattern, as described above, is similar to that of QR codes and barcodes, making it easy for computers to recognize but difficult for the human eye to observe and recognize. This is to improve automated and unmanned monitoring and duty.

[0047] 2) Use a camera to monitor the liquid surface and sidewalls; or use a mobile phone to take pictures to capture images and obtain recognition results through a dedicated APP pre-installed on the mobile phone.

[0048] 3) Input the captured image of the scale pattern into the algorithm recognizer; detect and locate the scale area by the left and right boundaries of the image; if there is inversion or tilt, correct the scale area; recognize the scale lines and convert them into bit sequences; perform error detection and correction, and output the scale value.

[0049] 4) The algorithm identifies the scale value.

[0050] Example:

[0051] 1) First, obtain the tick mark image (a total of 16 black and white squares), such as... Figure 5 As shown;

[0052] 2) After tilt correction, such as Figure 6 As shown;

[0053] 3) Convert to a bit column, three rows of tick marks, after removing the left and right boundaries (3 black and white squares on each side); 1011011001 1100101101 1011101001

[0057] 4) After decoding the code; 101 100 011

[0061] 5) This represents the output scale values ​​as 5, 4, and 3.

[0062] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the technical solutions of the present invention. Any technical solution that can be implemented based on the above embodiments without creative effort should be considered to fall within the scope of protection of the patent of the present invention.

Claims

1. An image-based scale recognition method, characterized in that, Includes the following steps: 1) Design scale lines for computer recognition: 1.1) Set patterns at the left and right ends of the scale lines to distinguish the left and right boundaries; Step 1.1) is to form different patterns by connecting black and white squares at the left and right ends of the scale lines respectively; wherein the left end of the scale line has a constant period, while the right end of the scale line changes periodically, that is, the two adjacent scale lines have a left and right periodic change of black squares. 1.2) Encode the intermediate scale values ​​of the scale lines; 2) Place the graduation line on the side wall of the container containing the liquid being measured; 3) Acquire scale line image: Use a camera to capture the image of the scale line on the side wall of the liquid container; 4) Input the acquired scale line image into the algorithm recognizer: 4.1) Detect and locate the scale area using the left and right boundary images. If there is any inversion or tilt, correct the scale area. First, the left and right boundary pattern marks are detected by pixel analysis, and the left and right boundaries of the scale line are located. Then, the orientation of the obtained left and right boundary pattern marks is used to determine whether inversion has occurred. If inversion has not occurred, the tilt angle is estimated by the height difference between the left and right boundaries, and the tilt is corrected by rotation transformation of this angle. 4.2) Identify the scale lines and convert their encoding into a bit sequence; The black and white block sequence is detected from left to right on the corrected scale line. White is treated as 0 and black as 1, and the black and white block sequence is mapped to a 0 and 1 bit sequence. 4.3) Perform error detection and correction using a decoding mechanism; 5) Output the scale value.

2. The image-based scale recognition method according to claim 1, characterized in that, Each scale line and its left and right boundaries are composed of square blocks of one unit height arranged in a linear shape.

3. The image-based scale recognition method according to claim 1, characterized in that, Step 1.2) Use N black and white squares to encode the scale value, which is equivalent to N bits. 2 / N bits are used for digital encoding, and the remaining 2 / N bits are used for redundant encoding for error detection and correction.

4. The image-based scale recognition method according to claim 1, characterized in that, The height of the black and white squares is equal to the thickness of the scale lines.

5. The image-based scale recognition method according to claim 1, characterized in that, When encoding each scale line, avoid using a code segment with four consecutive squares of the same color.

6. The image-based scale recognition method according to claim 1, characterized in that, Adjacent scale lines are without gaps, forming a seamless connection.

7. The image-based scale recognition method according to claim 1, characterized in that, The error detection and correction encoding uses Reed-Solomn, and the decoding mechanism uses the Reed-Solomn decoding mechanism.

Citation Information

Patent Citations

  • Water level gauge positioning and water level measuring method based on image processing

    CN109443480A

  • Bar code scale image positioning and identification detection method of digital level

    CN112990192A