Pan-tilt camera rotation detection method and device, equipment and storage medium

By analyzing the video stream captured by the PTZ camera itself, extracting and matching feature points, and calculating the rotation pixel increment, the problem of low efficiency and accuracy of rotation detection of the PTZ camera in the existing technology is solved, and efficient and accurate rotation state detection is achieved. .

CN118646859APending Publication Date: 2024-09-13SHENZHEN BAICHUAN SECURITY TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410773877.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

During the manufacturing process of existing pan/tilt cameras, the efficiency and accuracy of detecting abnormal pan/tilt rotation functions are not high. They mainly rely on manual observation and lack efficient detection methods.

Method used

By acquiring the video stream captured during the rotation of the gimbal camera, extracting and matching feature points in the image to be detected, calculating the rotation pixel increment, determining the rotation angle displacement, and then determining the rotation state of the gimbal camera.

Benefits of technology

It improves the efficiency and accuracy of gimbal camera rotation detection, reduces dependence on the environment and product color matching, avoids the use of expensive third-party cameras, and enables parallel detection of multiple gimbal cameras at low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118646859A
    Figure CN118646859A
Patent Text Reader

Abstract

The invention discloses a rotation detection method, a rotation detection device and rotation detection equipment of a pan-tilt camera and a computer readable storage medium. The rotation detection method comprises the following steps: acquiring a video stream shot in the rotation process of a pan-tilt camera to obtain a plurality of to-be-detected images corresponding to a plurality of video frames in the video stream; feature point extraction is carried out on the multiple to-be-detected images; performing feature point matching on every two adjacent images to be detected in the plurality of images to be detected; determining a rotation pixel increment between every two adjacent images to be detected according to the matched feature point pairs; determining the rotation angular displacement of each to-be-detected image relative to the initial image according to the rotation pixel increment; and determining a rotation detection result of the pan-tilt camera according to the rotation angular displacement. According to the method, the picture shot by the PTZ camera is analyzed to detect whether the rotation of the PTZ camera is abnormal or not, and compared with an existing mode of manually observing whether the rotation of the PTZ camera is abnormal or not, the detection efficiency and the detection precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of monitoring technology, and in particular to a rotation detection method, a rotation detection device, a rotation detection equipment and a computer-readable storage medium for a pan / tilt camera. Background Art

[0002] Surveillance cameras have been widely used in public security, urban traffic monitoring and other fields. In particular, PT (PanTilt) cameras based on PTZ control have become the first choice for surveillance and security equipment due to their larger monitoring range and unique traceability technology. In the production and manufacturing process of PTZ cameras, it is necessary to efficiently complete the PT detection of PTZ cameras and promptly intercept products with abnormal PTZ rotation functions. However, most of the current detection methods rely on manual observation of whether the PTZ rotation is abnormal, and the detection efficiency and accuracy are not high. Summary of the invention

[0003] The embodiments of the present application provide a rotation detection method, a rotation detection device, a rotation detection equipment and a computer-readable storage medium for a gimbal camera to solve at least one of the above-mentioned technical problems.

[0004] The rotation detection method of the embodiment of the present application includes:

[0005] Acquire a video stream captured by the pan-tilt camera during rotation to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream, wherein each video frame corresponds to one image to be detected;

[0006] Extracting feature points from the multiple images to be detected;

[0007] Performing feature point matching on every two adjacent images to be detected among the multiple images to be detected;

[0008] Determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs;

[0009] Determining the rotational angular displacement of each image to be detected relative to an initial image according to the rotational pixel increment, wherein the initial image is an image taken by the gimbal camera at a preset initial position;

[0010] A rotation detection result of the gimbal camera is determined according to the rotation angular displacement.

[0011] In some embodiments, the step of acquiring a video stream captured by the pan-tilt camera during rotation to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream includes:

[0012] Obtain the video stream captured during the rotation of the gimbal camera;

[0013] Performing image distortion judgment on each video frame in the video stream;

[0014] Each video frame is cropped according to the image distortion judgment result, and a plurality of images to be detected are correspondingly obtained.

[0015] In some embodiments, each of the two adjacent images to be detected includes a first image to be detected and a second image to be detected, the first image to be detected is an image to be detected at a previous moment of the second image to be detected, and determining the rotation pixel increment between each of the two adjacent images to be detected according to the matched feature point pairs includes:

[0016] Determine a first center point of the first image to be detected, and obtain pixel coordinates of the first center point;

[0017] Determine a first homography matrix between the first to-be-detected image and the second to-be-detected image according to the matched feature point pairs;

[0018] Determine, according to the first center point pixel coordinates and the first homography matrix, a first pixel coordinate corresponding to the first center point in the second image to be detected;

[0019] The rotation pixel increment is determined according to the first center point pixel coordinates and the first pixel coordinates.

[0020] In some embodiments, determining the rotational angular displacement of each image to be detected relative to the initial image according to the rotational pixel increment includes:

[0021] The rotation pixel increments are accumulated according to the time corresponding to the image to be detected, so as to obtain the rotation angle displacement of each image to be detected relative to the initial image.

[0022] In some embodiments, determining the rotation detection result of the gimbal camera according to the rotation angular displacement includes:

[0023] Whether the rotation of the pan / tilt camera is abnormal is determined according to the change of the rotation angle displacement over time.

[0024] In some embodiments, the rotation detection method further comprises:

[0025] Acquire a pre-stored image corresponding to the PTZ camera at a target position;

[0026] Determining the target rotation angle displacement corresponding to the target position according to the pre-stored image;

[0027] The step of determining the rotation detection result of the pan / tilt camera according to the rotation angle displacement comprises:

[0028] The rotation angle displacement is compared with the target rotation angle displacement to determine whether the pan-tilt camera is rotated to the target position.

