Disc double-scale identification method and system and rotary table

By photographing and identifying the annular main scale and annular auxiliary scale on the turntable, and using straight line detection and clustering algorithms to accurately identify the turntable scale, it solves the complex and time-consuming problem of turntable calibration, achieves efficient and accurate rotation angle detection, and improves the measurement accuracy.

CN118823799APending Publication Date: 2024-10-22ROCKETECH TECH CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411101484.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

The existing turntable calibration method is complex and time-consuming, and it is difficult to obtain the turntable rotation angle accurately and efficiently, resulting in limited measurement accuracy.

Method used

The disc dual-scale recognition method is adopted, by taking and identifying pictures of the annular main scale and the annular auxiliary scale, using the straight line detection algorithm and k-means clustering algorithm to distinguish and calculate the scales, accurately identifying the scales on the turntable, and then detecting the rotation angle.

Benefits of technology

It achieves accurate and efficient identification of the turntable rotation angle, simplifies the calibration process, improves measurement accuracy and efficiency, and reduces dependence on high-precision mechanical encoders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823799A_ABST
    Figure CN118823799A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of photogrammetry and image processing, and provides a disc double-scale identification method and system and a rotary table. Identifying the first scale number and detecting a straight line segment in the calibrated scale picture; distinguishing a main scale line and an auxiliary scale line; 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; 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; numbering the auxiliary scale marks, wherein the number is a second scale number; the included angle between each auxiliary scale line and the main scale line is calculated, and the auxiliary scale line and the main scale line with the minimum included angle difference are found; finding a main scale line corresponding to the second long scale line; and 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 invention relates to the technical field of photogrammetry and image processing, and in particular to a disk double-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 camera, the precise rotation angle of the turntable can be obtained, which can provide a good calibration basis for the turntable. If a scale indicator line is used to align the scale ruler, the distance between the scale indicator line and other scale lines needs to be calculated, which is prone to large errors.

[0006] Therefore, it is necessary to provide a disk dual-scale recognition method, system and turntable, which 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 obtained accurately and efficiently, and to provide a disk 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 method for identifying a double-scale disc in a first aspect, comprising the following steps:

[0010] S1: photographing a scale picture, the scale picture comprising an annular main scale located on the outer circle and an annular sub-scale located on the inner circle, the annular 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 annular 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 lines; the main scale lines and the sub-scale lines intersect at the center of the disk;

[0011] S2: Identify the first scale number and detect the straight line segment in the scale ruler image; remove the non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line;

[0012] S3: Distinguish between major scale lines 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: number the minor scale lines, which are the second scale numbers; calculate the angle between each minor scale line and the main scale line, and find the minor scale line and the main scale line with the smallest angle difference;

