Double-scale identification method and system and rotary table

Through the dual-scale recognition method and system, optical character recognition and linear detection algorithm are used, combined with the k-means clustering algorithm, the scale on the turntable is accurately identified, which solves the complex and time-consuming problem of turntable calibration and realizes efficient recognition of turntable rotation angle and calibration.

CN119152519APending Publication Date: 2024-12-17ROCKETECH TECH CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411101503.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing rotary table calibration methods are complex and time-consuming, making it difficult to obtain the rotary table rotation angle accurately and efficiently.

Method used

Using a dual-scale recognition method and system, the main scale and subscale images are taken, and the optical character recognition module and linear detection algorithm are used to identify the scales, combined with the k-means clustering algorithm to filter and calculate, accurately identify the scales on the turntable. , thereby detecting the rotation angle of the turntable.

Benefits of technology

It realizes accurate and efficient identification of the rotation angle of the turntable, simplifies the calibration process, provides a good calibration foundation, and avoids dependence on high-precision mechanical encoders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152519A_ABST
    Figure CN119152519A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of photogrammetry and image processing, and provides a double-scale identification method and system and a turntable, and the method comprises the steps: S1, photographing a calibrated scale picture; s2, identifying the first scale number and the second scale number, and detecting a straight line segment in the calibrated scale picture; s3, screening a main scale line and an auxiliary scale line; s4, screening out a first long scale line and a first short scale line; screening out a second long scale line and a second short scale line; s5, matching the first long scale line with the first scale number, and calculating the scale corresponding to the first short scale line to obtain the scale corresponding to each main scale line; s6, numbering the auxiliary scale lines, wherein the number is a second scale number; finding an auxiliary scale line and a main scale line with the minimum pixel horizontal distance difference; s7, finding a main scale line corresponding to the second long scale line; and S8, obtaining the current scale. According to the scheme, the scales on the turntable can be accurately and efficiently identified, so that the rotation angle of the turntable is detected, and a good calibration basis is provided for turntable calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photogrammetry and image processing, and in particular to a dual-scale recognition method, system and turntable. Background Art

[0002] A turntable is a complex optoelectronic measuring device used to provide high-precision target pointing. Based on the number of rotating axes, turntables can be divided into single-axis turntables, dual-axis turntables, three-axis turntables, and multi-axis turntables. Turntables are widely used in photogrammetry, industrial production, and scientific research. Tracking and measurement of moving targets, terminal defense systems of warships, etc. all require turntables.

[0003] The accuracy of the turntable directly affects the accuracy of the measurement and the success of the task. In order to improve the accuracy of the turntable, the angle error is generally reduced by improving the machining accuracy, improving the structure of the turntable, using high-precision encoders, etc.

[0004] In actual measurement tasks, in order to obtain the actual position of the target, the turntable needs to be calibrated first. During the calibration process, some cooperative marks are used to link the turntable angle with the actual position in space. The current turntable calibration method requires setting multiple cooperative marks at a certain distance from the turntable, and each cooperative mark needs to obtain its three-dimensional coordinates. The overall process is relatively complicated, and the overall time for the operator to calibrate in real time is also relatively long.

[0005] If a scale is installed on the turntable and photographed by a photographic device, the precise rotation angle of the turntable can be obtained, which can provide a good calibration basis for the turntable.

[0006] Therefore, it is necessary to provide a dual-scale recognition method, system and turntable that can accurately identify the scale on the turntable, thereby detecting the rotation angle of the turntable and providing a good calibration basis for the calibration of the turntable.

[0007] The above information disclosed in the Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0008] The main purpose of the present invention is to overcome the problem that the rotation angle of the turntable cannot be accurately and efficiently obtained, and to provide a dual-scale recognition method, system and turntable, which can accurately and efficiently identify the scale on the turntable, thereby detecting the rotation angle of the turntable and providing a good calibration basis for the calibration of the turntable.

[0009] To achieve the above-mentioned purpose, the present invention provides a dual-scale recognition method in a first aspect, comprising the following steps:

[0010] S1: photographing a scale picture, the scale picture comprising a main scale and a sub-scale, the main scale comprising a plurality of main scale lines and a plurality of first scale numbers, the plurality of main scale lines comprising a plurality of first long scale lines and a plurality of first short scale lines; the first scale numbers are marked on the first long scale lines, and a plurality of first short scale lines are arranged between every two first long scale lines; the sub-scale comprises a plurality of sub-scale lines, the plurality of sub-scale lines comprising a second long scale line and a plurality of second short scale lines, and the second short scale lines are all arranged on the same side of the second long scale line;

