Multifunctional vehicle-mounted and shipborne rotary table camera system and control method
By performing image distortion-free correction and rotation angle calculation methods in vehicle-mounted and ship-mounted turntable camera systems, the problem of inaccurate adjustment of the turntable angle in dynamic environments is solved, stable tracking of goals and multi-objective distinction is achieved, and the system is improved Tracking efficiency and accuracy.
Patent Information
- Application Number
- CN202411518407.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for existing vehicle-mounted and ship-mounted turntable camera systems to quickly and accurately adjust the turntable angle in dynamic environments, resulting in easy loss of targets. Especially when multiple targets appear at the same time in complex environments, it is difficult for the system to effectively distinguish and track.
By adjusting the focal length of the turntable camera, collecting continuous multi-frame images, pre-processing of image data, performing object detection algorithms, performing distortion-free correction, calculating the turntable angle, and driving the turntable to track and detect the target by servo motor.
It realizes rapid and accurate adjustment of the turntable angle in a dynamic environment, keeps the target within the field of view, avoids target loss, and can effectively distinguish and track multiple targets, improving tracking efficiency and accuracy.
Smart Images

Figure CN119402749A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of control methods, and in particular to a multifunctional vehicle-mounted or ship-mounted turntable camera system and a control method. Background Art
[0002] In mobile platforms such as vehicles and ships, turntable camera systems are widely used in various monitoring, navigation and security tasks. These systems usually need to detect and track targets in dynamic environments to ensure that the targets are always within the field of view of the turntable camera. However, due to the physical characteristics of the turntable camera lens, the captured images are often affected by distortion, especially the pixel points in the edge area will be offset, which will cause errors in the turntable angle calculated based on the image, thereby affecting the accuracy and stability of target tracking. Existing turntable camera control systems often do not fully consider the impact of image distortion, or the distortion correction method used is not accurate enough, resulting in large errors in the calculation of the target position. Moreover, in dynamic environments such as vehicles and ships, the movement speed and direction of the target change rapidly. It is difficult for existing systems to quickly and accurately adjust the turntable angle, resulting in easy loss of the target. In complex environments, multiple targets appear in the field of view at the same time. It is difficult for existing systems to effectively distinguish and track multiple targets, especially when the target is close to the edge of the image, the impact of distortion is more significant. Summary of the invention
[0003] In order to solve the above technical problems, the present invention provides a multifunctional vehicle-mounted or ship-mounted turntable camera system and a control method to achieve tracking control of the detection target.
[0004] The present invention provides a multifunctional vehicle-mounted or ship-mounted turntable camera control method, comprising: Step S1, adjusting the focal length of the turntable camera, based on the adjusted focal length, using the turntable camera to collect multiple frames of images at the same time interval, and obtaining image data; Step S2, preprocessing the image data, executing a target detection algorithm on the preprocessed image data to obtain detection target data and performing distortion-free correction on the image to obtain a corrected image; Step S3, calculating the turntable angle according to the calibrated image; Step S4, converting the turntable angle into a control signal of the servo motor, and sending the control signal to the servo motor control system of the turntable camera; In step S5, the servo motor control system receives the control signal and transmits it to the servo motor, and the servo motor drives the turntable to rotate to the turntable angle to track the detection target.
[0005] Further, there is no distortion correction, including: Step S21, obtaining the image center coordinates and the image non-center coordinates according to the image data; Step S22, performing distortion correction on the non-central coordinates to obtain distortion-free coordinates; Step S23, after obtaining the detection target data, obtaining the correction amount according to the detection target data and the distortion-free coordinates; Step S24, calculating the distortion-free corrected coordinates according to the distortion-free coordinates and the correction amount; Step S25, obtaining a corrected image according to the distortion-free corrected coordinates and the image center coordinates.
[0006] Furthermore, the non-central coordinates are subjected to distortion correction to obtain distortion-free coordinates, including: Step S221, obtaining the distance between the non-center coordinates of the image and the center coordinates of the image according to the non-center coordinates of the image and the center coordinates of the image; Step S222, defining radial distortion coefficient and tangential distortion coefficient; Step S223, obtaining the distortion-free coordinates according to the image center coordinates, the image non-center coordinates, the distance between the image non-center coordinates and the center coordinates, the radial distortion coefficient, and the tangential distortion coefficient.
[0007] Furthermore, a correction amount is obtained according to the detected target data and the undistorted coordinates, including: Step S231, obtaining pixel points in the horizontal direction and pixel points in the vertical direction of the detection target from the distortion-corrected image; Step S232, determining the relative size of the detection target in the horizontal direction according to the pixel points of the detection target in the horizontal direction; determining the relative size of the detection target in the vertical direction according to the pixel points of the detection target in the vertical direction; Step S233, determining the area of the detection target according to the pixel points in the horizontal direction and the pixel points in the vertical direction of the detection target; Step S234, determining a direction correction value according to the relative position relationship between the detection target and the image center coordinates; Step S235, calculating the correction amount according to the direction correction value, the area, the relative size, and the distance between the non-center coordinates of the image and the center coordinates.
[0008] Furthermore, the calculation formula of the correction amount is: ; ; In the formula, Represents the correction amount of the undistorted coordinate in the horizontal direction, Represents the correction amount of the undistorted coordinate in the vertical direction, represents the direction correction value, Represents the relative size of the detection target in the horizontal direction. Represents the relative size of the detection target in the vertical direction, Represents the pixel point of the detection target in the horizontal direction, represents the pixel point of the detection target in the vertical direction, A represents the area of the detection target, Represents the distance between the image pixel and the center coordinate, Represents the weight coefficient.
[0009] Furthermore, the calculation formula of the distortion-free corrected coordinates is: ; In the formula, represents the undistorted corrected coordinates, represents the undistorted coordinates, Represents the correction amount for the undistorted coordinates.
[0010] Further, the turntable angle is calculated according to the detected target data, including Step S31, predicting the target position coordinates of the target to be detected at the next time interval based on the distortion-free corrected coordinates; Step S32, obtaining the distance between the detection target and the turntable camera; Step S33, calculating the turntable angle according to the target position coordinates, the image center coordinates, the distance between the detection target and the turntable camera, and the focal length.
[0011] Further, predicting the target position of the detected target in the next frame image within the next time interval according to the distortion-free corrected coordinates includes: Step S311, based on collecting multiple consecutive frames of images at the same time interval, determine the time interval ; Step S312, obtaining the target speed of the detection target on the adjacent frame corrected images; Step S313, obtaining the target position of the detected target in the next frame image within the next time interval according to the distortion-free corrected coordinates, the target speed, and the interval time.
[0012] Furthermore, the calculation formula of the turntable angle is: ; ; In the formula, represents the turntable angle, represents the target position coordinates in the tth time interval, represents the center coordinate of the image, f represents the focal length, and d represents the distance between the detection target and the turntable camera.
[0013] The present invention also discloses a multifunctional vehicle-mounted or ship-mounted turntable camera system, comprising the following modules: Image data acquisition module: used to adjust the focal length of the turntable camera, based on the adjusted focal length, use the turntable camera to collect multiple frames of images at the same time interval, and acquire image data; Image correction module: connected to the image data acquisition module, used to pre-process the image data, execute the target detection algorithm on the pre-processed image data to obtain the detection target data, and perform distortion-free correction on the image to obtain the corrected image; Turntable angle calculation module: connected to the image correction module, used to convert the turntable angle into a control signal of the servo motor, and send the control signal to the servo motor control system of the turntable camera; Control module: connected to the turntable angle calculation module, used for the servo motor control system to receive the control signal and transmit it to the servo motor. The servo motor drives the turntable to rotate to the turntable angle to track the detection target.
[0014] The embodiments of the present invention have the following technical effects: Based on the existing turntable camera that acquires images and tracks image targets, the present invention makes the following improvements after acquiring the detection target: performing distortion correction on the non-central coordinates of the image to obtain distortion-free coordinates, obtaining a correction amount based on the distortion-free coordinates and the detection target, obtaining distortion-free corrected coordinates based on the correction amount and the distortion-free coordinates, and finally obtaining a corrected image based on the distortion-free corrected coordinates and the image center coordinates. The position of each pixel point in the corrected image is the real position, thereby ensuring that the detection targets subsequently acquired from the corrected image are real and accurate, thereby improving the overall tracking accuracy.
[0015] The detection target obtained based on the distortion-free corrected coordinates of the present invention is accurate. According to the detected detection target position, image center coordinates, distance between the detection target and the turntable camera, and focal length, the angle that the turntable needs to rotate is quickly calculated, and the servo motor drives the turntable to rotate to the target position more accurately, thereby achieving stable tracking. Even if the detection target is moving, the present application can quickly and accurately adjust the angle of the turntable camera to keep the target always within the field of view, and the detection target will not be lost. Even in a complex environment, multiple detection targets appear in the field of view at the same time. The present application can effectively distinguish and track multiple detection targets based on the calculated turntable angle, thereby improving tracking efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a multifunctional vehicle-mounted or ship-mounted turntable camera control method provided by an embodiment of the present invention; Figure 2 It is a structural schematic diagram of a multifunctional vehicle-mounted and ship-mounted turntable camera control method provided by an embodiment of the present invention; Figure 3 It is a structural schematic diagram of an electronic device provided by the implementation of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0019] Figure 1 1 is a flow chart of a multifunctional vehicle-mounted or ship-mounted turntable camera control method provided by an embodiment of the present invention. Figure 1 , specifically including: Step S1, adjusting the focal length f of the turntable camera, based on the adjusted focal length, using the turntable camera to collect multiple frames of images at the same time interval, and obtaining image data.
[0020] Adjust the focal length f of the turntable camera to a distance suitable for the current environment. In dynamic environments such as vehicles and ships, the target may move quickly. By acquiring multiple frames of images at the same time interval, the position changes of the target at different time points can be captured, thereby improving the accuracy of target detection. For example, continuous multiple frames of images are acquired at a frequency of 30 frames per second. The image data includes at least the image center coordinates (x0, y0), image pixel points (x n ,y n )wait.
[0021] Step S2, preprocessing the image data, executing a target detection algorithm on the preprocessed image data to obtain detected target data, and performing distortion-free correction on the image to obtain a corrected image.
[0022] The innovation of this embodiment is to correct the distortion of the image during the preprocessing process to obtain a corrected image, and based on the detection target of the corrected image, calculate the turntable angle using the distortion-free corrected coordinates to achieve tracking control of the detection target.
[0023] No distortion correction, including: Step S21, obtaining the image center coordinates and the image non-center coordinates according to the image data.
[0024] The image center coordinates are obtained from the image data in step S1. The image pixels other than the image center coordinates in step S1 are taken as the image non-center coordinates.
[0025] Step S22, performing distortion correction on the non-central coordinates to obtain distortion-free coordinates.
[0026] Step S221, obtaining the distance between the non-center coordinates of the image and the center coordinates of the image according to the non-center coordinates of the image and the center coordinates of the image.
[0027] Step S222, defining radial distortion coefficient and tangential distortion coefficient.
[0028] Step S223, obtaining the distortion-free coordinates according to the image center coordinates, the image non-center coordinates, the distance between the image non-center coordinates and the center coordinates, the radial distortion coefficient, and the tangential distortion coefficient.
[0029] ; ; Among them, (x´, y´) represents the undistorted coordinates, (x, y) represents the non-center coordinates of the image, r represents the distance between the non-center coordinates and the center coordinates of the image, k1, k2, k3 represent the radial distortion coefficients, and p1, p2 represent the tangential distortion coefficients.
[0030] .
[0031] Step S23, after obtaining the detection target data, obtain the correction amount according to the detection target data and the distortion-free coordinates.
[0032] Step S231, obtaining the pixel points of the detection target in the horizontal direction and the pixel points in the vertical direction from the distortion-corrected image.
[0033] The distortion-corrected image refers to an image obtained by processing steps S221-223 to obtain undistorted coordinates. The detection target on the image is also obtained by using the target detection algorithm, so that the horizontal and vertical pixel points of the detection target can be directly obtained.
[0034] Step S232, determining the relative size of the detection target in the horizontal direction according to the pixel points of the detection target in the horizontal direction; determining the relative size of the detection target in the vertical direction according to the pixel points of the detection target in the vertical direction.
[0035] The target size usually refers to the horizontal width s of the detected target in the image. x and vertical height s yThese dimensions are usually determined by detecting the pixels of the target in the horizontal direction and the pixels of the target in the vertical direction. The dimensions can be used to describe the size of the target in the image and help in target recognition and classification. In the calculation of the correction amount, this embodiment preferably considers the ratio of the target size to the image. , , determine the distribution ratio of the correction amount in the horizontal and vertical directions.
[0036] This ratio can ensure that the correction amount is distributed reasonably in the horizontal and vertical directions. If the detection target is a horizontally long rectangle in the image, then The value of will be larger, which means that the correction in the horizontal direction should be larger.
[0037] Step S233, determining the area of the detection target according to the pixel points in the horizontal direction and the pixel points in the vertical direction of the detection target.
[0038] The target area refers to the number of pixels occupied by the detected target in the image, which is also determined by the horizontal and vertical pixels of the detected target. The area is used to measure the proportion of the detected target in the entire image and the change of the target between different frames.
[0039] Step S234, determining the direction correction value according to the relative position relationship between the detection target and the image center coordinates.
[0040] The direction correction value is used to correct the direction to be corrected, ensuring that the direction of the correction is correct and moving the target closer to the center of the image. For example, if the detected target is on the right side of the image center coordinates, the direction correction value is assigned +1; if the detected target is on the left side of the image center coordinates, the direction correction value is assigned -1; if the detected target is above the image center coordinates, the direction correction value is assigned +1; if the detected target is below the image center coordinates, the direction correction value is assigned -1.
[0041] Step S235, calculating the correction amount according to the direction correction value, the area, the relative size, and the distance between the non-center coordinates of the image and the center coordinates.
[0042] ; ; In the formula, Represents the correction amount of the undistorted coordinate in the horizontal direction, Represents the correction amount of the undistorted coordinate in the vertical direction, represents the direction correction value, Represents the relative size of the detection target in the horizontal direction. Represents the relative size of the detection target in the vertical direction, Represents the pixel point of the detection target in the horizontal direction, represents the pixel point of the detection target in the vertical direction, A represents the area of the detection target, d d Represents the distance between the image pixel and the center coordinate, Represents the weight coefficient.
[0043] Step S24, calculating the distortion-free corrected coordinates according to the distortion-free coordinates and the correction amount; ; In the formula, represents the undistorted corrected coordinates, represents the undistorted coordinates, Represents the correction amount for the undistorted coordinates.
[0044] The distortion-free coordinates have already removed the influence of lens distortion through distortion correction, but there may still be slight deviations in the target position in the image. By adding the correction amount, these slight deviations can be further corrected to make the target position more accurate, especially in the edge area of the image, where the coordinates after distortion correction may still have certain errors. By adjusting the correction amount, the accuracy of the target position can be significantly improved.
[0045] Step S25, obtaining a corrected image according to the distortion-free corrected coordinates and the image center coordinates.
[0046] The pixel points with non-central coordinates in the corrected image obtained through the above steps are all corrected by the distortion-free correction coordinates to achieve the correction of the non-central coordinates, which means that their current positions are the real positions without deviation.
[0047] Step S3, calculating the turntable angle according to the detected target data.
[0048] Step S31, predicting the target position coordinates of the target to be detected in the next time interval according to the distortion-free corrected coordinates.
[0049] Step S311, based on collecting multiple consecutive frames of images at the same time interval, determine the time interval .
[0050] Preferably, 30 frames / second.
[0051] Step S312, obtaining the target speed of the detected target in the corrected images of adjacent frames.
[0052] In each frame of the rectified image, an object detection algorithm is used to identify the detection target. Common detection algorithms include but are not limited to YOLO, Faster R-CNN, SSD, etc. These algorithms can identify the target in the image and give the location of its bounding box. For each frame of the image, the center position of the target is extracted. For two consecutive frames of images, the center position of the target is extracted respectively, and the displacement of the target between the two frames is calculated. Finally, the target speed is obtained based on the displacement and time interval.
[0053] Step S313, correcting coordinates and target speed according to the distortion-free correction , interval time t, get the target position of the detected target in the next frame image in the next time interval .
[0054] .
[0055] Step S32, obtaining the distance d between the detection target and the turntable camera.
[0056] ; S represents the actual size of the detection target. In this embodiment, the area is preferably used for calculation; s represents the size of the detection target in the image. .
[0057] Step S33, calculating the turntable angle according to the target position coordinates, the image center coordinates, the distance between the detection target and the turntable camera, and the focal length.
[0058] ; ; In the formula, represents the turntable angle, represents the target position coordinates in the tth time interval, represents the center coordinate of the image, f represents the focal length, and d represents the distance between the detection target and the turntable camera.
[0059] Step S4, converting the turntable angle into a control signal of the servo motor, and sending the control signal to the servo motor control system of the turntable camera.
[0060] In step S5, the servo motor control system receives the control signal and transmits it to the servo motor, and the servo motor drives the turntable to rotate to the turntable angle to track the detection target.
[0061] like Figure 2 As shown, this embodiment also provides a multifunctional vehicle-mounted or ship-mounted turntable camera system, including the following modules: Image data acquisition module: used to adjust the focal length of the turntable camera, based on the adjusted focal length, use the turntable camera to collect multiple frames of images at the same time interval, and acquire image data; Image correction module: connected to the image data acquisition module, used to pre-process the image data, execute the target detection algorithm on the pre-processed image data to obtain the detection target data, and perform distortion-free correction on the image to obtain the corrected image; Turntable angle calculation module: connected to the image correction module, used to convert the turntable angle into a control signal of the servo motor, and send the control signal to the servo motor control system of the turntable camera; Control module: connected to the turntable angle calculation module, used for the servo motor control system to receive the control signal and transmit it to the servo motor. The servo motor drives the turntable to rotate to the turntable angle to track the detection target.
[0062] Figure 3 Schematic diagram of the structure of an electronic device provided by the present invention. Figure 3 As shown, the electronic device 500 includes one or more processors 501 and a memory 502 .
[0063] The processor 501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.
[0064] The memory 502 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may run the program instructions to implement a multifunctional vehicle-mounted, ship-mounted turntable camera control method and / or other desired functions of any embodiment of the present application described above. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.
[0065] In one example, the electronic device 500 may further include: an input device 503 and an output device 504, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 503 may include, for example, a keyboard, a mouse, etc. The output device 504 may output various information to the outside, including early warning prompt information, braking force, etc. The output device 504 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0066] Of course, to simplify, Figure 3 Only some of the components related to the present application in the electronic device 500 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 500 may also include any other appropriate components.
[0067] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of a multi-functional vehicle-mounted or ship-mounted turntable camera control method provided in any embodiment of the present application.
[0068] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0069] In addition, an embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of a multi-functional vehicle-mounted or ship-mounted turntable camera control method provided in any embodiment of the present application.
[0070] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0071] It should be noted that the terms used in the present invention are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "include one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0072] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A multifunctional vehicle-mounted or ship-mounted turntable camera control method, characterized in that: include: Step S1, adjusting the focal length of the turntable camera, based on the adjusted focal length, using the turntable camera to collect multiple frames of images at the same time interval, and obtaining image data; Step S2, preprocessing the image data, executing a target detection algorithm on the preprocessed image data to obtain detection target data and performing distortion-free correction on the image to obtain a corrected image; Step S3, calculating the turntable angle according to the calibrated image; Step S4, converting the turntable angle into a control signal of the servo motor, and sending the control signal to the servo motor control system of the turntable camera; In step S5, the servo motor control system receives the control signal and transmits it to the servo motor, and the servo motor drives the turntable to rotate to the turntable angle to track the detection target.
2. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 1, characterized in that: No distortion correction, including: Step S21, obtaining the image center coordinates and the image non-center coordinates according to the image data; Step S22, performing distortion correction on the non-central coordinates to obtain distortion-free coordinates; Step S23, after obtaining the detection target data, obtaining the correction amount according to the detection target data and the distortion-free coordinates; Step S24, calculating the distortion-free corrected coordinates according to the distortion-free coordinates and the correction amount; Step S25, obtaining a corrected image according to the distortion-free corrected coordinates and the image center coordinates.
3. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 2, characterized in that: Perform distortion correction on the non-central coordinates to obtain distortion-free coordinates, including: Step S221, obtaining the distance between the non-center coordinates of the image and the center coordinates of the image according to the non-center coordinates of the image and the center coordinates of the image; Step S222, defining radial distortion coefficient and tangential distortion coefficient; Step S223, obtaining the distortion-free coordinates according to the image center coordinates, the image non-center coordinates, the distance between the image non-center coordinates and the center coordinates, the radial distortion coefficient, and the tangential distortion coefficient.
4. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 3, characterized in that: The correction amount is obtained based on the detected target data and the undistorted coordinates, including: Step S231, obtaining pixel points in the horizontal direction and pixel points in the vertical direction of the detection target from the distortion-corrected image; Step S232, determining the relative size of the detection target in the horizontal direction according to the pixel points of the detection target in the horizontal direction; determining the relative size of the detection target in the vertical direction according to the pixel points of the detection target in the vertical direction; Step S233, determining the area of the detection target according to the pixel points in the horizontal direction and the pixel points in the vertical direction of the detection target; Step S234, determining a direction correction value according to the relative position relationship between the detection target and the image center coordinates; Step S235, calculating the correction amount according to the direction correction value, the area, the relative size, and the distance between the non-center coordinates of the image and the center coordinates.
5. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 4, characterized in that: The calculation formula of the correction amount is: ; ; In the formula, Represents the correction amount of the undistorted coordinate in the horizontal direction, Represents the correction amount of the undistorted coordinate in the vertical direction, represents the direction correction value, Represents the relative size of the detection target in the horizontal direction. Represents the relative size of the detection target in the vertical direction, Represents the pixel point of the detection target in the horizontal direction, represents the pixel point of the detection target in the vertical direction, A represents the area of the detection target, Represents the distance between the image pixel and the center coordinate, Represents the weight coefficient.
6. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 2, characterized in that: The calculation formula of the distortion-free corrected coordinates is: ; In the formula, represents the undistorted corrected coordinates, represents the undistorted coordinates, Represents the correction amount for the undistorted coordinates.
7. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 1, characterized in that: Calculate the turntable angle based on the detected target data, including Step S31, predicting the target position coordinates of the target to be detected at the next time interval based on the distortion-free corrected coordinates; Step S32, obtaining the distance between the detection target and the turntable camera; Step S33, calculating the turntable angle according to the target position coordinates, the image center coordinates, the distance between the detection target and the turntable camera, and the focal length.
8. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 7, characterized in that: According to the distortion-free corrected coordinates, the target position of the detected target in the next frame image within the next time interval is predicted, including: Step S311, based on collecting multiple consecutive frames of images at the same time interval, determine the time interval ; Step S312, obtaining the target speed of the detection target on the adjacent frame corrected images; Step S313, obtaining the target position of the detected target in the next frame image within the next time interval according to the distortion-free corrected coordinates, the target speed, and the interval time.
9. A multifunctional vehicle-mounted or ship-mounted turntable camera control method according to claim 8, characterized in that: The calculation formula of the turntable angle is: ; ; In the formula, represents the turntable angle, represents the target position coordinates in the tth time interval, represents the center coordinate of the image, f represents the focal length, and d represents the distance between the detection target and the turntable camera.
10. A multifunctional vehicle-mounted or ship-mounted turntable camera system, used to execute a multifunctional vehicle-mounted or ship-mounted turntable camera control method as described in any one of claims 1 to 9, characterized in that: Includes the following modules: Image data acquisition module: used to adjust the focal length of the turntable camera, based on the adjusted focal length, use the turntable camera to collect multiple frames of images at the same time interval, and acquire image data; Image correction module: connected to the image data acquisition module, used to pre-process the image data, execute the target detection algorithm on the pre-processed image data to obtain the detection target data, and perform distortion-free correction on the image to obtain the corrected image; Turntable angle calculation module: connected to the image correction module, used to convert the turntable angle into a control signal of the servo motor, and send the control signal to the servo motor control system of the turntable camera; Control module: connected to the turntable angle calculation module, used for the servo motor control system to receive the control signal and transmit it to the servo motor. The servo motor drives the turntable to rotate to the turntable angle to track the detection target.