Annular scale identification method and device, electronic equipment and scale

By identifying the ring scale lines and generating binary scale marks, combining the preset binary digit numbers and cyclic equivalent groups, the problem of low scale recognition efficiency in the prior art is solved, and the effect of efficiently identifying the scale at any angle is achieved.

CN119600580APending Publication Date: 2025-03-11SHANGHAI GMT DIGITAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411459848.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, the scale recognition process is easily affected by the observation angle, resulting in a decrease in recognition efficiency and the inability to efficiently identify the scale.

Method used

By acquiring the scale image, identifying the ring scale lines, generating binary scale marks, and using preset binary digit numbers and cyclic equivalent groups for scale recognition, the target scale recognition is achieved.

Benefits of technology

The problem of being affected by the observation angle during the identification process is avoided, the scale presentation range is expanded, the scale information is obtained at any angle, and the recognition efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600580A_ABST
    Figure CN119600580A_ABST
Patent Text Reader

Abstract

The invention relates to a scale identification technology, and discloses an annular scale identification method and device, electronic equipment and a scaleplate, and the method comprises the steps: obtaining a scale image, carrying out the scale line identification of the scale image, and obtaining an annular scale line image; performing line identification on the annular scale line image, and generating a binary scale mark according to a line identification result; extracting a target scale mark sequence from the binary scale marks according to a preset binary number digit; and performing scale identification on the target scale mark sequence according to the cyclic equivalence group corresponding to the binary digit number to obtain a target scale. According to the invention, the scale can be identified efficiently without being influenced by an observation view angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of scale recognition, and in particular to a method, device, electronic equipment and ruler for recognizing an annular scale. Background Art

[0002] With the continuous development of computer video technology, computer processing is increasingly integrated into various fields. In the medical field, there is a combination of computer vision technology and human body detection, for example, the application of endoscopes in gastroscopy, colonoscopy and other inspections.

[0003] An endoscope is a medical device that can enter the human body through the mouth, nose, rectum and other parts for inspection or treatment. During the endoscopic inspection, the length of the endoscope entering the human body varies according to the physical condition of different people, and the length of the endoscope entering the human body is also an important part of auxiliary inspection and treatment.

[0004] The scale reading in the prior art often adopts the common scale reading method, but this common scale reading cannot efficiently identify the scale for computer vision processing; and the reading is often affected by the observation angle, resulting in a decrease in the efficiency of the scale reading.

[0005] In summary, how to efficiently identify scales without being affected by the viewing angle becomes a problem that needs to be solved urgently. Summary of the invention

[0006] The present invention provides a ring scale recognition method, device, electronic device, computer-readable storage medium and ruler, the main purpose of which is to solve the problem of being unable to efficiently recognize scales without being affected by the observation angle.

[0007] To achieve the above object, the present invention provides a method for identifying an annular scale, comprising:

[0008] Acquire a scale image, perform scale line recognition on the scale image, and obtain a ring scale line image;

[0009] Performing line recognition on the annular scale line image, and generating binary scale marks according to the line recognition result;

[0010] extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits;

[0011] The target scale mark sequence is scale-identified according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

[0012] Optionally, generating a binary scale mark according to the result of line recognition includes:

[0013] The line recognition result is divided into long and short categories to obtain first-category scale marks and second-category scale marks;

[0014] Determine the positional relationship between the first type of scale mark and the second type of scale mark according to the annular scale line;

[0015] Binary scale marks are generated according to the first type of scale marks and the second type of scale marks and corresponding positional relationships.

[0016] Optionally, extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits includes:

[0017] Extracting the scale marks to be generated from the binary scale marks in sequence according to the number of binary digits;

[0018] A target scale mark sequence is generated according to the scale marks to be generated and the corresponding positional relationship.

[0019] Optionally, before performing scale identification on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits, the method further includes:

[0020] Obtaining a preset range and a preset interval length, and determining the number of cyclic equivalent groups according to the range and the interval length;

[0021] Generate cyclic equivalence groups according to the number of cyclic equivalence groups according to binary rules, and determine corresponding binary digits according to the cyclic equivalence groups.

[0022] Optionally, performing scale identification on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale includes:

[0023] Perform sequence matching on the target scale mark sequence and the cycle equivalent group to obtain a target group number;

[0024] Obtaining the division interval length corresponding to the cyclic equivalent group, and performing calculation according to the division interval length and the target number of groups to obtain an initial scale;

[0025] The target scale is determined according to the positional relationship of the annular scale lines in the annular scale line image and the initial scale.