[0011] S2: Identify the first scale number and detect the straight line segment in the scale image;

[0012] S3: filter the major and minor scale lines;

[0013] S4: Filter out the first long scale line and the first short scale line from the main scale lines; filter out the second long scale line and the second short scale line from the secondary scale lines;

[0014] S5: Match the first long scale line with the first scale number, and calculate the scale corresponding to the first short scale line to obtain the scale corresponding to each main scale line;

[0015] S6: numbering the secondary scale lines, the numbers being the second scale numbers; calculating the pixel horizontal distance between each secondary scale line and the primary scale line, and finding the secondary scale line and the primary scale line with the smallest difference in pixel horizontal distance;

[0016] S7: Find the main scale line corresponding to the second longest scale line;

[0017] S8: Obtain the current scale according to the scale corresponding to the main scale line, the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance, and the main scale line corresponding to the second longest scale line.

[0018] According to an exemplary embodiment of the present invention, the distance between every two main scale lines is equal; the distance between every two secondary scale lines is equal.

[0019] According to an exemplary embodiment of the present invention, step S5, step S6 and step S7 may be performed simultaneously.

[0020] According to an exemplary embodiment of the present invention, in step S2, the first scale numbers and the second scale numbers are recognized by an optical character recognition module.

[0021] According to an exemplary embodiment of the present invention, in step S2, detecting straight line segments in the scale image includes:

[0022] S221: Binarize the image;

[0023] S222: Detect straight line segments using a straight line detection algorithm.

[0024] According to an exemplary embodiment of the present invention, the line detection algorithm includes an LSD line detection algorithm or an EDLine line detection algorithm.

[0025] According to an exemplary embodiment of the present invention, in step S3, before filtering the main scale lines and the secondary scale lines, the scale lines are first filtered out from the straight line segments;

[0026] The step of selecting scale lines from the straight line segments comprises:

[0027] The scale lines include main scale lines and secondary scale lines, and the scale lines are set vertically in the scale picture;

[0028] Get the coordinates of both ends of each straight line segment and calculate the angle of each straight line segment. If the angle of the straight line segment is greater than or equal to the specified angle threshold, the straight line segment is considered to be a scale line.

[0029] According to an exemplary embodiment of the present invention, in step S3, screening out the main scale lines and the secondary scale lines includes:

[0030] The k-means clustering algorithm is used to screen out the main scale lines and minor scale lines.

[0031] According to an exemplary embodiment of the present invention, the step of using a k-means clustering algorithm to select the main scale lines and the secondary scale lines includes:

[0032] The major scale lines are located above or below the minor scale lines in the image;

[0033] Find the midpoint of the scale line, and use the k-means clustering algorithm to divide the scale lines into two categories according to the ordinate of the midpoint of the scale line.

[0034] According to an exemplary embodiment of the present invention, in step S4, a first long scale line and a first short scale line are selected from the main scale lines by the length of the scale lines; a second long scale line and a second short scale line are selected from the secondary scale lines by the length of the scale lines.

[0035] According to an exemplary embodiment of the present invention, in step S8, the current scale is obtained according to the scale corresponding to the main scale line, the secondary scale line with the smallest difference in pixel horizontal distance and the main scale line, and the main scale line corresponding to the second long scale line using formula 5:

[0036]

[0037] Among them, S represents the current scale. The scale of the first long scale line is S1, the scale of the second long scale line is S2, and the scale of the third long scale line is S3. S1<S2<S3. There are n-1 first short scale lines between the first long scale line S1 and the second long scale line S2. S1j It represents the jth first short scale line between the first long scale line S1 and the second long scale line S2. id is the number of the minor scale line. The minor scale lines are numbered 0, 1, 2, 3…, N starting from the second long scale line.

[0038] As a second aspect of the present invention, the present invention provides a dual-scale recognition system, comprising: a photographing module and a recognition module communicatively connected;