[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 angle difference, and the main scale line corresponding to the second longest scale line.

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

[0019] According to an exemplary embodiment of the present invention, the angle between every two minor scale lines is smaller than the angle between every two major scale lines.

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

[0021] According to an exemplary embodiment of the present invention, in step S2, the first scale number is recognized by an optical character recognition module.

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

[0023] S221: Binarize the image;

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

[0025] 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.

[0026] According to an exemplary embodiment of the present invention, in step S2, removing non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line includes:

[0027] The second longest tick mark is set horizontally 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 non-major scale line and a non-minor scale line.

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

[0030] The k-means clustering algorithm is used to distinguish between major and minor scale lines.

[0031] According to an exemplary embodiment of the present invention, the use of a k-means clustering algorithm to distinguish between major scale lines and minor scale lines includes:

[0032] In the ruler image, the horizontal direction is set as the abscissa and the vertical direction is set as the ordinate. The midpoints of all straight line segments are found, and the k-means clustering algorithm is used to divide the straight line segments into two categories according to the distance between the midpoint and the center of the disk or the position of the midpoint in the abscissa direction.

[0033] 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.

[0034] 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 and the main scale line with the smallest angle difference, and the main scale line corresponding to the second long scale line using formula 5:

[0035]

[0036] 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 with the smallest angle difference. The minor scale lines are numbered 0, 1, 2, 3, ..., N starting from the second long scale line, where N is a natural number greater than 1.

[0037] 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;

[0038] The shooting module is used to shoot a scale picture, which includes an annular main scale located on the outer circle and an annular sub-scale located on the inner circle, the annular 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 annular 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 main scale lines and the sub-scale lines intersect at the center of the disk;

[0039] The recognition module is used to recognize the first scale number and detect the straight line segment in the scale ruler picture; remove non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line; distinguish the main scale lines and the minor scale lines; 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 minor 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 minor scale line, which is the second scale number; calculate the angle between each minor scale line and the main scale line, and find the minor scale line and the main scale line with the smallest angle difference; 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 minor scale line and the main scale line with the smallest angle difference, and the main scale line corresponding to the second long scale line.

[0040] 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, an annular main scale and an annular auxiliary scale;

[0041] The annular main scale is arranged on the rotating shaft, and the annular sub-scale is arranged on the fixed end, or the annular main scale is arranged on the fixed end, and the annular sub-scale is arranged on the rotating shaft;

[0042] The shooting module of the dual-scale recognition system is fixed to the position of the annular secondary scale, so that the position of the second long scale line in the scale picture remains unchanged.

[0043] 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

[0044] 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.

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

[0046] Figure 2 The steps of the disk double-scale recognition method are schematically shown.

[0047] Figure 3 A schematic diagram of the double scale of the disk is shown schematically.

[0048] Figure 4 Schematic diagram of the disk dual-scale calculation is shown.

[0049] Among them, 1 is the main annular scale, 2 is the secondary annular scale, 3 is the scale identification system, 4 is the fixed end, and 5 is the load installation platform. 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, a fixed end 4, an annular main scale 1, an annular secondary scale 2 and a load mounting platform 5.

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

[0058] like Figure 1 As shown, Figure 1The middle annular main scale 1 is fixedly connected to the rotating shaft and the load mounting platform 5. The rotating shaft drives the annular main scale 1 and the load mounting platform 5 to rotate. The load mounting platform 5 is used to place a shooting device for shooting distant targets. When the rotating shaft of the turntable rotates, the annular main scale 1 rotates with it, and the position of the annular main scale 1 indicated by the annular sub-scale 2 changes. By shooting the position of the annular main scale 1 indicated by the annular sub-scale 2, the scale is identified, and then the angle of the turntable rotation 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 4 . Figure 1 In the figure, the direction of the shooting module should be from outside to inside, perpendicular to the disk, but it is misplaced to the left side of the picture in order to better see the contents of the disk.

[0060] The shooting module is used to shoot a scale picture, which includes a circular main scale 1 and a circular auxiliary scale 2. Figure 3 As shown, the annular 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 annular sub-scale 2 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 main scale lines and the sub-scale lines intersect at the center of the disk. The angle between every two main scale lines is equal, the angle between every two sub-scale lines is equal, and the angle between every two sub-scale lines is smaller than the angle between every two main scale lines.

[0061] The recognition module is used to recognize the first scale number and detect the straight line segment in the scale ruler picture; remove non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line; distinguish the main scale lines and the minor scale lines; 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 minor 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 minor scale line, which is the second scale number; calculate the angle between each minor scale line and the main scale line, and find the minor scale line and the main scale line with the smallest angle difference; 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 minor scale line and the main scale line with the smallest angle difference, 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 , Figure 3 and Figure 4 As shown, the scale picture includes an annular main scale 1 and an annular auxiliary scale 2.

[0065] The annular 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 annular secondary scale 2 includes a plurality of secondary scale lines, which 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 angle between every two main scale lines is equal; the angle between every two secondary scale lines is equal. The angle between every two secondary scale lines is smaller than the angle between every two main scale lines.

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

[0069] like Figure 3 and Figure 4 As 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 along the small circle where the annular main scale and the secondary scale intersect. The main scale lines extend outward, and the secondary scale lines extend inward. The main scale lines and the secondary scale lines intersect at the center of the disk. When the rotating shaft rotates counterclockwise, the second short scale lines are set below the second long scale lines; when the rotating shaft rotates clockwise, the second short scale lines are set above the second long scale lines. The first long scale line is marked with a first scale number, which is S1, S2, S3, etc. The first scale number is the angle corresponding to the main scale line, ranging from [-90, 90]. S1, S2, S3 is an angle code, and a number is engraved on the scale.

[0070] S2: Identify the first scale number and detect the straight line segment in the scale ruler image; remove the non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line.

[0071] The first scale number is 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] The method of removing non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line comprises:

[0079] The second longest tick mark is set horizontally in the scale picture;

[0080] 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 non-major scale line and a non-minor scale line.

[0081] Since the detected straight line segments include scale lines and some edge lines, the edge lines need to be removed. Therefore, they need to be removed 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:

[0082]

[0083] 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.

[0084] The angle threshold is π / 6.

[0085] If θ iIf the absolute value of is less than or equal to the angle threshold, the straight line segment is considered to be a scale line (main scale line or secondary scale line) and is retained; otherwise, the straight line segment is considered to be an edge straight line on the circumference of the dial and is discarded.

[0086] S3: Distinguish between major and minor scale lines.

[0087] Distinguishing between major and minor tick marks includes:

[0088] The k-means clustering algorithm is used to distinguish between major and minor scale lines.

[0089] Using k-means clustering algorithm to distinguish between major and minor scale lines includes:

[0090] In the ruler image, the horizontal direction is set as the abscissa and the vertical direction is set as the ordinate. The midpoints of all straight line segments are found, and the scale lines are divided into two categories using the k-means clustering algorithm according to the distance between the midpoint and the center of the disk or the position of the midpoint in the abscissa direction.

[0091] The details are as follows, if the distance from the center of the circle is used: Figure 3 and Figure 4 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 on the outside of the arc where the circular main scale and the circular sub-scale intersect, and the sub-scale line is on the inside. As can be seen from the image, the horizontal direction is the abscissa, and the vertical direction is the ordinate. The distance between the midpoint of the scale line and the disk circle is used for classification. The initial cluster center is selected as the center point of the two scale lines with the largest and smallest distances from the center of the circle, and the k-means clustering algorithm is used to cluster the main scale lines and sub-scale lines.

[0092] If the horizontal axis is used for classification: Figure 3 and Figure 4 As shown, first determine the clustering categories into two categories, one is the main scale line, the other is the secondary scale line, Figure 4 In order to better identify the exaggerated painting, Figure 1 As shown, the left and right distinctions of the scale lines are very clear. Figure 3 The main scale line is located on the left side of 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 abscissa of the midpoint of the scale line is used for classification. The initial cluster center is selected as the center point of the two scale lines with the largest and smallest abscissas. The k-means clustering algorithm is used to cluster the main scale lines and the secondary scale lines.

[0093] 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.

[0094] 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.

[0095] 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.

[0096] 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.

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

[0098]

[0099] 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.

[0100] The length threshold is k×meanL.

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

[0102]

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

[0104] 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.

[0105] 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.

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

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

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

[0109] 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 first short scale line, where j is a natural number from 0 to n-1, and n is a natural number greater than 0.

[0110] S10 is equal to S1.

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

[0112] S6: number the minor scale lines, which are the second scale numbers; calculate the angle between each minor scale line and the main scale line, and find the minor scale line and the main scale line with the smallest difference in angle.

[0113] Assume that there are N+1 minor scale lines, 1 of which is the second longest scale line, numbered 0, and N second short scale lines are numbered 1, 2, ..., N from top to bottom. 0 is the second longest scale line at the top of the minor scale lines. Find the minor scale line that aligns best with the main scale line among all the minor scale lines. The specific method is as follows:

[0114] Assuming that there are M+1 main scale lines and N+1 secondary scale lines identified, the angles θ′ of all main scale lines and θ″ of all secondary scale lines are calculated using the angle calculation method of a straight line.

[0115] Then calculate the minimum angle between each minor scale line and the main scale line. The minimum angle between the minor scale line 0 and all the main scale lines is Δθ0, the minimum angle between the minor scale line 1 and all the main scale lines is Δθ1… The minimum angle between the minor scale line N and all the main scale lines is Δθ1.

[0116] Δθ0=min(|θ′0-θ0″|,|θ1-θ0″|,|θ′2-θ0″|,...|θ′ M -θ0|″);

[0117] Δθ1=min(|θ0′-θ1″|,|θ1′-θ1″|,|θ2′-θ1″|,...|θ′ M -θ1″);