[0026] Optionally, the performing line recognition on the annular scale line image includes:

[0027] Gray-scaling the annular scale line image to obtain a gray-scale image;

[0028] A scale line is extracted from the grayscale image according to pixel values ​​of the grayscale image.

[0029] Optionally, the performing scale line recognition on the scale image to obtain a ring-shaped scale line image includes:

[0030] Performing type recognition on the scale image to obtain multiple type labels;

[0031] Performing image segmentation on the scale image according to the type label to obtain a segmented image corresponding to the type label;

[0032] A ring scale line image is extracted from the segmented image according to preset scale line labels.

[0033] In order to solve the above problems, the present invention further provides a ring scale recognition device, the device comprising:

[0034] An image acquisition module, used for acquiring a scale image;

[0035] A scale line recognition module, used to perform scale line recognition on the scale image to obtain a ring scale line image;

[0036] A binary scale mark sequence generation module is used to perform line recognition on the annular scale line image, generate binary scale marks according to the line recognition result; and extract a target scale mark sequence from the binary scale marks according to a preset number of binary digits;

[0037] The scale recognition module is used to perform scale recognition on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

[0038] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0039] at least one processor; and,

[0040] a memory communicatively connected to the at least one processor; wherein,

[0041] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned annular scale recognition method.

[0042] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned annular scale recognition method.

[0043] In order to solve the above problems, the present invention also provides a ruler, which is set to be cylindrical or tubular; a plurality of evenly distributed annular scale lines are set on the surface of the ruler; each of the annular scale lines is composed of a plurality of equally spaced scale lines; the lengths of the scale lines are different; the midpoints of the scale lines are located in the same plane, and the plane is perpendicular to the central axis of the ruler.

[0044] The present invention realizes scale recognition by identifying the annular scale lines of the scale image, avoiding the problem of limited recognition content caused by the influence of the observation angle during the recognition process, expanding the scale presentation range in the recognition image, and realizing that scale information can be obtained at any angle; through line recognition, combined with binary digits and cyclic equivalent groups, scale reading is realized, enriching the scale reading form in the scale recognition process, performing scale recognition in binary form, and improving recognition efficiency. Therefore, the annular scale recognition method, device, electronic device, computer-readable storage medium and ruler proposed in the present invention can solve the problem of not being able to efficiently recognize the scale without being affected by the observation angle. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a flow chart of a method for identifying annular scales provided in one embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a partial structure of a ruler provided by an embodiment of the present invention;

[0047] Figure 3 A functional module diagram of a ring scale recognition device provided by an embodiment of the present invention;

[0048] Figure 4 A schematic diagram of the structure of an electronic device for implementing the annular scale recognition method provided by an embodiment of the present invention.

[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0051] The embodiment of the present application provides a method for identifying a circular scale. The execution subject of the circular scale identification method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the circular scale identification method can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0052] Reference Figure 1 FIG. 1 is a flow chart of a method for identifying an annular scale provided by an embodiment of the present invention. In this embodiment, the annular scale identification method includes:

[0053] S1. Acquire a scale image, perform scale line recognition on the scale image, and obtain a ring scale line image.

[0054] In an embodiment of the present invention, the scale image may be an image captured by a camera. Taking endoscopic examination and treatment as an example, after the endoscope enters the body through the mouth, nostrils and other parts of the human body, a camera device may be provided at the mouth, nostrils and other parts to capture images or images of the parts where the endoscope enters the human body.

[0055] Furthermore, in an embodiment of the present invention, the scale image captured by the camera device may include the part where the endoscope enters the human body, the shooting environment, the personnel performing the examination and treatment, etc. In order to better identify the annular scale on the endoscope hose, the scale image may be subjected to image enhancement, target recognition and other processing to obtain clear annular scale lines.

[0056] In an embodiment of the present invention, the annular scale lines may be marked at a preset position on the surface of the ruler, the ruler may be cylindrical or tubular, and in the application scenario of an endoscope, the ruler refers to an endoscope hose; the annular scale lines refer to line segments marked on the surface of the ruler, the line segments have different lengths and are parallel to the axis of the ruler; the annular scale lines on the ruler are evenly arranged according to a fixed spacing, and there is a blank unmarked area between two adjacent annular scale lines.

[0057] In the embodiment of the present invention, the step of performing scale line recognition on the scale image to obtain a ring-shaped scale line image includes:

[0058] Performing type recognition on the scale image to obtain multiple type labels;