[0039] The shooting module is used to shoot a scale picture, which includes a main scale and a sub-scale, the main scale includes a plurality of main scale lines and a plurality of first scale numbers, the plurality of main scale lines include a plurality of first long scale lines and a plurality of first short scale lines; the sub-scale includes a plurality of sub-scale lines, the plurality of sub-scale lines include a second long scale line and a plurality of second short scale lines, and the second short scale lines are all arranged on the same side of the second long scale line;

[0040] The recognition module is used to recognize the first scale number and detect the straight line segment in the scale ruler picture; select the main scale line and the secondary scale line; select the first long scale line and the first short scale line from the main scale line; select the second long scale line and the second short scale line from the secondary scale line; match the first long scale line with the first scale number, and calculate the scale corresponding to the first short scale line; number the secondary scale line, which is the second scale number; calculate the pixel horizontal distance between each secondary scale line and the main scale line, and find the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance; find the main scale line corresponding to the second long scale line; obtain the current scale according to the scale corresponding to the main scale line, the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance, and the main scale line corresponding to the second long scale line.

[0041] As a third aspect of the present invention, the present invention provides a turntable, comprising the dual-scale recognition system, a rotating shaft, a fixed end, a main scale and a secondary scale;

[0042] The main scale is arranged on the rotating shaft, and the auxiliary scale is arranged on the fixed end, or the main scale is arranged on the fixed end, and the auxiliary scale is arranged on the rotating shaft;

[0043] The shooting module of the dual-scale recognition system is fixedly connected to the fixed end.

[0044] This solution sets two scales on the turntable and does not require a high-precision mechanical encoder. By photographing the two scales, the scales on the turntable can be accurately and efficiently identified, thereby detecting the rotation angle of the turntable, providing a good calibration basis for the turntable calibration. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The above and other objects, features and advantages of the present application will become more apparent by describing in detail the exemplary embodiments thereof with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application, and it is clear to a person skilled in the art that other accompanying drawings can be obtained from these accompanying drawings without creative effort.

[0046] Figure 1 A schematic diagram of a turntable is shown schematically.

[0047] Figure 2 The steps of the dual-scale recognition method are schematically shown.

[0048] Figure 3 A schematic diagram of dual-scale calculation is shown schematically.

[0049] Among them, 1 is the main scale, 2 is the secondary scale, 3 is the scale recognition system, 4 is the rotating axis, and 5 is the fixed end. DETAILED DESCRIPTION

[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0051] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0053] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0054] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0055] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0056] According to a first specific embodiment of the present invention, the present invention provides a turntable, comprising a dual-scale identification system 3 , a rotating shaft 4 , a fixed end 5 , a main scale 1 and a secondary scale 2 .

[0057] The main scale 1 is arranged on the rotating shaft 4, and the auxiliary scale 2 is arranged on the fixed end 5, or the main scale 1 is arranged on the fixed end 5, and the auxiliary scale 2 is arranged on the rotating shaft 4. When the rotating shaft 4 rotates, the main scale 1 and the auxiliary scale 2 move relative to each other.

[0058] like Figure 1 As shown, when the rotating shaft 3 of the turntable rotates, the main scale 1 rotates accordingly, and the position of the main scale 1 indicated by the auxiliary scale 2 changes. By photographing the position of the main scale 1 indicated by the auxiliary scale 2, the scale is identified, and then the rotation angle of the turntable is obtained for calibration.

[0059] The dual-scale recognition system 3 includes: a photographing module and a recognition module that are communicatively connected, wherein the photographing module is fixedly connected to the fixed end 5 .

[0060] The shooting module is used to shoot a scale picture, which includes a main scale 1 and a sub-scale 2. The main scale 1 includes multiple main scale lines and multiple first scale numbers, and the multiple main scale lines include multiple first long scale lines and multiple first short scale lines; the sub-scale 2 includes multiple sub-scale lines, and the multiple sub-scale lines include a second long scale line and multiple second short scale lines, and the second short scale lines are all arranged on the same side of the second long scale line.

[0061] The recognition module is used to recognize the first scale number and detect the straight line segment in the scale ruler picture; select the main scale line and the secondary scale line; select the first long scale line and the first short scale line from the main scale line; select the second long scale line and the second short scale line from the secondary scale line; match the first long scale line with the first scale number, and calculate the scale corresponding to the first short scale line; number the secondary scale line, which is the second scale number; calculate the pixel horizontal distance between each secondary scale line and the main scale line, and find the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance; find the main scale line corresponding to the second long scale line; obtain the current scale according to the scale corresponding to the main scale line, the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance, and the main scale line corresponding to the second long scale line.

