Control method and device of rotating turntable, electronic equipment and storage medium
By setting calibration graphics on the turntable and establishing a mapping relationship using a vision scheme, the problem of position deviation caused by stepper motor step loss was solved, and precise rotation control and automatic correction of the turntable were achieved.
Patent Information
- Application Number
- CN202611681861.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
Stepper motors may lose steps during operation, causing positional deviations during rotation. Since there is no internal feedback, recalibration is required, affecting the precise control of the turntable.
By setting calibration patterns on the turntable, using a vision-based approach to acquire images and perform target detection, a mapping relationship is established between the unit step length of the stepper motor and the pixel change, thus precisely controlling the turntable to rotate into position.
It achieves precise control of the turntable, can detect whether the stepper motor is missing steps, and automatically corrects the rotation position, thus improving the motion accuracy of the turntable.
Smart Images

Figure CN123184530A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical fields of motion control, and in particular to a control method, device, electronic device and storage medium for rotating a turntable. Background Technology
[0002] In related technologies, a stepper motor is used to control a turntable to rotate to a specified position. However, stepper motors may lose steps during operation, causing positional deviations during rotation. Furthermore, since stepper motors are usually open-loop controlled, there is no internal feedback. Therefore, when a step is lost, feedback often needs to be re-established to determine the actual result. Summary of the Invention
[0003] Therefore, the purpose of this application is to provide a control method, device, electronic device and storage medium for turntable rotation, which uses a vision scheme to control turntable rotation and determine whether the turntable has rotated to the correct position, and can detect stepper motor step loss.
[0004] This application provides a method for controlling the rotation of a turntable. The turntable includes a calibration pattern and is driven by a stepper motor. The method includes: acquiring an image of the turntable rotating at least one revolution, and performing target detection on the calibration pattern of the image to obtain calibration point position information; determining an initial point based on the calibration point position information, and driving the turntable to rotate the calibration point to the initial point; constructing a mapping relationship between the unit step size of the stepper motor and the pixel change; acquiring a target position, determining a target number of steps for the stepper motor based on a first pixel distance between the target position and the initial point through the mapping relationship, and controlling the rotation of the turntable based on the target number of steps.
[0005] For example, the step of performing target detection on the calibration pattern of the image to obtain calibration point location information includes: performing target detection on the calibration pattern of the image to obtain a target detection box; determining the center point of the target detection box as a calibration point; and obtaining the calibration point location information based on the calibration point of each image.
[0006] For example, determining the initial point based on the calibration point position information includes: fitting the calibration point position information to obtain a fitting circle; obtaining a preset origin position; and determining the intersection of the line connecting the center of the fitting circle and the preset origin position with the fitting circle as the initial point.
[0007] For example, constructing the mapping relationship between the unit step length of the stepper motor and the pixel change includes: determining the center line of the target detection box and recording the first pixel length occupied by the center line; controlling the stepper motor to drive one step and recording the second pixel length occupied by the center line after driving; obtaining the pixel change based on the difference between the first pixel length and the second pixel length, and obtaining the mapping relationship based on the pixel change.
[0008] For example, after controlling the turntable to rotate based on the target number of steps, the method further includes: obtaining the current marker position; if the current marker position does not coincide with the target position, determining the target number of steps for the stepper motor based on the second pixel distance between the current marker position and the target position through the mapping relationship, and controlling the turntable to rotate based on the target number of steps until the current marker position coincides with the target position.
[0009] For example, the calibration graphic includes at least one of a circular graphic and a regular polygonal graphic.
[0010] For example, the target detection box includes a circular detection box, and the center line includes a diameter.
[0011] Another embodiment of this application provides a control device for rotating a turntable. The turntable includes a calibration pattern and is driven by a stepper motor. The device includes: a target detection module for acquiring an image of the turntable rotating at least one revolution and performing target detection on the calibration pattern in the image to obtain calibration point position information; an initialization module for determining an initial point based on the calibration point position information and driving the turntable to rotate the calibration point to the initial point; a construction module for constructing a mapping relationship between the unit step size of the stepper motor and the pixel change; and a control module for acquiring a target position, determining the target number of steps of the stepper motor based on a first pixel distance between the target position and the initial point through the mapping relationship, and controlling the turntable to rotate based on the target number of steps.
[0012] Another embodiment of this application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described control method for rotating a turntable.
[0013] Another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described control method for rotating the turntable.
[0014] In the above embodiments, the turntable includes a calibration pattern, and the turntable is driven by a stepper motor. The method includes: acquiring an image of the turntable rotating at least one revolution, and performing target detection on the calibration pattern in the image to obtain calibration point position information; determining an initial point based on the calibration point position information, and driving the turntable to rotate the calibration point to the initial point; constructing a mapping relationship between the unit step size of the stepper motor and the pixel change; acquiring the target position, determining the target number of steps of the stepper motor based on the first pixel distance between the target position and the initial point through the mapping relationship, and controlling the turntable rotation based on the target number of steps. The visual information used in this invention to determine whether the turntable rotation is in place can detect whether the stepper motor has missed steps. Attached Figure Description
[0015] Figure 1 A flowchart illustrating the control method for turntable rotation provided in this application embodiment; Figure 2 A schematic diagram of the turntable system provided in the embodiments of this application; Figure 3 A flowchart for target detection of a calibrated image provided in an embodiment of this application; Figure 4 A flowchart for determining an initial point based on calibration point location information provided in this application embodiment; Figure 5 A flowchart illustrating the mapping relationship between the unit step size of a stepper motor and the pixel change amount, provided for embodiments of this application; Figure 6 A schematic diagram illustrating the control of the turntable to its position according to an embodiment of this application; Figure 7 A schematic diagram of the turntable pixels provided for an embodiment of this application; Figure 8 A schematic diagram of a control device for rotating a turntable provided in an embodiment of this application; Figure 9 A block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0016] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0017] Figure 1 This is a flowchart of a turntable rotation control method according to an embodiment of this application.
[0018] As an example, the turntable includes calibration graphics and is driven by a stepper motor, such as... Figure 1 As shown, the control methods for the rotation of the turntable include: S101, acquire images of the turntable rotating at least one revolution, and perform target detection on the calibration pattern of the images to obtain the calibration point position information.
[0019] S102 determines the initial point based on the calibration point position information and drives the turntable to rotate the calibration point to the initial point.
[0020] S103, construct the mapping relationship between the unit step size of the stepper motor and the pixel change.
[0021] S104: Obtain the target position, determine the target number of steps for the stepper motor based on the first pixel distance between the target position and the initial point through a mapping relationship, and control the turntable to rotate based on the target number of steps.
[0022] For example, such as Figure 2 As shown in the schematic diagram, a stepper motor drives a turntable to rotate. The turntable includes a calibration pattern, which can be a single point. A camera can be mounted above the turntable to capture images. In the field of precision instruments, to ensure the precision of the instrument, a stepper motor drives the turntable to rotate to a specific position. However, during the driving process, the stepper motor may miss steps, causing the turntable to not stop precisely at the required position, affecting subsequent steps. This application utilizes camera visual information to determine whether the turntable has rotated to the correct position.
[0023] For example, firstly, a calibration pattern is created on the turntable. The calibration pattern can be affixed to the turntable surface as a sticker. The calibration pattern includes at least one of a circle or a regular polygon. For ease of subsequent determination of calibration points, a square shape is preferred, such as a circle, equilateral triangle, square, or pentagon. Then, the turntable is rotated, and the camera captures images. The turntable needs to rotate at least one full revolution, and each frame is saved. To ensure the turntable rotates at least one revolution, a motor stop condition can be set. Assuming the turntable rotates clockwise, a stationary feature point next to the turntable can be used to determine if the turntable has rotated one revolution. For example, initially, the calibration pattern is to the right of this feature point; after rotating clockwise back to the right, the turntable stops rotating, marking one revolution.
[0024] For example, target detection is performed on the calibration pattern of each acquired image to obtain calibration point position information. This calibration point position information represents the changing positions of the calibration points across multiple consecutive frames. An initial point is determined based on the calibration point position information, and the turntable is driven to rotate the calibration point to the initial point. This step can be understood as an initialization step, rotating the calibration point to the initial point, during which a mapping relationship is established between the unit step size of the stepper motor and the pixel change. Subsequently, the target position is acquired; this target position is the desired final rotation position of the turntable. Based on the first pixel distance between the target position and the initial point, the target number of steps for the stepper motor is determined through the mapping relationship, and the turntable rotation is controlled based on the target number of steps.
[0025] The turntable rotation control method of this application uses visual information to calibrate and initialize the turntable, and can then accurately drive the turntable to rotate into position, thereby improving the control accuracy of the turntable rotation.
[0026] As an example, such as Figure 3 As shown, target detection is performed on the calibration pattern of the image to obtain the calibration point location information, including: S301, Perform target detection on the calibration graphic of the image to obtain the target detection box.
[0027] S302, determine the center point of the target detection box as the calibration point, and obtain the calibration point position information based on the calibration point of each image.
[0028] For example, an object detection model can be used to detect objects in a calibration shape in an image, resulting in a bounding box. The bounding box is the edge of the calibration shape; if the calibration shape is circular, the bounding box is circular; if the calibration shape is square, the bounding box is square. The center point of the bounding box on each pixel is determined as the calibration point. For example, if it's circular, the center is taken as the calibration point; if it's square, the center point can be calculated from coordinates. This object detection is performed on each image to obtain the calibration point position information for multiple consecutive frames.
[0029] As an example, such as Figure 4 As shown, determining the initial point based on the calibration point location information includes: S401, perform calibration point fitting on the calibration point location information to obtain the fitted circle.
[0030] S402, obtain the preset origin position, and determine the intersection of the line connecting the center of the fitted circle and the preset origin position with the fitted circle as the initial point.
[0031] For example, the calibration points of the above-recorded consecutive frames are fitted, for example using least squares fitting, to obtain a fitting circle. The fitting circle represents the motion trajectory of the calibration points. The center position of the fitting circle can be obtained from the fitting circle, and this center position is the center point of the turntable. Then, a preset origin position is set on the image. The preset origin position can be on the fitting circle, inside the fitting circle, or outside the fitting circle. Preferably, since the smallest unit of an image is a pixel, the more pixels there are, the more accurate the detection is generally. Therefore, the preset origin position is preferably outside the fitting circle.
[0032] For example, the initial point is the intersection of the line connecting the center of the fitted circle and the preset origin position with the boundary of the fitted circle. If no preset origin position is set, the default initial point is on the rightmost side of the fitted circle.
[0033] Once the above position calibration is completed, the motor can be controlled to move. It can simply control the motor to move normally, and then the vision solution can be used simply for position judgment calculation. Alternatively, the number of steps to move can be calculated by vision and then transmitted to the motor. If the motor does not reach its position after moving, the calculation will be recalculated.
[0034] As an example, such as Figure 5 As shown, the mapping relationship between the unit step size of the stepper motor and the pixel change is constructed, including: S501, determine the center line of the target detection box and record the first pixel length occupied by the center line.
[0035] S502 controls the stepper motor to drive one step and records the second pixel length occupied by the center line after the drive.
[0036] S503, the pixel change is obtained based on the difference between the first pixel length and the second pixel length, and the mapping relationship is obtained based on the pixel change.
[0037] For example, the centerline of the target detection box is an axisymmetric line passing through the center point of the target detection box. If the target detection box includes a circular detection box, the centerline is the diameter. Then, the first pixel length occupied by the centerline is determined, the stepper motor is controlled to drive one step, and the second pixel length occupied by the centerline after driving is recorded. The difference between the first pixel length and the second pixel length is the pixel change, and finally the mapping relationship between the unit step length of the stepper motor and the pixel change is obtained.
[0038] For example, based on this mapping relationship, given the initial point position and the target position, and using the pixel distance between the initial point position and the target position, the number of steps required to drive the turntable to rotate to the target position can be obtained by utilizing the mapping relationship between the unit step size of the stepper motor and the pixel change.
[0039] As an example, such as Figure 6As shown, after controlling the turntable rotation based on the target number of steps, the control method for the turntable rotation also includes: S601, Get the current position of the marker point.
[0040] S602, when the current marker position does not coincide with the target position, determines the target number of steps for the stepper motor based on the second pixel distance between the current marker position and the target position through a mapping relationship, and controls the turntable to rotate based on the target number of steps until the current marker position coincides with the target position.
[0041] For example, after the drive turntable rotates according to the target number of steps, if there is no step loss by the stepper motor, theoretically the marker point should rotate perfectly to the target point, that is, the turntable rotates to the correct position. If there is step loss by the stepper motor, the turntable does not rotate to the correct position. In this application, after the stepper motor controls the turntable to rotate, it can be understood that the turntable has stopped rotating at this time. The current marker point position is obtained by the camera acquiring the current marker point position, which is also obtained by determining the center point of the detection box based on the target detection above. If the current marker point position does not coincide with the target position, that is, there is step loss by the stepper motor, the second pixel distance between the current marker point position and the target position is recalculated. The target number of steps of the stepper motor is determined through the mapping relationship, and the stepper motor is controlled to move the target number of steps until the current marker point position coincides with the target position.
[0042] This application can effectively determine whether the motor is missing steps, correct the rotation position, and can automatically set the starting point position. It is simple to operate and easy to calibrate.
[0043] As an example, for ease of explanation, let's assume the camera's pixel resolution is 1000. 1000, frame rate 25 frames per second. First, marker points are created on the turntable. The turntable rotates, and the camera captures images. The turntable needs to rotate one full circle, and the position of the marker point detected each time is saved. The positions of all marker points are detected and recorded on each captured frame (camera distortion correction can be performed as needed during marker point detection; however, modern cameras are highly accurate, and distortion correction is rarely required). The recorded marker point positions are then fitted using least-squares to obtain the center point position of the turntable and the trajectory equation of the motion. After completing the above steps, a preset position (called the 0-point position) is set on the image, for example, as shown... Figure 7The position is set to (800, 500). If not selected, it defaults to the far right of the circle. The system calculates the intersection of the equation of the line connecting the selected position to the circle's center and the circle's equation, and controls the center of the marker point on the turntable to rotate to this intersection. Position calibration is then complete, and the current coordinates are used as the initial point. Since the smallest unit of an image is a pixel, more pixels generally result in more accurate detection. Therefore, it's generally better to place the marker point as close as possible to the outer edge of the turntable. After circle fitting, the number of pixels occupied by the diameter of the fitted circle at the marker point's center is calculated. The motor is then moved one step, and the pixel change T is recorded. Next, the computer sends the moving position, which is converted to determine the number of steps the motor needs to rotate. When the motor stops, the accuracy of the marker point's position is calculated. If there is a discrepancy, the marker point is moved again until the position is accurate.
[0044] For example, for ease of explanation and clarity of calculation, integers will be used in the calculations here. After all the above steps are completed, as follows: Figure 7 As shown, assuming the center point of the turntable being detected is at 500... At position 500, with a diameter of 600, the marker point 0 is located at (800, 500). Based on this, the camera acquires images in real time and calculates the current marker point position. Assuming the minimum rotation distance of the motor is represented by a 1-pixel rotation on both the horizontal and vertical axes of the marker point, if the marker point needs to be rotated to (500, 800), the motor needs to rotate 300 steps. After the command is issued, wait for the motor to return a stop flag. Then, compare the marker point position detected by the camera with the set position. If there is a discrepancy, continue correction; if a match has been achieved, return a success flag and prepare for the next rotation.
[0045] This application also proposes a control device for the rotation of a turntable.
[0046] As an example, such as Figure 8 As shown, a control device for rotating a turntable includes a calibration graphic on the turntable, which is driven by a stepper motor. The control device includes: a target detection module 801, used to acquire images of the turntable rotating at least one revolution, and to perform target detection on the calibration graphic in the images to obtain calibration point position information; an initialization module 802, used to determine an initial point based on the calibration point position information, and to drive the turntable to rotate the calibration point to the initial point; a construction module 803, used to construct a mapping relationship between the unit step length of the stepper motor and the pixel change; and a control module 804, used to acquire the target position, determine the target number of steps of the stepper motor based on the first pixel distance between the target position and the initial point through the mapping relationship, and control the turntable rotation based on the target number of steps.
[0047] This application also proposes a computer-readable storage medium.
[0048] In this embodiment, a computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the above-described control method for rotating the turntable.
[0049] Figure 9 A block diagram of an electronic device provided in an embodiment of this application.
[0050] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described control method for rotating a turntable.
[0051] like Figure 9 As shown, for ease of understanding, embodiments of this application illustrate a specific electronic device.
[0052] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of rotating devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0053] like Figure 9 As shown, the device includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 902 or a computer program loaded into a random access memory (RAM) 903 from a storage unit 908. The RAM 903 may also store various programs and data required for the operation of the electronic device. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0054] Multiple components in the electronic device are connected to the I / O interface 905. These components include: an input unit 906, such as a keyboard or mouse; an output unit 907, such as various types of displays or speakers; a storage unit 908, such as a hard disk or optical disk; and a communication unit 909, such as a network interface card (NIC), a modem, or a wireless transceiver. The communication unit 909 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0055] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods described above, such as the control method for rotating the turntable. For example, in some embodiments, the control method for rotating the turntable can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, the control method for rotating the turntable described above can be executed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the control method for rotating the turntable by any other suitable means (e.g., by means of firmware).
[0056] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this application, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0057] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0058] In the description of this application, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0059] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0060] Furthermore, the terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this application can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this application, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly and specifically defined in the embodiments.
[0061] In this application, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication between two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific implementation.
[0062] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0063] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for controlling the rotation of a turntable, characterized in that, The turntable includes a calibration pattern, the turntable is driven by a stepper motor, and the method includes: Acquire images of the turntable rotating at least one revolution, and perform target detection on the calibration pattern of the images to obtain calibration point position information; An initial point is determined based on the calibration point position information, and the turntable is driven to rotate the calibration point to the initial point; Construct a mapping relationship between the unit step size of the stepper motor and the pixel change; Obtain the target position, determine the target number of steps for the stepper motor based on the first pixel distance between the target position and the initial point through the mapping relationship, and control the turntable to rotate based on the target number of steps.
2. The control method for turntable rotation according to claim 1, characterized in that, The step of performing target detection on the calibration pattern of the image to obtain calibration point location information includes: Target detection is performed on the calibrated pattern of the image to obtain a target detection box; The center point of the target detection box is determined as the calibration point, and the location information of the calibration point is obtained based on the calibration point of each image.
3. The method for controlling the rotation of the turntable according to claim 1 or 2, characterized in that, The process of determining the initial point based on the calibration point location information includes: The calibration point position information is fitted to obtain a fitted circle; Obtain the preset origin position, and determine the intersection point of the line connecting the center of the fitted circle and the preset origin position with the fitted circle as the initial point.
4. The control method for turntable rotation according to claim 2, characterized in that, The process of constructing the mapping relationship between the unit step size of the stepper motor and the pixel change includes: Determine the center line of the target detection box and record the first pixel length occupied by the center line; Control the stepper motor to drive one step, and record the second pixel length occupied by the center line after the drive; The pixel change is obtained based on the difference between the first pixel length and the second pixel length, and the mapping relationship is obtained based on the pixel change.
5. The method for controlling the rotation of a turntable according to claim 1, characterized in that, After controlling the turntable rotation based on the target number of steps, the method further includes: Get the current position of the marker; If the current marker position does not coincide with the target position, the target number of steps of the stepper motor is determined based on the second pixel distance between the current marker position and the target position through the mapping relationship, and the turntable is controlled to rotate based on the target number of steps until the current marker position coincides with the target position.
6. The method for controlling the rotation of a turntable according to claim 1 or 2, characterized in that, The calibration graphic includes at least one of a circular graphic and a regular polygonal graphic.
7. The method for controlling the rotation of a turntable according to claim 4, characterized in that, The target detection box includes a circular detection box, and the center line includes a diameter.
8. A control device for rotating a turntable, characterized in that, The turntable includes a calibration pattern, the turntable is driven by a stepper motor, and the device includes: The target detection module is used to acquire images of the turntable rotating at least one revolution, and to perform target detection on the calibration pattern of the images to obtain calibration point position information; An initialization module is used to determine an initial point based on the calibration point position information and drive the turntable to rotate the calibration point to the initial point; A construction module is used to construct the mapping relationship between the unit step size of the stepper motor and the pixel change amount; The control module is used to acquire the target position, determine the target number of steps of the stepper motor based on the first pixel distance between the target position and the initial point through the mapping relationship, and control the turntable to rotate based on the target number of steps.
9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the turntable rotation control method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the steps of the control method for rotating the turntable as described in any one of claims 1-7.