[0029] In some embodiments, determining the rotation detection result of the gimbal camera according to the rotation angular displacement includes:

[0030] It is determined according to the rotational angular displacement whether the gimbal camera has rotated to an extreme position and / or whether mechanical jamming occurs.

[0031] The rotation detection device of the pan-tilt camera according to the embodiment of the present application comprises:

[0032] An acquisition module is used to acquire a video stream captured by the pan / tilt camera during rotation, so as to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream, wherein each video frame corresponds to one image to be detected;

[0033] An extraction module, used for extracting feature points from the multiple images to be detected;

[0034] A matching module, used for matching feature points of every two adjacent images to be detected among the multiple images to be detected;

[0035] A determination module, used to determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs;

[0036] The determination module is further used to determine the rotational angular displacement of each of the images to be detected relative to an initial image according to the rotation pixel increment, wherein the initial image is an image taken by the gimbal camera at a preset initial position;

[0037] The determination module is also used to determine the rotation detection result of the gimbal camera according to the rotation angular displacement.

[0038] The rotation detection device of the gimbal camera of the implementation mode of the present application includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the rotation detection method of any of the above implementation modes is implemented.

[0039] The computer-readable storage medium of the embodiment of the present application stores a computer program thereon, and when the program is executed by a processor, the rotation detection method of any of the above-mentioned embodiments is implemented.

[0040] The rotation detection method, rotation detection device, rotation detection equipment and computer-readable storage medium of the gimbal camera of the embodiment of the present application obtain a video stream captured during the rotation of the gimbal camera to obtain multiple images to be detected; extract and match feature points of each adjacent two images to be detected in the multiple images to be detected, and then determine the rotation pixel increment between each adjacent two images to be detected based on the matched feature point pairs to determine the rotation angular displacement of each image to be detected relative to the initial image, and then determine the rotation detection result of the gimbal camera. This method analyzes the images taken by the gimbal camera itself to detect whether the rotation of the gimbal camera is abnormal, which improves the detection efficiency and detection accuracy compared to the existing method of manually observing whether the gimbal rotation is abnormal.

[0041] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0043] Figure 1 It is one of the flow charts of the rotation detection method of the pan-tilt camera in certain embodiments of the present application;

[0044] Figure 2 is a schematic diagram of feature point matching in certain embodiments of the present application;

[0045] Figure 3 This is a second flow chart of a rotation detection method for a pan-tilt camera in certain embodiments of the present application;

[0046] Figure 4 This is a third flow chart of a rotation detection method for a pan-tilt camera according to certain embodiments of the present application;

[0047] Figure 5 This is a fourth flow chart of a rotation detection method for a pan-tilt camera according to certain embodiments of the present application;

[0048] Figure 6 This is a fifth flow chart of a rotation detection method for a pan-tilt camera according to certain embodiments of the present application;

[0049] Figure 7 It is one of the schematic diagrams of the rotation angle displacement changing with the frame number in some embodiments of the present application;

[0050] Figure 8 This is the second schematic diagram of the rotation angle displacement changing with the frame number in some embodiments of the present application;

[0051] Fig. 9 This is the sixth flow chart of the rotation detection method of the pan-tilt camera in certain embodiments of the present application;

[0052] Fig.10 This is the seventh flow chart of the rotation detection method of the pan-tilt camera in certain embodiments of the present application;

[0053] Fig.11 It is a module schematic diagram of a rotation detection device of a pan-tilt camera in certain embodiments of the present application;

[0054] Fig.12 It is a module schematic diagram of a rotation detection device of a pan-tilt camera in certain embodiments of the present application;

[0055] Fig.13 It is a schematic diagram of the connection status between a computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION

[0056] The following is a further description of the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions from beginning to end. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the present application.

[0057] See also Figure 1 The present application provides a method for detecting the rotation of a pan-tilt camera. The method for detecting the rotation includes:

[0058] 010: Obtain the video stream captured by the gimbal camera during rotation to obtain multiple images to be detected corresponding to multiple video frames in the video stream, where each video frame corresponds to an image to be detected;

[0059] 020: Extract feature points from multiple images to be detected;

[0060] 030: performing feature point matching on each two adjacent images to be detected among the multiple images to be detected;

[0061] 040: Determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs;

[0062] 050: Determine the rotational angular displacement of each image to be detected relative to the initial image according to the rotation pixel increment, where the initial image is an image taken by the gimbal camera at a preset initial position;

[0063] 060: Determine the rotation detection result of the gimbal camera based on the rotation angle displacement.

[0064] The rotation detection method of the gimbal camera of the embodiment of the present application obtains a plurality of images to be detected by acquiring a video stream captured during the rotation of the gimbal camera; extracts and matches feature points of each adjacent pair of images to be detected among the plurality of images to be detected, and then determines the rotation pixel increment between each adjacent pair of images to be detected based on the matched feature point pairs, so as to determine the rotation angular displacement of each image to be detected relative to the initial image, and then determines the rotation detection result of the gimbal camera. This method analyzes the images captured by the gimbal camera itself to detect whether the rotation of the gimbal camera is abnormal, which improves the detection efficiency and detection accuracy compared to the existing method of manually observing whether the gimbal rotation is abnormal.

[0065] Specifically, rotation refers to the rotation of the gimbal camera in the horizontal direction or the vertical direction. During the rotation of the gimbal camera, the camera itself shoots to obtain a video stream. The video stream includes multiple video frames, and the multiple video frames are continuous in time. According to the multiple video frames, multiple images to be detected can be obtained accordingly, and one video frame corresponds to one image to be detected, so the multiple images to be detected are a series of images that are continuous in time.