[0118] Among them, θ0″ represents the angle of the 0th minor scale line (the second long scale line), and θ1″ represents the angle of the 1st minor scale line (the first second short scale line). θ0′, θ1′, θ2′, θ′ M They are the 0 main scale line angle, the 1 main scale line angle, the 2 main scale line angle, and the M main scale line angle.

[0119] like Figure 3 As shown, Figure 3 The difference between the angles of the second minor scale line, i.e., the first second short scale line, and the first short scale line S14 of the main scale line is the smallest.

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

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

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

[0123] 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.

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

[0125] S13=S1+3×(S2-S1) / 5.

[0126] 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 angle difference, and the main scale line corresponding to the second longest scale line.

[0127] 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 angle 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.

[0128] 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 angle difference, and the main scale line corresponding to the second longest scale line using formula 5:

[0129]

[0130] 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 jIt 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 with the smallest angle difference. The minor scale lines are numbered 0, 1, 2, 3, ..., N starting from the second long scale line, where N is a natural number greater than 1.

[0131] n represents dividing 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.

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

[0133] 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.

[0134] Assume the current scale reading is: S1 j +x;

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

[0136] S1 j +x+id*(N-1) / N*d=S1 j +id*d;

[0137] We can get: x = 1 / N*d*id;

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

[0139] 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.

[0140] 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 calibration of the turntable.

[0141] 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 method for identifying double scales on a disk, characterized in that: The following steps are involved: S1: photographing a scale picture, the scale picture comprising an annular main scale located on the outer circle and an annular sub-scale located on the inner circle, the annular 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 annular 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 lines; the main scale lines and the sub-scale lines intersect at the center of the disk; S2: Identify the first scale number and detect the straight line segment in the scale ruler image; remove the non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line; S3: Distinguish between 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 angle between each minor scale line and the main scale line, and find the minor scale line and main scale line with the smallest angle difference; 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 angle difference, and the main scale line corresponding to the second longest scale line.

2. The disc double-scale recognition method according to claim 1, characterized in that: The angle between every two main scale lines is equal; the angle between every two minor scale lines is equal.

3. The disc double-scale recognition method according to claim 2, characterized in that: The angle between every two minor scale lines is smaller than the angle between every two major scale lines.

4. The disc double-scale recognition method according to claim 1, characterized in that: In step S2, removing non-main scale lines and non-minor scale lines according to the angle between the straight line segment and the second long scale line includes: The second longest tick mark is set horizontally 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 non-main scale line and a non-scale line.

5. The disc double-scale recognition method according to claim 4, characterized in that: In step S3, the distinguishing between the main scale lines and the secondary scale lines includes: The k-means clustering algorithm is used to distinguish between major and minor scale lines.

6. The disc double-scale recognition method according to claim 5, characterized in that: The method of using the k-means clustering algorithm to distinguish between the main scale lines and the secondary scale lines includes: In the ruler image, the horizontal direction is set as the abscissa axis and the vertical direction is set as the ordinate axis. The midpoints of all straight line segments are found, and the k-means clustering algorithm is used to divide the straight line segments into two categories according to the distance between the midpoint and the center of the disk or the position of the midpoint in the abscissa direction.

7. The disc 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 disc 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 and the main scale line with the smallest angle difference, 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 with the smallest angle difference. The minor scale lines are numbered 0, 1, 2, 3, ..., N starting from the second long scale line, where N is a natural number greater than 1.

9. A disc 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 an annular main scale located on the outer circle and an annular sub-scale located on the inner circle, the annular 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 annular 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 main scale lines and the sub-scale lines intersect at the center of the disk; The recognition module is used to recognize the first scale numerals and detect the straight line segments in the scale ruler image; remove non-main scale lines and non-minor scale lines according to the angle between the straight line segments and the second long scale lines; and distinguish the main scale lines from the minor scale lines; 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 minor scale lines, which will be the second scale numbers; Calculate the angle between each minor scale line and the main scale line, and find the minor scale line and main scale line with the smallest angle difference; find the main 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 and the main scale line with the smallest angle difference, and the main scale line corresponding to the second longest scale line.

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