[0062] According to a second specific embodiment of the present invention, the present invention provides a dual-scale identification method, using the turntable of the first specific embodiment, such as Figure 2 As shown, the following steps are included:

[0063] S1: Take a picture of the ruler.

[0064] like Figure 1 and Figure 3 As shown, the scale picture includes a main scale 1 and a sub-scale 2.

[0065] The main scale 1 includes a plurality of main scale lines and a plurality of first scale numbers. The plurality of main scale lines include a plurality of first long scale lines and a plurality of first short scale lines. The first scale numbers are marked on the first long scale lines, and a plurality of first short scale lines are arranged between every two first long scale lines.

[0066] The auxiliary scale 2 includes a plurality of auxiliary scale lines, and the plurality of auxiliary scale lines include a second long scale line and a plurality of second short scale lines, and the second short scale lines are all arranged on the same side of the second long scale line.

[0067] The distance between every two main scale lines is equal; the distance between every two minor scale lines is equal. The distance between every two minor scale lines is smaller than the distance between every two main scale lines.

[0068] The distance between the secondary scale lines is smaller than the distance between the main scale lines. If there are 10 second short scale lines (excluding the secondary scale lines of the scale indicator), the distance between the secondary scale lines is 9 / 10 of the distance between the main scale lines. If there are N second short scale lines (excluding the secondary scale lines of the scale indicator), the distance between the secondary scale lines is (N-1) / N of the distance between the main scale lines, where N is a natural number greater than 1.

[0069] like Figure 3As shown, as a preferred embodiment, four short scale lines are set between every two main scale lines. In the scale ruler image, the main scale lines and the secondary scale lines are set vertically. When the rotating shaft 4 rotates counterclockwise, the second short scale lines are set on the right side of the second long scale lines; when the rotating shaft 4 rotates clockwise, the second short scale lines are set on the left side of the second long scale lines. The first long scale line is marked with the first scale number, which is S1, S2, S3, etc. The first scale number is the angle corresponding to the main scale line, ranging from [0, 360]. S1, S2, S3 is a scale number code, which represents the three consecutive first scale numbers seen by the camera.

[0070] S2: Identify the first scale number and detect the straight line segment in the scale image.

[0071] The first scale numbers and the second scale numbers are recognized by an optical character recognition (OCR) module.

[0072] At least three first scale digits must be identified.

[0073] The straight line segments detected in the ruler image include:

[0074] S221: Binarize the image.

[0075] Use the adaptive threshold algorithm (adaptiveThreshold function in opencv) to binarize the scale image.

[0076] S222: Detect straight line segments using a straight line detection algorithm.

[0077] The line detection algorithm includes but is not limited to the LSD line detection algorithm or the EDLine line detection algorithm.

[0078] S3: Filter major and minor tick marks.

[0079] Since the detected straight line segments include scale lines and some horizontal edge lines, the horizontal edge lines need to be removed. Therefore, before filtering the main scale lines and the minor scale lines, the scale lines are first filtered out from the straight line segments.

[0080] Filtering tick marks from straight line segments includes:

[0081] The scale lines include main scale lines and secondary scale lines, and the scale lines are set vertically in the scale picture;

[0082] Get the coordinates of both ends of each straight line segment and calculate the angle of each straight line segment. If the angle of the straight line segment is greater than or equal to the specified angle threshold, the straight line segment is considered to be a scale line.

[0083] The details are as follows: A total of t straight line segments are detected, and the image coordinates of the two ends of the i-th straight line segment are (u i,0 , v i,0 )、(u i,1 , v i,1 ), then the angle of the straight line segment in the image is calculated using formula 1:

[0084]

[0085] Among them, θ i is the angle of the i-th straight line segment in the image, and the image coordinates of the two ends of the i-th straight line segment are (u i,0 , v i,0 )、(u i,1 , v i,1 ), i is a natural number greater than 0.

[0086] The angle threshold is π / 3.

[0087] If θ i If the angle is greater than or equal to the angle threshold, the straight line segment is considered to be a scale line and is retained; otherwise, the straight line segment is considered to be a horizontal edge line and is discarded.

[0088] Filter major and minor ticks include:

[0089] The k-means clustering algorithm is used to screen out the main scale lines and minor scale lines.