[0066] Feature points are extracted from each of the two adjacent images to be detected among the multiple images to be detected. Specifically, any feature point extraction algorithm can be used for feature point extraction. For example, the GFTT (Good Features to Track) feature point extraction algorithm, the ORB (Oriented FAST and Rotated BRIEF) feature point extraction algorithm or the SURF (Speeded Up Robust Features) feature point extraction algorithm can be used for feature point extraction. After the feature points are extracted, feature point matching is performed on the feature points in each of the two adjacent images to be detected to determine the most similar feature points and obtain feature point pairs. Any feature point matching algorithm can be used for feature point matching. For example, the optical flow method or the scale-invariant feature transform (SIFT) algorithm can be used for feature point matching.

[0067] By matching the feature points of each two adjacent images to be detected, a set of feature point pairs can be obtained. A set of feature point pairs may include multiple pairs of feature point pairs. Figure 2 As shown, from the left image to the right image, it represents the two adjacent images to be detected corresponding to the left rotation of the gimbal camera. The two points connected by a line segment are a pair of feature points. A pair of feature points can represent the corresponding points of the same object in the two images to be detected, and the pixel coordinates of the corresponding points have changed.

[0068] If the multiple images to be detected include k time-continuous images to be detected, k-1 groups of feature point pairs can be obtained. According to each group of feature point pairs, the corresponding rotation pixel increment between each two adjacent images to be detected can be determined, and each two adjacent images to be detected correspond to one rotation pixel increment. According to the rotation pixel increment, the rotation angular displacement of each image to be detected relative to the initial image can be determined, and the initial image is the image taken by the gimbal camera at a preset initial position.

[0069] The preset initial position can be selected as the 1 / 2 position of the maximum rotation stroke of the gimbal camera. Of course, the preset initial position can also be the left limit position, the right limit position, the upper limit position or the lower limit position.

[0070] The rotation detection result of the gimbal camera can be determined according to the rotation angle displacement. For example, according to the multiple rotation angle displacements corresponding to the multiple images to be detected, it can be determined whether the rotation of the gimbal camera is abnormal, whether the gimbal camera has rotated to the target position, whether the gimbal camera has rotated to the extreme position and / or whether mechanical jamming occurs.

[0071] It should be noted that due to limitations in cost, size and other factors, most gimbal cameras are not equipped with angular displacement sensors, which makes it difficult to precisely control the gimbal. In fact, because closed-loop angular displacement control cannot be achieved, the software is unable to detect problems such as freezing, jitter, and inability to reach a preset fixed position during rotation.

[0072] In the related art, whether the rotation of the gimbal camera is abnormal is determined by manual observation, which has low detection efficiency and low detection accuracy. Alternatively, a third-party camera is used to directly shoot and record the rotation process of the gimbal camera, and image analysis is performed to determine whether the rotation of the gimbal camera is abnormal. Since the surface of the gimbal camera is relatively smooth and easy to reflect light, it is difficult to judge whether the gimbal camera is rotating for scenes with spherical gimbal cameras and no texture on the surface; at the same time, the influence of ambient light sources, and the fact that the same gimbal camera product may have multiple different color schemes or pattern textures, will all cause inaccurate detection or even misjudgment. In addition, auxiliary equipment such as third-party cameras are expensive, and one third-party camera can only shoot one gimbal camera. Considering the cost, it is impossible to achieve parallel detection of multiple gimbal cameras.

[0073] In the implementation manner of the present application, the pan-tilt camera itself takes pictures during its rotation, and detection is performed based on the video stream obtained by the shooting. In this way, compared with manual observation, the detection efficiency and detection accuracy are greatly improved. Compared with shooting with a third-party camera, it is not affected by the color matching or pattern texture of the product itself, has low environmental requirements, improves detection accuracy and robustness, and does not need to rely on expensive third-party cameras and other auxiliary equipment, effectively reducing the detection cost. It is also possible to achieve parallel detection of multiple pan-tilt cameras, and the pan-tilt camera can achieve detection without plugging in and out the power supply or moving the position. In addition, the same shooting angle as the end user is used for testing, and the detection is closer to actual work requirements.

[0074] The above detection process can be integrated with other detection links. For example, the above detection process can be embedded in the sound detection process. The sound detection is carried out in a soundproof box. There is a distribution of attracting cotton inside the soundproof box, which has rich features and is convenient for the above detection process. By analyzing the video stream captured by the PTZ camera itself, the image quality of the PTZ camera can also be detected, such as whether it is focused, whether the exposure brightness is normal, etc. If the detection is carried out on the host computer, products with abnormal network communication can also be filtered out. This enables the simultaneous detection of multiple functions and improves the detection efficiency.

[0075] See also Figure 3 In some embodiments, a video stream captured by the pan-tilt camera during rotation is obtained to obtain a plurality of images to be detected (i.e., 010) corresponding to a plurality of video frames in the video stream, including:

[0076] 011: Get the video stream captured during the rotation of the gimbal camera;

[0077] 012: Perform image distortion judgment on each video frame in the video stream;

[0078] 013: Crop each video frame according to the image distortion judgment result, and obtain multiple images to be detected accordingly.

[0079] Specifically, when the gimbal camera rotates in the horizontal direction or vertical direction, a complete video of the rotation process is captured to obtain a video stream. Image distortion is determined for each video frame in the video stream to determine whether the video frame is distorted and the degree of distortion. Whether the video frame is distorted and the degree of distortion can be determined by directly observing the video frame or based on the distortion parameters of the gimbal camera lens.

[0080] It can be understood that distortion mainly affects the edge of the video frame. When the video frame is distorted, the features at the edge of the video frame will become blurred or bent, affecting the detection accuracy of subsequent steps. The more severe the distortion, the larger the range of feature blur or bending. Therefore, when the video frame is distorted, the center part of the video frame can be retained as the image to be detected, thereby further improving the detection accuracy of the gimbal camera rotation.