[0059] Performing image segmentation on the scale image according to the type label to obtain a segmented image corresponding to the type label;

[0060] A ring scale line image is extracted from the segmented image according to preset scale line labels.

[0061] In the embodiment of the present invention, before the type recognition is performed on the scale image, pre-processing operations such as Gaussian filtering denoising, background removal and thresholding may be performed on the scale image to improve the accuracy of subsequent scale line recognition.

[0062] In an embodiment of the present invention, the scale image row type matching can be performed based on a preset template label database. When performing type labeling, the scale image can be divided into multiple label frames through the YOLO target recognition algorithm, and then the matching function of Opencv is called to determine the type label corresponding to the image in the label frame; the template label database contains multiple graphics and corresponding type labels, for example, the image of the scale line and the scale line label, the image of the mouth and the mouth label; after determining the type label corresponding to the label frame, the scale image can be divided into multiple sub-images according to the label frame corresponding to the category label, that is, segmented images, and the segmented images and the type labels are in a one-to-one correspondence.

[0063] In an embodiment of the present invention, the annular scale line image includes annular scale lines and a blank unlabeled area, and the positional relationship of the annular scale lines in the annular scale image indicates whether the target scale finally identified is greater than or less than the reading of the annular scale lines; the positional relationship is the relative positional relationship between the annular scale lines and the unlabeled area.

[0064] S2. Perform line recognition on the annular scale line image, and generate binary scale marks according to the line recognition result.

[0065] In the embodiment of the present invention, the performing line recognition on the annular scale line image includes:

[0066] Gray-scaling the annular scale line image to obtain a gray-scale image;

[0067] A scale line is extracted from the grayscale image according to pixel values ​​of the grayscale image.

[0068] In the embodiment of the present invention, the annular scale line image is an image including annular scale lines, wherein there is an obvious pixel difference between the scale line area and the non-scale line area, and therefore, the scale lines can be determined from the target image through the grayscale image.

[0069] In an embodiment of the present invention, the annular scale lines include a plurality of scale lines distributed at equal intervals, the scale lines are evenly arranged around the outer surface of the ruler, the scale lines are arranged along the circumference of the ruler, the midpoints of the scale lines are located on the same plane, and the plane is perpendicular to the axis of the ruler; the scale line segments of the annular scale lines can be divided into two specifications, long and short, so that the computer can read the scale of the ruler according to the lines of different lengths.

[0070] In the embodiment of the present invention, the step of generating a binary scale mark according to the result of line recognition includes:

[0071] The line recognition result is divided into long and short categories to obtain first-category scale marks and second-category scale marks;

[0072] Determine the positional relationship between the first type of scale mark and the second type of scale mark according to the annular scale line;

[0073] Binary scale marks are generated according to the first type of scale marks and the second type of scale marks and corresponding positional relationships.

[0074] In an embodiment of the present invention, the longer scale line can be used as a first-class scale mark, which is recorded as 1, and the shorter scale line can be used as a second-class scale mark, which is recorded as 0. According to the positional relationship between the first-class scale mark and the second-class scale mark, that is, the arrangement order, a corresponding binary sequence, that is, a binary scale mark, can be generated.

[0075] S3. Extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits.

[0076] In an embodiment of the present invention, extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits includes:

[0077] Extracting the scale marks to be generated from the binary scale marks in sequence according to the number of binary digits;

[0078] A target scale mark sequence is generated according to the scale marks to be generated and the corresponding positional relationship.

[0079] In an embodiment of the present invention, the first identified binary scale mark or a randomly selected binary scale mark can be used as a starting position to extract the scale marks to be generated in sequence; the scale marks to be generated include a first type of scale mark (marked as 1) and a second type of scale mark (marked as 0). After determining the first type of scale mark and the second type of scale mark, a binary sequence can be generated according to the positional relationship, that is, a target scale mark sequence, for example, 00011000.

[0080] In the embodiment of the present invention, for a certain length of the measuring range, different numbers of cyclic equivalent groups can be determined by setting different lengths of the intervals between the circular scale lines, and different numbers of cyclic equivalent groups correspond to different binary digits. For example, if the measuring range is 3 meters, if a circular scale line is marked every 10 cm, a total of 30 circular scale lines are required, and therefore 30 cyclic equivalent groups are required, and the number of binary digits corresponding to the 30 cyclic equivalent groups is 8.

[0081] In the embodiment of the present invention, a fixed number of target scale marks can be identified in the process of identifying scale lines only after the number of binary digits is determined.