[0090] The k-means clustering algorithm is used to screen out the main scale lines and minor scale lines including:

[0091] The major scale lines are located above or below the minor scale lines in the image;

[0092] Find the midpoint of the scale line, and use the k-means clustering algorithm to divide the scale lines into two categories according to the ordinate of the midpoint of the scale line.

[0093] The details are as follows: Figure 3 As shown, first determine the clustering categories into two categories, one is the main scale line, the other is the secondary scale line. Figure 3 The main scale line is located above the secondary scale line. As can be seen from the image, the horizontal direction is the abscissa and the vertical direction is the ordinate. The ordinate of the midpoint of the scale line is used for classification. The initial cluster center is rotated to the center point of the two scale lines with the largest and smallest ordinates, and the k-means clustering algorithm is used to cluster the main scale lines and the secondary scale lines.

[0094] S4: Filter out the first long scale line and the first short scale line from the main scale lines; filter out the second long scale line and the second short scale line from the secondary scale lines.

[0095] The first long scale line and the first short scale line are selected from the main scale lines according to the length of the scale lines; the second long scale line and the second short scale line are selected from the secondary scale lines according to the length of the scale lines.

[0096] Specifically, taking the main scale line as an example, the calculation method of the secondary scale line is the same as that of the main scale line.

[0097] The length of each main scale line in the image is calculated. If the length is less than the length threshold, it is considered to be the first short scale line, otherwise it is considered to be the first long scale line; the length threshold is greater than the length of the first short scale line and less than the length of the first long scale line.

[0098] The length of each major scale line in the image is calculated using formula 2:

[0099]

[0100] Among them, L i represents the length of the i-th major scale line in the image; the image coordinates at both ends of the i-th major scale line are (u i,0 ,vi ,0 )、(u i,1 , v i,1 ), i is a natural number greater than 0.

[0101] The length threshold is k×meanL.

[0102] The average length meanL of all major scale lines satisfies formula 3:

[0103]

[0104] Where meanL is the average length of all major scale lines, and m is the total number of major scale lines.

[0105] If L i If the length is less than the threshold, the i-th main scale line is the first short scale line, otherwise the i-th main scale line is the first long scale line. k is a constant, and the value range of k is related to the actual length ratio of the first long scale line to the first short scale line. Generally, k is 1.2.

[0106] S5: Match the first long scale line with the first scale number, and calculate the scale corresponding to the first short scale line to obtain the scale corresponding to each main scale line.

[0107] Step S5, step S6 and step S7 may be performed simultaneously.

[0108] Formula 4 is used to calculate the scale corresponding to the first short scale line:

[0109] S=S1 j +j×(S2-S1)÷n Formula 4;

[0110] Among them, the scale of the first long scale line is S1, the scale of the second long scale line is S2, S1<S2, there are n-1 short scale lines between the first long scale line S1 and the second long scale line S2, S1 j Represents the j-th short scale line, where j is a natural number from 0 to n-1, and n is a natural number greater than 0.

[0111] S10 is equal to S1.

[0112] As a preferred embodiment, n is 5.

[0113] S6: number the minor scale lines, which are the second scale numbers; calculate the pixel horizontal distance between each minor scale line and the major scale line, and find the minor scale line and the major scale line with the smallest difference in pixel horizontal distance.

[0114] After the short scale lines are identified, they are numbered in order, and the numbers are the second scale numbers. The second long scale line to the second short scale line are marked as the second scale numbers in sequence, which are 0, 1, 2, 3, etc.

[0115] like Figure 3 As shown, Figure 3 The difference in horizontal distance of S24 pixels between the 9th minor scale line, i.e. the 8th second short scale line, and the first short scale line of the main scale line is the smallest.

[0116] S7: Find the main scale line corresponding to the second longest scale line.

[0117] Find the major tick marks on either side of the second longest tick mark.

[0118] According to the main scale lines on both sides of the second longest scale line found, the main scale corresponding to the minor scale line can be obtained.

[0119] Figure 3 In the diagram, the second long scale line is located between the first short scale line and the second short scale line between the first long scale line S1 and the second long scale line S2. Figure 3 The main scale corresponding to the minor scale line in is:

[0120]

[0121] S8: Obtain the current scale according to the scale corresponding to the main scale line, the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance, and the main scale line corresponding to the second longest scale line.