[0081] When the video frame is distorted, the video frame is cropped according to the degree of distortion. The more severe the distortion, the larger the cropping range. For example, 67% of the pixels can be retained vertically and horizontally from the center of the video frame to the outside, and the redundant video frame can be cropped to obtain the corresponding image to be detected. It should be noted that when the video frame is not distorted, the video frame can be directly used as the image to be detected without cropping.

[0082] See also Figure 4 In some embodiments, each of the two adjacent images to be detected includes a first image to be detected and a second image to be detected, and the first image to be detected is the image to be detected at the previous moment of the second image to be detected. Determining the rotation pixel increment (i.e., 040) between each of the two adjacent images to be detected based on the matched feature point pairs includes:

[0083] 041: Determine a first center point of a first image to be detected, and obtain pixel coordinates of the first center point;

[0084] 042: Determine a first homography matrix between the first image to be detected and the second image to be detected according to the matched feature point pairs;

[0085] 043: Determine, according to the pixel coordinates of the first center point and the first homography matrix, a first pixel coordinate corresponding to the first center point in the second image to be detected;

[0086] 044: Determine the rotation pixel increment according to the first center point pixel coordinates and the first pixel coordinates.

[0087] During the rotation of the gimbal camera, any two video frames correspond to two imaging target surfaces, and the two imaging target surfaces can completely overlap by rotating in the opposite direction. Therefore, without considering distortion, the corresponding two images to be detected conform to the homography transformation, so the homography matrix can be used to describe the transformation relationship between the two images to be detected. The homography matrix can be solved by the feature point pairs of the two images to be detected.

[0088] Specifically, the first center point of the first image to be detected is determined to obtain the pixel coordinates of the first center point. The center point of the image to be detected can be determined according to the size of the image to be detected. For example, if the size of the first image to be detected is 1024×1024, the pixel coordinates of the first center point are (512, 512).

[0089] After determining the pixel coordinates of the first center point of the first image to be detected, the pixel coordinates of the matched feature point pairs in the first image to be detected and the second image to be detected are obtained. Based on the multiple feature point pairs obtained by matching, the transformation relationship between the feature point pairs, that is, the first homography matrix, can be determined by solving the least squares method. The first homography matrix can characterize the transformation relationship between the first image to be detected and the second image to be detected. The relationship between the feature point pairs and the first homography matrix is ​​shown in the following formula:

[0090] P2=H1×P1

[0091] Wherein, P1 is the coordinate of the feature point in the first image to be detected, P2 is the coordinate of the feature point in the second image to be detected, and H1 is the first homography matrix. According to the feature point pairs of each two adjacent images to be detected, the homography matrix between each two adjacent images to be detected can be determined.

[0092] If the first image to be detected is the image to be detected at the initial moment, after the second image to be detected, the multiple images to be detected also include a third image to be detected, a fourth image to be detected, ..., a k-1th image to be detected, and a kth image to be detected that are continuous in time, wherein k represents the kth image to be detected in the multiple images to be detected. By calculation, the transformation relationship between the matching feature point pairs in the second image to be detected and the third image to be detected, that is, the second homography matrix, can be determined. Then, the relationship between the feature point pairs of the second image to be detected and the third image to be detected and the second homography matrix is:

[0093] P3=H2×P2

[0094] Among them, P3 is the coordinate of the feature point in the third image to be detected, and H2 is the second homography matrix.

[0095] By calculation, the transformation relationship between the matched feature point pairs in the third image to be detected and the fourth image to be detected, that is, the third homography matrix, can be determined. Then, the relationship between the feature point pairs of the third image to be detected and the fourth image to be detected and the third homography matrix is:

[0096] P4=H3×P3

[0097] Among them, P4 is the coordinate of the feature point in the fourth image to be detected, and H3 is the third homography matrix.

[0098] By analogy, the transformation relationship between the k-1th image to be detected and the matching feature point pairs in the k-th image to be detected can be determined by calculation, that is, the k-1th homography matrix. Then the relationship between the feature point pairs between the k-1th image to be detected and the k-th image to be detected and the k-1th homography matrix is:

[0099] Pk =H k-1 ×P k-1

[0100] Among them, P k-1 is the coordinate of the feature point in the k-1th image to be detected, H k-1 is the k-1th homography matrix, P k is the coordinate of the feature point in the kth image to be detected.

[0101] It should be noted that when the gimbal camera is stationary, if there is no autonomously moving object in the scene, the feature points in the image to be detected remain stationary; or if there are individual moving objects in the scene, most of the feature points in the image to be detected remain stationary. At this time, the obtained homography matrix is ​​a unit matrix, indicating that the coordinates of the feature points do not change over time.

[0102] After the homography matrix is ​​determined, the position of the first center point in the second image to be detected, that is, the first pixel coordinate, can be determined according to the pixel coordinates of the first center point and the first homography matrix, as shown in the following formula:

[0103] O 21 =H1×O1

[0104] Among them, O 21 is the first pixel coordinate, O1 is the first center point pixel coordinate.

[0105] According to the first center point pixel coordinate O1 and the first pixel coordinate O 21 , the rotation pixel increment between the first image to be detected and the second image to be detected can be determined as:

[0106] Δ2=O 21 -O1=H1×O1-O1

[0107] Wherein, Δ2 is the rotation pixel increment between the first image to be detected and the second image to be detected.

[0108] For the second image to be detected and the third image to be detected at adjacent moments, the second center point of the second image to be detected is determined to obtain the second center point pixel coordinates. According to the second center point pixel coordinates and the second homography matrix, the position of the second center point in the third image to be detected, that is, the second pixel coordinates, can be determined as follows:

[0109] O 32 =H2×O2

[0110] Among them, O2 is the pixel coordinate of the second center point, O 32 is the second pixel coordinate.