[0082] S4. Performing scale recognition on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain a target scale.

[0083] In an embodiment of the present invention, before performing scale identification on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits, the method further includes:

[0084] Obtaining a preset range and a preset interval length, and determining the number of cyclic equivalent groups according to the range and the interval length;

[0085] Generate cyclic equivalence groups according to the number of cyclic equivalence groups according to binary rules, and determine corresponding binary digits according to the cyclic equivalence groups.

[0086] In the embodiment of the present invention, different binary digits correspond to different cyclic equivalence groups, the binary sequence composition in the cyclic equivalence group is the same as the binary digits, and the binary sequence in the cyclic equivalence group corresponds to the number of cyclic equivalence groups, that is, corresponds to the nth circular scale line.

[0087] For example, if the number of binary digits is 3, then the total number of corresponding cyclic equivalent groups is 4, among the 4 cyclic equivalent groups:

[0088] {000} represents the first group of cyclic equivalence groups;

[0089] {001,010,100} represents the second group of cyclic equivalence;

[0090] {011,110,101} represents the third group of cyclic equivalence;

[0091] {111} represents the fourth cyclic equivalence group;

[0092] If the number of binary digits is 4, then the total number of corresponding cyclic equivalent groups is 6. Among the 6 cyclic equivalent groups:

[0093] {0000} represents the first group of cyclic equivalence groups;

[0094] {0001,0010,0100,1000} represents the second group of cyclic equivalence;

[0095] {0011,0110,1100,1001} represents the third cyclic equivalence group;

[0096] {0101,1010} represents the fourth cyclic equivalence group;

[0097] {0111,1110,1101,1011} represents the fifth cyclic equivalence group;

[0098] {1111} represents the 6th cyclic equivalence group;

[0099] If the number of binary digits is 5, the total number of corresponding cyclic equivalent groups is 8. Among the 8 cyclic equivalent groups:

[0100] {00000} represents the first group of cyclic equivalence groups;