[0122] The position indicated by the second long scale line is the current scale. The current scale includes the sum of two parts. The first part is the scale of the second short scale line with smaller scale on both sides of the second long scale line. The second part is the horizontal distance in pixels between the second long scale line and the second short scale line with smaller scale on both sides of the second long scale line. The second part can be calculated through the distance relationship between the secondary scale line and the main scale line.

[0123] The current scale is obtained according to the scale corresponding to the main scale line, the minor scale line and the main scale line with the smallest difference in pixel horizontal distance, and the main scale line corresponding to the second longest scale line using formula 5:

[0124]

[0125] Among them, S represents the current scale. The scale of the first long scale line is S1, the scale of the second long scale line is S2, and the scale of the third long scale line is S3. S1<S2<S3. There are n-1 first short scale lines between the first long scale line S1 and the second long scale line S2. S1 j It represents the jth first short scale line between the first long scale line S1 and the second long scale line S2. id is the number of the minor scale line. The minor scale lines are numbered 0, 1, 2, 3…, N starting from the second long scale line.

[0126] Divide S1 and S2 into n parts, preferably n is 5 and N is 10. S1 j The main scale corresponding to the scale indicator line. When id is 0, it is the long scale in the secondary scale. When id is 0, it is the same as when id is N. If the 0th line is aligned, the Nth line must also be aligned.

[0127] like Figure 3 As shown, referring to the vernier caliper reading principle, Formula 5 is derived:

[0128] Known conditions: the distance between the main scale lines is d, the distance between the secondary scale lines is N, (N-1) / N*d, Figure 3 Where N is 10.

[0129] Assume that the current scale reading is: S1j+x

[0130] Since the line numbered id in the minor scale is most aligned with the main scale, we can get:

[0131] S1j+x+id*(N-1) / N*d=S1j+id*d

[0132] So: x = 1 / N*d*id

[0133] In formula 5 It is the width d of the major scale lines.

[0134] use It can express the minimum scale difference between the main scale lines. Similarly, it can be used Instead, the result is the same, they both represent the minimum scale difference between the main scale lines. This value is fixed after design, and you can also use the preset value directly.

[0135] This solution sets a dual scale on the turntable, and does not require a high-precision mechanical encoder. By photographing the scale, the scale on the turntable can be accurately and efficiently identified, thereby detecting the rotation angle of the turntable, providing a good calibration basis for the turntable calibration.

[0136] The exemplary embodiments of the present invention are specifically shown and described above. It should be understood that the present invention is not limited to the detailed structure, configuration or implementation method described herein; on the contrary, the present invention is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.

Claims

1. A dual-scale recognition method, characterized in that: The following steps are involved: S1: photographing a scale picture, the scale picture comprising a main scale and a sub-scale, the main scale comprising a plurality of main scale lines and a plurality of first scale numbers, the plurality of main scale lines comprising a plurality of first long scale lines and a plurality of first short scale lines; the first scale numbers are marked on the first long scale lines, and a plurality of first short scale lines are arranged between every two first long scale lines; the sub-scale comprises a plurality of sub-scale lines, the plurality of sub-scale lines comprising a second long scale line and a plurality of second short scale lines, and the second short scale lines are all arranged on the same side of the second long scale line; S2: Identify the first scale number and detect the straight line segment in the scale image; S3: filter the major and minor scale lines; S4: Filter out the first long scale line and the first short scale line from the main scale lines; Filter out the second long scale line and the second short scale line from the minor scale lines; S5: Match the first long scale line with the first scale number, and calculate the scale corresponding to the first short scale line to obtain the scale corresponding to each main scale line; S6: Number the secondary scale line, which is the second scale number; Calculate the pixel horizontal distance between each minor scale line and the major scale line, and find the minor scale line and the major scale line with the smallest difference in pixel horizontal distance; S7: Find the main scale line corresponding to the second longest scale line; S8: Obtain the current scale according to the scale corresponding to the main scale line, the secondary scale line and the main scale line with the smallest difference in pixel horizontal distance, and the main scale line corresponding to the second longest scale line.

2. The dual-scale recognition method according to claim 1, characterized in that: The distance between every two major scale lines is equal; the distance between every two minor scale lines is equal.

3. The dual-scale recognition method according to claim 1, characterized in that: Step S5, step S6 and step S7 may be performed simultaneously.