[0111] According to the second center point pixel coordinate O2 and the second pixel coordinate O 32, it can be determined that the rotation pixel increment between the second image to be detected and the third image to be detected is:

[0112] Δ3=O 32 -O2=H2×O2-O2

[0113] Wherein, Δ3 is the rotation pixel increment between the second image to be detected and the third image to be detected.

[0114] For the third image to be detected and the fourth image to be detected at adjacent moments, the third center point of the third image to be detected is determined to obtain the pixel coordinates of the third center point. According to the pixel coordinates of the third center point and the third homography matrix, the position of the third center point in the fourth image to be detected, that is, the third pixel coordinates, can be determined as follows:

[0115] O 43 =H3×O3

[0116] Among them, O3 is the pixel coordinate of the third center point, O 43 is the third pixel coordinate.

[0117] According to the third center point pixel coordinate O3 and the third pixel coordinate O 43 , it can be determined that the rotation pixel increment Δ4 between the third image to be detected and the fourth image to be detected is:

[0118] Δ4=O 43 -O3=H3×O3-O3

[0119] Wherein, Δ4 is ​​the rotation pixel increment between the third image to be detected and the fourth image to be detected.

[0120] By analogy, for the k-1th image to be detected and the kth image to be detected at adjacent moments, the k-1th center point of the k-1th image to be detected is determined to obtain the k-1th center point pixel coordinates. According to the k-1th center point pixel coordinates and the k-1th homography matrix, the position of the k-1th center point in the kth image to be detected, that is, the k-1th pixel coordinates, can be determined as follows:

[0121] O k(k-1) =H k-1 ×O k-1

[0122] Among them, O k-1 is the pixel coordinate of the k-1th center point, O k(k-1) is the k-1th pixel coordinate.

[0123] According to the pixel coordinates O of the k-1th center point k-1 and the k-1th pixel coordinate O k(k-1), we can determine the rotation pixel increment between the k-1th image to be detected and the kth image to be detected as:

[0124] Δ k =O k(k-1) -O k-1 =H k-1 ×O k-1 -O k-1

[0125] Among them, Δ k is the rotation pixel increment between the k-1th image to be detected and the kth image to be detected.

[0126] See also Figure 5 In some embodiments, determining the rotational angular displacement (i.e., 0.50) of each image to be detected relative to the initial image according to the rotation pixel increment includes:

[0127] 051: Accumulate the rotation pixel increment according to the time corresponding to the image to be detected, and obtain the rotation angle displacement of each image to be detected relative to the initial image.

[0128] Specifically, according to the time corresponding to the image to be detected, multiple rotation pixel increments calculated based on the image to be detected at that time and multiple images to be detected before that time are accumulated to obtain the rotation angle displacement of the image to be detected at that time relative to the initial image. The calculation formula of the rotation angle displacement of the kth image to be detected relative to the initial image is as follows:

[0129]

[0130] Among them, R k is the rotational angular displacement of the kth image to be detected relative to the initial image; i represents the frame number of the image to be detected, for example, when i=1, it corresponds to the first image to be detected, that is, the initial image; Δ i Indicates the rotation pixel increment between the i-1th image to be detected and the ith image to be detected. It can be understood that Δ1=0, R1=0. The rotation angle displacement is in pixels (piexl). Taking horizontal rotation as an example, when the rotation angle displacement is -1000, it means that the gimbal camera has rotated 1000 pixels to the left relative to the initial position; when the rotation angle displacement is 1000, it means that the gimbal camera has rotated 1000 pixels to the right relative to the initial position.

[0131] See also Figure 6 In some embodiments, determining the rotation detection result of the gimbal camera (i.e., 060) according to the rotation angular displacement includes:

[0132] 061: Determine whether the rotation of the gimbal camera is abnormal based on the change of the rotation angle displacement over time.

[0133] The rotation detection method of the embodiment of the present application can be applied to the factory inspection of the gimbal camera. Specifically, a relationship diagram of the rotation angle displacement versus the frame number can be drawn based on the multiple rotation angle displacements corresponding to the multiple images to be detected and the corresponding video frame number, that is, a relationship diagram of the rotation angle displacement versus time, such as Figure 7 and Figure 8 Afterwards, by observing with the human eye or classifying the relationship graph using an image classification algorithm based on deep learning, it can be determined whether the rotation of the gimbal camera is abnormal.

[0134] like Figure 7 As shown in the figure, the oblique line part of the relationship diagram is approximately a straight line, indicating that the rotation of the gimbal camera is relatively uniform; the horizontal line part has no fluctuation and is very stable, indicating that there is no jitter when the gimbal camera is stationary; and the vertical coordinates corresponding to the first point and the last point are almost the same, indicating that the gimbal camera can be rotated back to the initial position, and it is determined that the rotation of the gimbal camera is normal.

[0135] like Figure 8 As shown in the figure, the oblique line part in the relationship diagram is not close to a straight line, indicating that there are freezes and jitters in the rotation process of the gimbal camera; and the vertical coordinates corresponding to the first point and the last point are quite different, indicating that the gimbal camera cannot be rotated back to the initial position, and it is determined that the rotation of the gimbal camera is abnormal.

[0136] In addition, mathematical analysis methods can also be used to determine whether the rotation of the gimbal camera is abnormal. For example, the data points in the relationship diagram and the rotation control instructions at the corresponding time can be analyzed to determine whether the rotation of the gimbal camera is abnormal. The specific process can be as follows: during the horizontal rotation of the gimbal camera, a left turn instruction is issued to the gimbal camera, and a stop instruction is issued after a period of time, and the rotation angle displacement is analyzed during this period of time. When the rotation angle displacement is linearly and steadily increasing or decreasing, it is determined that the rotation of the gimbal camera is normal; when the rotation angle displacement is not linearly and steadily increasing or decreasing, it is determined that the rotation of the gimbal camera is abnormal.