[0101] {00001,00010,00100,01000,10000 represents the second group of cyclic equivalence;

[0102] {00011,00110,01100,11000,10001} represents the third cyclic equivalence group;

[0103] {00101,01010,10100,01001,10010} represents the fourth cyclic equivalence group;

[0104] {00111,01110,11100,11001,10011} represents the fifth cyclic equivalence group;

[0105] {01011,10110,01101,11010,10101} represents the 6th cyclic equivalence group;

[0106] {01111,11110,11101,11011,10111} represents the 7th cyclic equivalence group;

[0107] {11111} The 8th group of cyclic equivalence;

[0108] If the number of binary digits is 6, then the total number of corresponding cyclic equivalent groups is 14. Among the 14 cyclic equivalent groups:

[0109] {000000} represents the first group of cyclic equivalence groups;

[0110] {000001,000010,000100,001000,010000,100000} represents the second group of cyclic equivalence;

[0111] {000011,000110,001100,011000,110000,100001} represents the third cyclic equivalence group;

[0112] {000101,001010,010100,101000,010001,100010} represents the fourth cyclic equivalence group;

[0113] {000111,001110,011100,111000,110001,100011} represents the fifth cyclic equivalence group;

[0114] {001001,010010,100100} represents the 6th cyclic equivalence group;

[0115] {001011,010110,101100,011001,110010,100101} represents the 7th cyclic equivalence group;

[0116] {001101,011010,110100,101001,010011,100110} represents the 8th cyclic equivalence group;

[0117] {001111,011110,111100,111001,110011,100111} represents the 9th cyclic equivalence group;

[0118] {010101,101010} represents the 10th cyclic equivalence group;

[0119] {010111,101110,011101,111010,110101,101011} represents the 11th cyclic equivalence group;

[0120] {011011,110110,101101} represents the 12th cyclic equivalence group;

[0121] {011111,111110,111101,111011,110111,101111} represents the 13th cyclic equivalence group;

[0122] {111111} represents the 14th cyclic equivalence group;

[0123] If the number of binary digits is 7, then the total number of corresponding cyclic equivalent groups is 20. Among the 20 cyclic equivalent groups:

[0124] {0000000} represents the first group of cyclic equivalence groups;

[0125] {0000001,0000010,0000100,0001000,0010000,0100000,1000000} represents the second group of cyclic equivalence;

[0126] {0000011,0000110,0001100,0011000,0110000,1100000,1000001} represents the third group of cyclic equivalence;

[0127] {0000101,0001010,0010100,0101000,1010000,0100001,1000010} represents the fourth cyclic equivalence group;

[0128] {0000111,0001110,0011100,0111000,1110000,1100001,1000011} represents the fifth cyclic equivalence group;

[0129] {0001001,0010010,0100100,1001000,0010001,0100010,1000100} represents the 6th cyclic equivalence group;

[0130] {0001011,0010110,0101100,1011000,0110001,1100010,1000101} represents the 7th cyclic equivalence group;

[0131] {0001101,0011010,0110100,1101000,1010001,0100011,1000110} represents the 8th cyclic equivalence group;

[0132] {0001111,0011110,0111100,1111000,1110001,1100011,1000111} represents the 9th cyclic equivalence group;

[0133] {0010011,0100110,1001100,0011001,0110010,1100100,1001001} represents the 10th cyclic equivalence group;

[0134] {0010101,0101010,1010100,0101001,1010010,0100101,1001010} represents the 11th cyclic equivalence group;

[0135] {0010111,0101110,1011100,0111001,1110010,1100101,1001011} represents the 12th cyclic equivalence group;

[0136] {0011011,0110110,1101100,1011001,0110011,1100110,1001101} represents the 13th cyclic equivalence group;

[0137] {0011101,0111010,1110100,1101001,1010011,0100111,1001110} represents the 14th cyclic equivalence group;

[0138] {0011111,0111110,1111100,1111001,1110011,1100111,1001111} represents the 15th cyclic equivalence group;

[0139] {0101011,1010110,0101101,1011010,0110101,1101010,1010101} represents the 16th cyclic equivalence group;

[0140] {0101111,1011110,0111101,1111010,1110101,1101011,1010111} represents the 17th cyclic equivalence group;

[0141] {0110111,1101110,1011101,0111011,1110110,1101101,1011011} represents the 18th cyclic equivalence group;

[0142] {01111111,1111110,11111101,1111011,1110111,1101111,1011111} represents the 19th cyclic equivalence group;

[0143] {1111111} represents the 20th cyclic equivalent group

[0144] If the number of binary digits is 8, then the total number of corresponding cyclic equivalent groups is 36. Among the 36 cyclic equivalent groups:

[0145] {00000000} represents the first group of cyclic equivalence groups;

[0146] {00000001,00000010,00000100,00001000,00010000,00100000,01000000,10000000} represents the second group of cyclic equivalence;

[0147] {00000011,00000110,00001100,00011000,00110000,01100000,11000000,10000001} represents the third group of cyclic equivalence;

[0148] {00000101,00001010,00010100,00101000,01010000,10100000,01000001,10000010} is represented as the fourth cyclic equivalence group;

[0149] {00000111,00001110,00011100,00111000,01110000,11100000,11000001,10000011} represents the fifth cyclic equivalence group;

[0150] {00001001,00010010,00100100,01001000,10010000,00100001,01000010,10000100} is represented as the 6th cyclic equivalence group;

[0151] {00001011,00010110,00101100,01011000,10110000,01100001,11000010,10000101} represents the 7th cyclic equivalence group;

[0152] {00001101,00011010,00110100,01101000,11010000,10100001,01000011,10000110} represents the 8th cyclic equivalence group;

[0153] {00001111,00011110,00111100,01111000,11110000,11100001,11000011,10000111} represents the 9th cyclic equivalence group;

[0154] {00010001,00100010,01000100,1000100} represents the 10th cyclic equivalence group;

[0155] {00010011,00100110,01001100,10011000,00110001,01100010,11000100,10001001} represents the 11th cyclic equivalence group;

[0156] {00010101,00101010,01010100,10101000,01010001,10100010,01000101,10001010} represents the 12th cyclic equivalence group;

[0157] {00010111,00101110,01011100,10111000,01110001,11100010,11000101,10001011} represents the 13th cyclic equivalence group;

[0158] {00011001,00110010,01100100,11001000,10010001,00100011,01000110,10001100} represents the 14th cyclic equivalence group;

[0159] {00011011,00110110,01101100,11011000,10110001,01100011,11000110,10001101} represents the 15th cyclic equivalence group;

[0160] {00011101,00111010,01110100,11101000,11010001,10100011,01000111,10001110} represents the 16th cyclic equivalence group;

[0161] {00011111,00111110,01111100,11111000,11110001,11100011,11000111,1000111} represents the 17th cyclic equivalence group;

[0162] {00100101,01001010,10010100,00101001,01010010,10100100,01001001,10010010} represents the 18th cyclic equivalence group;

[0163] {00100111,01001110,10011100,00111001,01110010,11100100,11001001,10010011} represents the 19th cyclic equivalence group;

[0164] {00101011,01010110,10101100,01011001,10110010,01100101,11001010,10010101} represents the 20th cyclic equivalence group;

[0165] {00101101,01011010,10110100,01101001,11010010,10100101,01001011,10010110} represents the 21st cyclic equivalence group;

[0166] {00101111,01011110,10111100,01111001,11110010,11100101,11001011,10010111} represents the 22nd cyclic equivalence group;

[0167] {00110011,01100110,11001100,10011001} represents the 23rd cyclic equivalence group;

[0168] {00110101,01101010,11010100,10101001,01010011,10100110,01001101,10011010} represents the 24th cyclic equivalence group;

[0169] {00110111,01101110,11011100,10111001,01110011,11100110,11001101,10011011} represents the 25th cyclic equivalence group;

[0170] {00111011,01110110,11101100,11011001,10110011,01100111,11001110,10011101} represents the 26th cyclic equivalence group;

[0171] {00111101,01111010,11110100,11101001,11010011,10100111,01001111,10011110} represents the 27th cyclic equivalence group;

[0172] {00111111,01111110,11111100,11111001,11110011,11100111,11001111,10011111} represents the 28th cyclic equivalence group;

[0173] {01010101,10101010} represents the 29th cyclic equivalence group;

[0174] {01010111,10101110,01011101,10111010,01110101,11101010,11010101,10101011} represents the 30th cyclic equivalence group;

[0175] {01011011,10110110,01101101,11011010,10110101,01101011,11010110,10101101} represents the 31st cyclic equivalence group;

[0176] {01011111,10111110,01111101,11111010,11110101,11101011,11010111,10101111} represents the 32nd cyclic equivalence group;

[0177] {01101111,11011110,10111101,01111011,11110110,11101101,11011011,10110111} represents the 33rd cyclic equivalence group;

[0178] {01110111,11101110,11011101,10111011} represents the 34th cyclic equivalence group;

[0179] {011111111,11111110,111111101,11111011,11110111,11101111,11011111,10111111} represents the 35th cyclic equivalence group;

[0180] {111111111} is represented as the 36th cyclic equivalence group.

[0181] In the embodiment of the present invention, the number of scale lines of the annular scale line can be the binary digit multiplied by the preset number of repetition groups. For example, if the number of repetition groups is 4 and the binary digit is 4, the annular scale line consists of 4*4=16 scale lines.

[0182] In the embodiment of the present invention, the step of performing scale identification on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale includes:

[0183] Perform sequence matching on the target scale mark sequence and the cycle equivalent group to obtain a target group number;

[0184] Obtaining the division interval length corresponding to the cyclic equivalent group, and performing calculation according to the division interval length and the target number of groups to obtain an initial scale;

[0185] The target scale is determined according to the positional relationship of the annular scale lines in the annular scale line image and the initial scale.

[0186] In an embodiment of the present invention, the result of multiplying the division interval length by the target number of groups can be used as the initial scale; the positional relationship is the relative positional relationship between the annular scale line and the unmarked area in the annular scale line image. If the positional relationship is smaller than the annular scale line, the target scale obtained is smaller than the initial scale; if the positional relationship is larger than the annular scale line, the target scale obtained is larger than the initial scale.

[0187] The present invention realizes scale recognition by identifying the annular scale lines of the scale image, thereby avoiding the problem of limited recognition content caused by the influence of the observation angle during the recognition process, expanding the scale presentation range in the recognition image, and realizing that scale information can be obtained at any angle; through line recognition, combined with binary digits and cyclic equivalent groups, scale reading is realized, enriching the scale reading form in the scale recognition process, performing scale recognition in binary form, and improving recognition efficiency. Therefore, the annular scale recognition method proposed by the present invention can solve the problem of being unable to efficiently recognize the scale without being affected by the observation angle.

[0188] like Figure 2 FIG. 1 is a schematic diagram of the structure of a part of a ruler provided by an embodiment of the present invention. The following is a description of each component of the ruler in conjunction with a specific embodiment:

[0189] In an embodiment of the present invention, the annular scale lines may be marked at a preset position on the surface of the ruler, the ruler may be cylindrical or tubular, and in the application scenario of an endoscope, the ruler refers to an endoscope hose; the annular scale lines refer to line segments marked on the surface of the ruler, the line segments have different lengths and are parallel to the axis of the ruler; the annular scale lines on the ruler are evenly arranged according to a fixed spacing, and there is a blank unmarked area between two adjacent annular scale lines.

[0190] In an embodiment of the present invention, the annular scale lines include a plurality of scale lines distributed at equal intervals, the scale lines are evenly arranged around the outer surface of the ruler, the scale lines are arranged along the circumference of the ruler, the midpoints of the scale lines are located on the same plane, and the plane is perpendicular to the axis of the ruler; the scale line segments of the annular scale lines can be divided into two specifications, long and short, so that the computer can read the scale of the ruler according to the lines of different lengths.

[0191] Furthermore, in an embodiment of the present invention, the longer scale line can be used as a first-class scale mark, which is recorded as 1, and the shorter scale line can be used as a second-class scale mark, which is recorded as 0. According to the positional relationship between the first-class scale mark and the second-class scale mark, that is, the arrangement order, a corresponding binary sequence, that is, a binary scale mark, can be generated.

[0192] In the embodiment of the present invention, for a certain length of the measuring range, different numbers of cyclic equivalent groups can be determined by setting different lengths of the intervals between the circular scale lines, and different numbers of cyclic equivalent groups correspond to different binary digits. For example, if the measuring range is 3 meters, if a circular scale line is marked every 10 cm, a total of 30 circular scale lines are required, and therefore 30 cyclic equivalent groups are required, and the number of binary digits corresponding to the 30 cyclic equivalent groups is 8.

[0193] In the embodiment of the present invention, different binary digits correspond to different cyclic equivalence groups, the binary sequence composition in the cyclic equivalence group is the same as the binary digits, and the binary sequence in the cyclic equivalence group corresponds to the number of cyclic equivalence groups, that is, corresponds to the nth circular scale line.

[0194] In the embodiment of the present invention, the number of scale lines of the annular scale line can be the binary digit multiplied by the preset number of repetition groups. For example, if the number of repetition groups is 4 and the binary digit is 4, the annular scale line consists of 4*4=16 scale lines.

[0195] In an embodiment of the present invention, the result of multiplying the interval length by the target number of groups can be used as the initial scale; the target scale is determined according to the relative position relationship between the annular scale lines and the unmarked area in the annular scale line image; if the position relationship is smaller than the annular scale lines, the obtained target scale is smaller than the initial scale; if the position relationship is larger than the annular scale lines, the obtained target scale is larger than the initial scale.

[0196] like Figure 3 , which is a functional module diagram of an annular scale recognition device 100 provided in one embodiment of the present invention. According to the functions to be implemented, the annular scale recognition device may include an image acquisition module 101, a scale line recognition module 102, a binary scale mark sequence generation module 103 and a scale recognition module 104. The module of the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of the annular scale recognition device and can complete fixed functions, and is stored in the memory of the annular scale recognition device.

[0197] In this embodiment, the functions of each module / unit are as follows:

[0198] The image acquisition module 101 is used to acquire a scale image;

[0199] The scale line recognition module 102 is used to perform scale line recognition on the scale image to obtain a ring scale line image;

[0200] The binary scale mark sequence generation module 103 is used to perform line recognition on the annular scale line image, generate binary scale marks according to the line recognition result; extract the target scale mark sequence from the binary scale marks according to the preset binary digit number;

[0201] The scale recognition module 104 is used to perform scale recognition on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

[0202] In detail, each module described in the annular scale recognition device 100 described in the embodiment of the present invention adopts the same technical means as the annular scale recognition method described in the accompanying drawings when used, and can produce the same technical effects, which will not be repeated here.

[0203] like Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for identifying annular scales provided by an embodiment of the present invention.

[0204] The electronic device 200 may include a processor 201 , a memory 202 , a communication bus 203 , and a communication interface 204 , and may also include a computer program stored in the memory 202 and executable on the processor 201 , such as a ring scale recognition program.

[0205] In some embodiments, the processor 201 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 201 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 202 (for example, executing a ring scale recognition program, etc.), and calls data stored in the memory 202 to execute various functions of the electronic device and process data.

[0206] The memory 202 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 202 may be an internal storage unit of an electronic device in some embodiments, such as a mobile hard disk of the electronic device. The memory 202 may also be an external storage device of an electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 202 may also include both an internal storage unit of the electronic device and an external storage device. The memory 202 may not only be used to store application software and various types of data installed in the electronic device, such as the code of the ring scale recognition program, etc., but may also be used to temporarily store data that has been output or is to be output.

[0207] The communication bus 203 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 202 and at least one processor 201, etc.

[0208] The communication interface 204 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0209] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4The structure shown does not constitute a limitation on the electronic device 200 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0210] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 201 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0211] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0212] The annular scale recognition program stored in the memory 202 in the electronic device 200 is a combination of multiple instructions. When running in the processor 201, it can achieve:

[0213] Acquire a scale image, perform scale line recognition on the scale image, and obtain a ring scale line image;

[0214] Performing line recognition on the annular scale line image, and generating binary scale marks according to the line recognition result;

[0215] extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits;

[0216] The target scale mark sequence is scale-identified according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

[0217] Specifically, the specific implementation method of the processor 201 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0218] Furthermore, if the module / unit integrated in the electronic device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0219] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0220] Acquire a scale image, perform scale line recognition on the scale image, and obtain a ring scale line image;

[0221] Performing line recognition on the annular scale line image, and generating binary scale marks according to the line recognition result;

[0222] extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits;

[0223] The target scale mark sequence is scale-identified according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

[0224] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0225] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0226] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0227] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0228] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0229] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0230] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for identifying an annular scale, characterized in that: The method comprises: Acquire a scale image, perform scale line recognition on the scale image, and obtain a ring scale line image; Performing line recognition on the annular scale line image, and generating binary scale marks according to the line recognition result; extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits; The target scale mark sequence is scale-identified according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

2. The annular scale recognition method according to claim 1, characterized in that: The step of generating a binary scale mark according to the result of line recognition includes: The line recognition result is divided into long and short categories to obtain first-category scale marks and second-category scale marks; Determine the positional relationship between the first type of scale mark and the second type of scale mark according to the annular scale line; Binary scale marks are generated according to the first type of scale marks and the second type of scale marks and corresponding positional relationships.