4. The dual-scale recognition method according to claim 1, characterized in that: In step S3, before filtering the main scale lines and the secondary scale lines, first filter out the scale lines from the straight line segments; The step of selecting scale lines from the straight line segments comprises: The scale lines include main scale lines and secondary scale lines, and the scale lines are set vertically in the scale picture; Get the coordinates of both ends of each straight line segment and calculate the angle of each straight line segment. If the angle of the straight line segment is greater than or equal to the specified angle threshold, the straight line segment is considered to be a scale line.

5. The dual-scale recognition method according to claim 4, characterized in that: In step S3, the screening of the main scale lines and the secondary scale lines includes: The k-means clustering algorithm is used to screen out the main scale lines and minor scale lines.

6. The dual-scale recognition method according to claim 5, characterized in that: The method of using the k-means clustering algorithm to select the main scale lines and the secondary scale lines includes: The main scale lines are located above or below the scale lines in the image; Find the midpoint of the scale line, and use the k-means clustering algorithm to divide the scale lines into two categories according to the ordinate of the midpoint of the scale line.

7. The double scale line recognition method according to claim 1, characterized in that: In step S4, a first long scale line and a first short scale line are selected from the main scale lines according to the length of the scale lines; a second long scale line and a second short scale line are selected from the secondary scale lines according to the length of the scale lines; The first long scale line is longer than the first short scale line, and the second long scale line is longer than the second short scale line.

8. The double scale line recognition method according to claim 1, characterized in that: In step S8, the current scale is obtained according to the scale corresponding to the main scale line, the secondary scale line with the smallest difference in pixel horizontal distance and the main scale line, and the main scale line corresponding to the second long scale line using formula 5: Among them, S represents the current scale. The scale of the first long scale line is S1, the scale of the second long scale line is S2, and the scale of the third long scale line is S3. S1<S2<S3. There are n-1 first short scale lines between the first long scale line S1 and the second long scale line S2. S1 j It represents the jth first short scale line between the first long scale line S1 and the second long scale line S2. id is the number of the minor scale line. The minor scale lines are numbered 0, 1, 2, 3…, N starting from the second long scale line.

9. A dual-scale recognition system, characterized in that: include: A photographing module and an identification module that are communicatively connected; The shooting module is used to shoot a scale picture, which includes a main scale and a sub-scale, the main scale includes a plurality of main scale lines and a plurality of first scale numbers, the plurality of main scale lines include a plurality of first long scale lines and a plurality of first short scale lines; the first scale numbers are marked on the first long scale lines, and a plurality of first short scale lines are arranged between every two first long scale lines; the sub-scale includes a plurality of sub-scale lines, the plurality of sub-scale lines include a second long scale line and a plurality of second short scale lines, and the second short scale lines are all arranged on the same side of the second long scale line; The recognition module is used to recognize the first scale number and detect the straight line segment in the scale image; select the main scale line and the secondary scale line; Select the first long scale line and the first short scale line from the main scale lines; Filter out the second long scale line and the second short scale line from the minor scale lines; Match the first long scale line with the first scale number, and calculate the scale corresponding to the first short scale line to obtain the scale corresponding to each main scale line; number the secondary scale line, and the number is the second scale number; Calculate the pixel horizontal distance between each minor scale line and the major scale line, find the minor scale line and the major scale line with the smallest difference in pixel horizontal distance; find the major scale line corresponding to the second longest scale line; The current scale is obtained according to the scale corresponding to the main scale line, the minor scale line with the smallest difference in pixel horizontal distance and the main scale line, and the main scale line corresponding to the second longest scale line.

10. A turntable, characterized in that: include: The dual scale recognition system, rotating shaft, fixed end, main scale and auxiliary scale as described in claim 9; The main scale is arranged on the rotating shaft, and the auxiliary scale is arranged on the fixed end, or the main scale is arranged on the fixed end, and the auxiliary scale is arranged on the rotating shaft; The shooting module of the dual-scale recognition system is fixedly connected to the fixed end.

Citation Information

Patent Citations

  • Method, device and system for obtaining water level information based on water level gauge measurement image

    CN112013921A

  • Scale identification method and device, electronic equipment and storage medium

    CN114140678A

  • Instrument reading method and device, computer equipment and storage medium

    CN114565911A

  • Calibration glass sheet for chip flip bonding

    CN115274528A

  • Method and device for automatically identifying water level scale value

    CN115457291A