[0137] The rotation detection method of the embodiment of the present application can also be applied to the actual application scenario of the pan-tilt camera to eliminate the preset point error or reduce the wear of the rotating mechanism. The process of eliminating the preset point error by using the rotation detection method of the embodiment of the present application is described in detail below.

[0138] See also Fig. 9 In some embodiments, the rotation detection method further comprises:

[0139] 070: Get the pre-stored image corresponding to the target position of the gimbal camera;

[0140] 080: Determine the target rotation angle displacement corresponding to the target position according to the pre-stored image;

[0141] At this time, the rotation detection result of the gimbal camera (ie 060) is determined according to the rotation angle displacement, including:

[0142] 062: Compare the rotation angle displacement with the target rotation angle displacement to determine whether the gimbal camera rotates to the target position.

[0143] When using a gimbal camera, the user will pre-set several fixed positions. When the gimbal camera needs to be in a fixed position, the corresponding command can be issued to control the gimbal camera to rotate to the fixed position. In the related art, the motor command for the gimbal camera to rotate to each fixed position is saved to control the gimbal camera to rotate to a fixed position. For example, when the gimbal camera rotates to a fixed position, the stepper motor needs to rotate forward 200 steps or the DC reduction motor needs to be powered on for 20 seconds, and the above motor command is saved. When the gimbal camera needs to be in the fixed position, the stepper motor needs to rotate forward 200 steps or the DC reduction motor needs to be powered on for 20 seconds to rotate the gimbal camera to the fixed position. However, there will be a deviation between the actual rotation position and the fixed position. The farther the extreme position of the gimbal camera is, the greater the deviation is when returning to the initial position. As the use time increases, the uncertainty of the angular displacement control of the gimbal camera will increase significantly.

[0144] Therefore, it is possible to pre-store images taken when the gimbal camera is in several fixed positions, and determine whether the gimbal camera has rotated to a fixed position by comparing the rotational angular displacement of the pre-stored images with the current rotational angular displacement of the gimbal camera. The specific process is as follows: select one of the several fixed positions as the target position, obtain the pre-stored image corresponding to the gimbal camera at the target position, and the pre-stored image is an image pre-shot and stored by the gimbal camera at the target position. In the pre-shooting process, the rotational angular displacement of the pre-stored image can be determined based on a series of continuous images, and the rotational angular displacement is used as the target rotational angular displacement.

[0145] Afterwards, in the process of controlling the rotation of the gimbal camera, the current rotation angular displacement of the gimbal camera is continuously calculated and compared with the target angular displacement to determine whether the gimbal camera has rotated to the target position. When the rotation angular displacement of the gimbal camera is equal to the target rotation angular displacement, it means that the gimbal camera has rotated to the target position, and the motor power supply can be cut off to stop the rotation of the gimbal camera. When the rotation angular displacement of the gimbal camera is not equal to the target angular displacement, it means that the gimbal camera has not rotated to the target position, and it continues to rotate, and continues to calculate the rotation angular displacement of the gimbal camera to compare with the target rotation angular displacement until the rotation angular displacement of the gimbal camera is equal to the target angular displacement. In this way, in the scenario of long-term use by the end user, the gimbal rotation can be effectively detected to solve the problem of not being able to accurately reach the target position or the deviation from the target position.

[0146] The following describes in detail the process of using the rotation detection method according to the embodiment of the present application to reduce the wear of the rotating mechanism.

[0147] See also Fig.10 In some embodiments, the rotation detection result (i.e., 060) of the gimbal camera is determined according to the rotation angle displacement corresponding to the plurality of images to be detected, including:

[0148] 063: Determine whether the gimbal camera has rotated to the extreme position and / or whether mechanical jamming has occurred based on the rotation angle displacement.

[0149] After the gimbal camera is installed and fixed, as the usage time increases, the wear of the rotating mechanism of the gimbal camera and the backlash problems such as gear clearance will become more and more serious, and the angular displacement control accuracy of the gimbal camera will continue to decrease, so that the gimbal camera cannot accurately reach the fixed position pre-set by the user, resulting in the failure to capture key monitoring events in the obtained surveillance video.

[0150] In the related art, when the angular displacement control error is found to be large after multiple rotations, the stepper motor is controlled to rotate a larger number of steps or the motor is powered on for a longer time, so that the gimbal camera rotates to the extreme position to calibrate the gimbal camera. In order to ensure that the gimbal camera rotates to the extreme position, a strategy of delaying the motor stop is adopted. For example, under normal circumstances, the motor needs to be powered on for 5 seconds to rotate from the leftmost to the rightmost of the gimbal camera. Considering the backlash problem, the motor will be powered on for 8 seconds. However, when the gimbal camera rotates to the extreme position or freezes, there is no timely feedback to stop the motor. The motor will continue to rotate to a predetermined number of steps or continue to be powered on for a predetermined time. Even if the mechanical backlash is eliminated, the rotating mechanism will inevitably be subjected to greater stress and wear, and the motor itself may be damaged or the drive circuit may fail due to heat, which will cause the control accuracy of the gimbal camera to continue and irreversibly decrease.

[0151] In the implementation mode of the present application, it is possible to determine whether the pan-tilt camera has rotated to the limit position according to a plurality of rotational angular displacements. For example, during factory inspection, when the pan-tilt camera rotates to the limit position, the rotational angular displacement is ±2000piex1. When the pan-tilt camera is rotated for calibration, a plurality of rotational angular displacements are determined according to the captured video stream. When the rotational angular displacement is greater than or equal to 2000piex1 and less than or equal to -2000piex1, it indicates that the pan-tilt camera has rotated to the limit position, and the motor power supply is immediately cut off.