3. The annular scale recognition method according to claim 2, characterized in that: The step of extracting a target scale mark sequence from the binary scale marks according to a preset number of binary digits includes: Extracting the scale marks to be generated from the binary scale marks in sequence according to the number of binary digits; A target scale mark sequence is generated according to the scale marks to be generated and the corresponding positional relationship.

4. The annular scale recognition method according to claim 1, characterized in that: Before performing scale identification on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits, the method further includes: Obtaining a preset range and a preset interval length, and determining the number of cyclic equivalent groups according to the range and the interval length; Generate cyclic equivalence groups according to the number of cyclic equivalence groups according to binary rules, and determine corresponding binary digits according to the cyclic equivalence groups.

5. The annular scale recognition method according to claim 1, characterized in that: The step of performing scale identification on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale includes: Perform sequence matching on the target scale mark sequence and the cycle equivalent group to obtain a target group number; Obtaining the division interval length corresponding to the cyclic equivalent group, and performing calculation according to the division interval length and the target number of groups to obtain an initial scale; The target scale is determined according to the positional relationship of the annular scale lines in the annular scale line image and the initial scale.

6. The annular scale recognition method according to claim 1, characterized in that: The performing line recognition on the annular scale line image comprises: Gray-scaling the annular scale line image to obtain a gray-scale image; A scale line is extracted from the grayscale image according to pixel values ​​of the grayscale image.