[0152] During the rotation of the gimbal camera, it is also possible to determine whether the gimbal camera has mechanical jamming based on multiple rotational angular displacements. For example, multiple rotational angular displacements are determined based on the captured video stream. When the rotational angular displacement fluctuates around 1500piexl and no longer increases, it indicates that the gimbal camera has jammed, and the motor power supply is cut off in time. In this way, the angular displacement control error is eliminated, unnecessary wear of the rotating mechanism is avoided, and the service life of the gimbal camera is increased.

[0153] See also Fig.11 , an embodiment of the present application provides a rotation detection device 100 for a gimbal camera. The rotation detection device 100 includes an acquisition module 10, an extraction module 20, a matching module 30 and a determination module 40. The acquisition module 10 is used to acquire a video stream captured during the rotation of the gimbal camera to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream, and each video frame corresponds to an image to be detected. The extraction module 20 is used to extract feature points from the plurality of images to be detected. The matching module 30 is used to match feature points between each two adjacent images to be detected in the plurality of images to be detected. The determination module 40 is used to determine the rotation pixel increment between each two adjacent images to be detected based on the matched feature point pairs. The determination module 40 is also used to determine the rotation angular displacement of each image to be detected relative to the initial image based on the rotation pixel increment, and the initial image is an image captured by the gimbal camera at a preset initial position. The determination module 40 is also used to determine the rotation detection result of the gimbal camera based on the rotation angular displacement.

[0154] In some embodiments, the acquisition module 10 is specifically used to acquire a video stream captured during the rotation of the gimbal camera; perform image distortion judgment on each video frame in the video stream; and crop each video frame according to the image distortion judgment result to obtain a plurality of images to be detected accordingly.

[0155] In some embodiments, two images to be detected at adjacent moments include a first image to be detected and a second image to be detected, and the first image to be detected is the image to be detected at the previous moment of the second image to be detected. The determination module 40 is specifically used to determine the first center point of the first image to be detected and obtain the pixel coordinates of the first center point; determine the first homography matrix between the first image to be detected and the second image to be detected according to the matched feature point pairs; determine the first pixel coordinates corresponding to the first center point in the second image to be detected according to the pixel coordinates of the first center point and the first homography matrix; determine the rotation pixel increment according to the pixel coordinates of the first center point and the first pixel coordinates.

[0156] In some implementations, the determination module 40 is specifically configured to accumulate the rotation pixel increments according to the time corresponding to the image to be detected, so as to obtain the rotational angular displacement of each image to be detected relative to the initial image.

[0157] In some implementations, the determination module 40 is specifically configured to determine whether the rotation of the gimbal camera is abnormal according to how the rotation angle displacement changes over time.

[0158] In some embodiments, the acquisition module 10 is further used to acquire a pre-stored image corresponding to the target position of the PTZ camera. The determination module 40 is further used to determine the target rotation angle displacement corresponding to the target position according to the pre-stored image. At this time, the determination module 40 is specifically used to compare the rotation angle displacement with the target rotation angle displacement to determine whether the PTZ camera is rotated to the target position.

[0159] In some embodiments, the determination module 40 is specifically used to determine whether the gimbal camera is rotated to an extreme position and / or whether mechanical jamming occurs according to the rotational angular displacement.

[0160] It should be pointed out that the explanation of the rotation detection method of the gimbal camera in the aforementioned embodiment is also applicable to the rotation detection device 100 of the embodiment of the present application, and will not be elaborated here.

[0161] See also Fig.12 The present application also provides a rotation detection device 200 for a gimbal camera. The rotation detection device 200 includes one or more processors 210 and a memory 220. The memory 220 stores a computer program. When the computer program is executed by the processor 210, the rotation detection method of any of the above embodiments is implemented.

[0162] For example, when the computer program is executed by the processor 210, the following rotation detection method is implemented:

[0163] 010: Obtain the video stream captured by the gimbal camera during rotation to obtain multiple images to be detected corresponding to multiple video frames in the video stream, where each video frame corresponds to an image to be detected;

[0164] 020: Extract feature points from multiple images to be detected;

[0165] 030: performing feature point matching on each two adjacent images to be detected among the multiple images to be detected;

[0166] 040: Determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs;

[0167] 050: Determine the rotational angular displacement of each image to be detected relative to the initial image according to the rotation pixel increment, where the initial image is an image taken by the gimbal camera at a preset initial position;

[0168] 060: Determine the rotation detection result of the gimbal camera based on the rotation angle displacement.

[0169] For another example, when the computer program is executed by the processor 210, the following rotation detection method is implemented:

[0170] 011: Get the video stream captured during the rotation of the gimbal camera;

[0171] 012: Perform image distortion judgment on each video frame in the video stream;

[0172] 013: Crop each video frame according to the image distortion judgment result, and obtain multiple images to be detected accordingly.

[0173] It should be pointed out that the explanation of the rotation detection method and the rotation detection device 100 of the gimbal camera in the aforementioned embodiment is also applicable to the rotation detection device 100 of the embodiment of the present application, and will not be elaborated here.

[0174] See also Fig.13 The present application also provides a computer-readable storage medium 300 on which a computer program 310 is stored. When the program is executed by a processor 320, the rotation detection method of any of the above embodiments is implemented. The computer-readable storage medium 300 can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.

[0175] For example, when the program is executed by the processor 320, the following rotation detection method is implemented:

[0176] 010: Obtain the video stream captured by the gimbal camera during rotation to obtain multiple images to be detected corresponding to multiple video frames in the video stream, where each video frame corresponds to an image to be detected;

[0177] 020: Extract feature points from multiple images to be detected;

[0178] 030: performing feature point matching on each two adjacent images to be detected among the multiple images to be detected;

[0179] 040: Determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs;

[0180] 050: Determine the rotational angular displacement of each image to be detected relative to the initial image according to the rotation pixel increment, where the initial image is an image taken by the gimbal camera at a preset initial position;

[0181] 060: Determine the rotation detection result of the gimbal camera based on the rotation angle displacement.

[0182] For another example, when the program is executed by the processor 320, the following rotation detection method is implemented:

[0183] 011: Get the video stream captured during the rotation of the gimbal camera;

[0184] 012: Perform image distortion judgment on each video frame in the video stream;

[0185] 013: Crop each video frame according to the image distortion judgment result, and obtain multiple images to be detected accordingly.

[0186] It should be pointed out that the explanation of the rotation detection method and the rotation detection device 100 of the gimbal camera in the aforementioned embodiment is also applicable to the computer-readable storage medium 300 of the embodiment of the present application, and will not be elaborated here.

[0187] In summary, the rotation detection method, rotation detection device 100, rotation detection equipment 200 and computer-readable storage medium 300 of the gimbal camera of the embodiment of the present application obtain a video stream captured during the rotation of the gimbal camera to obtain multiple images to be detected; feature points are extracted and matched for each two adjacent images to be detected in the multiple images to be detected, and then the rotation pixel increment between each two adjacent images to be detected is determined based on the matched feature point pairs to determine the rotation angular displacement of each image to be detected relative to the initial image, thereby determining the rotation detection result of the gimbal camera. This method analyzes the images taken by the gimbal camera itself to detect whether the rotation of the gimbal camera is abnormal, which improves the detection efficiency and detection accuracy compared to the existing method of manually observing whether the gimbal rotation is abnormal.

[0188] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0189] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0190] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a computer-readable storage medium can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0191] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0192] A person of ordinary skill in the art will appreciate that all or part of the steps carried by the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment. In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0193] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application. The scope of the present application is defined by the claims and their equivalents.

Claims

1. A rotation detection method for a pan / tilt camera, characterized in that: include: Acquire a video stream captured by the pan-tilt camera during rotation to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream, wherein each video frame corresponds to one image to be detected; Extracting feature points from the multiple images to be detected; Performing feature point matching on every two adjacent images to be detected among the multiple images to be detected; Determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs; Determining the rotational angular displacement of each of the images to be detected relative to an initial image according to the rotational pixel increment, wherein the initial image is an image taken by the gimbal camera at a preset initial position; A rotation detection result of the gimbal camera is determined according to the rotation angular displacement.

2. The rotation detection method according to claim 1, characterized in that: The step of obtaining a video stream captured by the pan-tilt camera during rotation to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream includes: Obtain the video stream captured during the rotation of the gimbal camera; Performing image distortion judgment on each video frame in the video stream; Each video frame is cropped according to the image distortion judgment result, and a plurality of images to be detected are correspondingly obtained.

3. The rotation detection method according to claim 1, characterized in that: Each of the two adjacent images to be detected includes a first image to be detected and a second image to be detected, the first image to be detected is an image to be detected at a previous moment of the second image to be detected, and determining the rotation pixel increment between each of the two adjacent images to be detected according to the matched feature point pairs includes: Determine a first center point of the first image to be detected, and obtain pixel coordinates of the first center point; Determine a first homography matrix between the first to-be-detected image and the second to-be-detected image according to the matched feature point pairs; Determine, according to the first center point pixel coordinates and the first homography matrix, a first pixel coordinate corresponding to the first center point in the second image to be detected; The rotation pixel increment is determined according to the first center point pixel coordinates and the first pixel coordinates.

4. The rotation detection method according to claim 1, characterized in that: Determining the rotational angular displacement of each image to be detected relative to the initial image according to the rotational pixel increment comprises: The rotation pixel increments are accumulated according to the time corresponding to the image to be detected, so as to obtain the rotation angle displacement of each image to be detected relative to the initial image.

5. The rotation detection method according to claim 1, characterized in that: The step of determining the rotation detection result of the pan / tilt camera according to the rotation angle displacement comprises: Whether the rotation of the pan / tilt camera is abnormal is determined according to the change of the rotation angle displacement over time.

6. The rotation detection method according to claim 1, characterized in that: The rotation detection method further comprises: Acquire a pre-stored image corresponding to the PTZ camera at a target position; Determining the target rotation angle displacement corresponding to the target position according to the pre-stored image; The step of determining the rotation detection result of the pan / tilt camera according to the rotation angle displacement comprises: The rotation angle displacement is compared with the target rotation angle displacement to determine whether the pan-tilt camera is rotated to the target position.

7. The rotation detection method according to claim 1, characterized in that: The step of determining the rotation detection result of the pan / tilt camera according to the rotation angle displacement comprises: It is determined according to the rotational angular displacement whether the gimbal camera has rotated to an extreme position and / or whether mechanical jamming occurs.

8. A rotation detection device for a pan / tilt camera, characterized in that: include; An acquisition module is used to acquire a video stream captured by the pan / tilt camera during rotation, so as to obtain a plurality of images to be detected corresponding to a plurality of video frames in the video stream, wherein each video frame corresponds to one image to be detected; An extraction module, used for extracting feature points from the multiple images to be detected; A matching module, used for matching feature points of every two adjacent images to be detected among the multiple images to be detected; A determination module, used to determine the rotation pixel increment between each two adjacent images to be detected according to the matched feature point pairs; The determination module is further used to determine the rotational angular displacement of each of the images to be detected relative to an initial image according to the rotation pixel increment, wherein the initial image is an image taken by the gimbal camera at a preset initial position; The determination module is also used to determine the rotation detection result of the gimbal camera according to the rotation angular displacement.

9. A rotation detection device for a pan / tilt camera, characterized in that: The rotation detection device includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the rotation detection method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the rotation detection method described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Unmanned aerial vehicle surveying and mapping method and device, unmanned aerial vehicle, medium and product

    CN119904517A