7. The annular scale recognition method according to claim 1, characterized in that: The step of performing scale line recognition on the scale image to obtain a ring-shaped scale line image includes: Performing type recognition on the scale image to obtain multiple type labels; Performing image segmentation on the scale image according to the type label to obtain a segmented image corresponding to the type label; A ring scale line image is extracted from the segmented image according to preset scale line labels.

8. A ring scale recognition device, characterized in that: The device comprises: An image acquisition module, used for acquiring a scale image; A scale line recognition module, used to perform scale line recognition on the scale image to obtain a ring scale line image; A binary scale mark sequence generation module is used to perform line recognition on the annular scale line image, generate binary scale marks according to the line recognition result; and extract a target scale mark sequence from the binary scale marks according to a preset number of binary digits; The scale recognition module is used to perform scale recognition on the target scale mark sequence according to the cyclic equivalent group corresponding to the binary digits to obtain the target scale.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the steps in the annular scale recognition method according to any one of claims 1 to 7.

10. A ruler, characterized in that: Applicable to the annular scale recognition method according to any one of claims 1 to 7, wherein the scale is configured to be cylindrical or tubular; The surface of the scale is provided with a plurality of evenly distributed annular scale lines; Each of the annular scale lines is composed of a plurality of scale lines distributed at equal intervals; The lengths of the scale lines are different; The midpoints of the scale lines are located in the same plane, and the plane is perpendicular to the central axis of the ruler.