Camera angle adjusting method, device, system and equipment and medium

The camera angle is automatically adjusted through multi-camera image stitching technology, which solves the problem that the camera in the monitoring system cannot adapt to environmental changes, and realizes blind spot monitoring and high coverage.

CN120658948APending Publication Date: 2025-09-16SHENZHEN XIAOPAI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510951267.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In existing monitoring systems, cameras cannot automatically adjust their angles to adapt to environmental changes, resulting in poor dynamic adaptability and blind spots in monitoring.

Method used

By deploying multiple rotatable cameras, wide-angle images from multiple different angles are collected, feature point matching and stitching analysis are performed, the camera angle is automatically adjusted to cover uncovered areas, and image stitching technology is used to determine the rotation angle and direction of the camera.

Benefits of technology

It realizes monitoring without blind spots, improves the dynamic adaptability of intelligent monitoring, reduces monitoring blind spots, and simplifies the camera adjustment process without the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658948A_ABST
    Figure CN120658948A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent monitoring, particularly discloses a camera angle adjusting method, device, system and equipment and a medium, and is mainly used for solving the technical problem that a traditional monitoring scheme is poor in dynamic adaptability. The method comprises the following steps: respectively acquiring a plurality of wide-angle images at different angles by using a plurality of rotatable cameras deployed in a target area; performing feature point matching and splicing analysis on the two wide-angle images of the plurality of different angles to obtain a spliced image; judging whether the spliced image has an uncovered area or not; and when it is judged that the spliced image has the uncovered area, determining the rotation angle and direction of an adjusted camera based on the uncovered area so as to control the camera to be adjusted according to the rotation angle and direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent monitoring technology, and in particular to a camera angle adjustment method, device, system, equipment and medium. Background Art

[0002] In surveillance scenarios, multiple cameras are typically deployed to intelligently monitor the same target area. Traditional solutions can create overlapping or uncovered areas between cameras, leading to blind spots. Existing systems, some of which achieve coverage through pre-set camera positions, lack dynamic adjustment capabilities, making them inadequate for complex scenarios. For example, when the monitored area changes (such as the introduction of new obstructions), the camera angle cannot automatically adjust to the new scene to achieve comprehensive monitoring, resulting in poor dynamic adaptability. Summary of the Invention

[0003] The embodiments of the present application provide a camera angle adjustment method, apparatus, system, device, and medium to mainly solve the technical problem of being unable to automatically adjust the camera angle to adapt to new scenes, resulting in poor dynamic adaptability.

[0004] A camera angle adjustment method, comprising: Utilize multiple rotatable cameras deployed in the target area to collect wide-angle images at multiple different angles; performing feature point matching and splicing analysis on the two wide-angle images at multiple different angles to obtain a spliced ​​image; Determining whether the stitched image has an uncovered area; When it is determined that the spliced ​​image has an uncovered area, the rotation angle and direction of the camera being adjusted are determined based on the uncovered area, so as to control the camera to be adjusted according to the rotation angle and direction.

[0005] Furthermore, the determining of the rotation angle and direction of the camera to be adjusted based on the uncovered area to control the camera to be adjusted according to the rotation angle and direction includes: Calculating the location and area of ​​the uncovered area; If the uncovered area is located on the left side of the stitched image and the area is smaller than a preset area, the camera responsible for left-side coverage is adjusted to rotate leftward by a first preset angle.

[0006] If the uncovered area is located on the right side of the stitched image and the area is smaller than a preset area, adjusting the camera responsible for right-side coverage to rotate rightward by a first preset angle; If the area of ​​the uncovered region is greater than or equal to the preset area, when adjusting the angle, the rotation angle is adjusted to a second preset angle, and the second preset angle is greater than the first preset angle.

[0007] Furthermore, after controlling the camera to adjust according to the rotation angle and direction, the method further includes: After adjustment, the two wide-angle images are recaptured and the stitching effect of the adjusted stitched image is verified. If there is still an uncovered area, the rotation angle of the adjusted camera is iteratively adjusted, and the rotation angle of each iterative adjustment is greater than the rotation angle of the previous iterative adjustment.

[0008] Furthermore, performing feature point matching and stitching analysis on the two wide-angle images at multiple different angles to obtain a stitched image includes: performing dedistortion correction on the collected wide-angle image, converting the distortion-corrected wide-angle image into a grayscale image, and performing histogram equalization processing on the grayscale image; Extract the feature points of each grayscale image after histogram equalization processing; Based on the feature points of each of the grayscale images, matching and screening the feature points between the grayscale images to obtain screened matching point pairs; Based on the screened matching point pairs, the two wide-angle images are stitched together to obtain a stitched image.

[0009] Furthermore, the stitching of the two wide-angle images based on the screened matching point pairs to obtain a stitched image includes: Using the selected matching point pairs, the corresponding target homography matrix is ​​calculated through the random sampling consistency algorithm; The two wide-angle images are stitched together according to the calculated target homography matrix to obtain a stitched image.

[0010] Furthermore, after stitching the two wide-angle images according to the calculated target homography matrix to obtain a stitched image, the method further includes: Verify the stitching effect of the stitched image. If the stitching effect does not meet the preset conditions, adjust the rotation angle of the camera until the stitching effect of the stitched image meets the preset conditions, wherein the preset conditions include no obvious overlap or misalignment after stitching.

[0011] A camera angle adjustment device, comprising: an acquisition module, configured to utilize multiple rotatable cameras deployed in a target area to respectively acquire multiple wide-angle images at different angles; a stitching module, configured to perform feature point matching and stitching analysis on the two wide-angle images at multiple different angles to obtain a stitched image; A judging module, configured to judge whether the stitched image has an uncovered area; The adjustment module is used to determine the rotation angle and direction of the camera to be adjusted based on the uncovered area when it is determined that the stitched image has an uncovered area, so as to control the camera to be adjusted according to the rotation angle and direction.

[0012] A computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned camera angle adjustment methods when executing the computer program.

[0013] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements any of the above-mentioned camera angle adjustment methods.

[0014] One of the solutions provided in the embodiments of the present application provides a camera angle adjustment method, which can perform stitching analysis on multi-angle images taken by the camera to obtain a stitched image. The situation of the stitched image reflects the relative position relationship of the cameras. The relative positions of the arranged cameras are automatically analyzed based on the stitched image and the angles of the cameras are dynamically adjusted. This supports real-time angle adjustment under environmental changes, realizes monitoring without blind spots, and improves the dynamic adaptability of intelligent monitoring. Moreover, this embodiment automatically determines the position of the camera to be adjusted through image stitching technology, and does not require manual intervention to adjust the camera. No manual debugging is required, which is simpler. Through multi-angle image analysis, blind spots in monitoring are minimized to achieve high coverage. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0016] Figure 1 This is a flowchart of a camera angle adjustment method according to an embodiment of the present application; Figure 2 This is a schematic diagram of camera arrangement in a target area in a camera angle adjustment method in one embodiment of the present application; Figure 3 yes Figure 1 A flow chart of step S102; Figure 4 yes Figure 1 A flow chart of step S104; Figure 5 This is a structural diagram of a camera angle adjustment device in one embodiment of the present application; Figure 6 It is a structural diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the technical problems, technical solutions and beneficial effects solved by this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0018] To address the technical problem of poor dynamic adaptability in traditional intelligent surveillance solutions, which cannot automatically adjust camera angles to adapt to new scenes, the present invention provides a camera angle adjustment solution that automatically adjusts camera angles to adapt to new scenes, achieving comprehensive surveillance and improving adaptability. This solution is described below using different embodiments.

[0019] like Figure 1 In one embodiment, a camera angle adjustment method is provided, comprising the following steps: S101, using multiple rotatable cameras deployed in the target area to respectively capture multiple wide-angle images at different angles; S102, performing feature point matching and stitching analysis on the two wide-angle images at multiple different angles to obtain a stitched image; S103, determining whether the spliced ​​image has an uncovered area; S104 : When it is determined that the stitched image has an uncovered area, determine the rotation angle and direction of the camera to be adjusted based on the uncovered area, so as to control the camera to be adjusted according to the rotation angle and direction.

[0020] In this embodiment, it is necessary to first deploy a camera group, and arrange one or more groups of rotatable cameras (referred to as rotatable cameras in this application) in the target area to achieve multi-angle shooting. The number of cameras arranged in each group is at least two, which is determined according to the target area. For example, the target area can be a school playground, such as Figure 2 As shown, Figure 2 It is a school playground. Multiple cameras are deployed on the school playground and divided into associated groups. For example, camera 1, camera 2, camera 3 and camera 4 form a group.

[0021] Each camera shoots according to a preset rule to generate multiple wide-angle images. For example, according to the layout position, the generation method is: Top view: The camera points vertically upward and scans from left to right to generate an image.

[0022] Middle view: The camera looks horizontally and scans from left to right to generate an image.

[0023] Bottom view: The camera is tilted downward at a certain angle and scans from left to right to generate an image.

[0024] In this embodiment, multiple rotatable cameras deployed in the target area capture wide-angle images from multiple different angles. Feature point matching and stitching analysis are performed on two wide-angle images from the multiple different angles to produce a stitched image. The two wide-angle images here refer to wide-angle images captured by any two cameras. A determination is made as to whether the stitched image contains uncovered areas. If so, the rotation angle and direction of the camera being adjusted are determined based on the uncovered areas. The camera is then controlled to adjust according to the rotation angle and direction. In practical applications, precise rotation can be achieved by sending control signals to control the camera's pan / tilt motor.

[0025] It can be seen that in this embodiment, a camera angle adjustment method is provided, which can perform stitching analysis on multi-angle images taken by the camera to obtain a stitched image. The situation of the stitched image reflects the relative position relationship of the cameras. The relative positions of the arranged cameras are automatically analyzed based on the stitched image and the angles of the cameras are dynamically adjusted. Real-time angle adjustment under environmental changes is supported, blind-angle monitoring is achieved, and the dynamic adaptability of intelligent monitoring is improved. Moreover, this embodiment automatically determines the position of the camera to be adjusted through image stitching technology. There is no need for manual intervention to adjust the camera, and no manual debugging is required, which is simpler. Through multi-angle image analysis, blind spots in monitoring are minimized to achieve high coverage.

[0026] In one embodiment, if Figure 3 As shown, in step S102, that is, performing feature point matching and stitching analysis on the two wide-angle images at multiple different angles to obtain a stitched image, the following steps are included: S1021, performing dedistortion correction on the acquired wide-angle image, converting the distortion-corrected wide-angle image into a grayscale image, and performing histogram equalization processing on the grayscale image; S1022, extracting feature points of each grayscale image after histogram equalization processing; S1023. Based on the feature points of each of the grayscale images, matching and screening the feature points between the grayscale images to obtain screened matching point pairs; S1024 : Based on the screened matching point pairs, stitch the two wide-angle images to obtain a stitched image.

[0027] In this embodiment, a specific method for performing feature point matching and stitching analysis on two wide-angle images at multiple different angles to obtain a stitched image is proposed. First, each captured wide-angle image is subjected to dedistortion correction. In one embodiment, the camera's intrinsic parameters (focal length, distortion coefficient) can be used to dedistort the captured wide-angle image to eliminate the impact of lens distortion on stitching. For example, for camera 1, the camera's intrinsic parameters (focal length, distortion coefficient) are used to dedistort the captured wide-angle image to eliminate the impact of camera 1's lens distortion on subsequent stitching, thereby improving the accuracy of the stitching result. The wide-angle image after distortion correction is converted into a grayscale image, and the grayscale image is subjected to histogram equalization. It should be understood that the wide-angle image after distortion correction is a color image. In this processing, the computational complexity can be reduced by converting the color image into a grayscale image, and the image can be histogram equalized. For example, the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm can be used for equalization. After histogram equalization, the contrast can be enhanced to improve the feature point detection effect, which is also beneficial to improving the accuracy and effectiveness of the stitching results, and helps to improve the accuracy of subsequent camera angle adjustment.

[0028] After histogram equalization, extract the feature points of each histogram-equalized grayscale image. For example, the scale-invariant feature transform (SIFT) or the oriented fast and rotated brift (ORB) algorithm is used to extract the key feature points (KeyPoints) of each image. For example, as an illustrative example, the following Python code can be used for processing, without limitation: Sample code 1: import cv2 sift = cv2.SIFT_create() keypoints, descriptors = sift.detectAndCompute(gray_image, None) The above example code 1 shows a standard code example for extracting key feature points using the SIFT algorithm. In this code, import cv2 imports the OpenCV library for image processing. sift = cv2.SIFT_create() creates a SIFT object, representing a detector and descriptor extractor for the "scale-invariant feature transform." keypoints,descriptors = sift.detectAndCompute(gray_image, None) indicates that on the input grayscale image gray_image: keypoints are detected: each keypoint is an object with attributes such as position (x, y), scale (scale), and orientation (angle). Descriptors are calculated: the feature vector (128-dimensional floating-point array) of each keypoint is used for subsequent feature point matching. The parameter None indicates that a mask is not used (i.e., the detection area is not restricted).

[0029] After obtaining the feature points of each grayscale image, the feature points between the grayscale images are matched and filtered based on the feature points of each grayscale image to obtain filtered matching point pairs. For example, feature point matching can be performed using a Fast Library for Approximate Nearest Neighbors FLANN or a Brute-Force Matcher (BFMatcher) to find similar areas between the two images and obtain similar matching point pairs. For example, as an explanatory illustration, the following Python code can be used for processing, without specific limitation: Example code 2: FLANN_INDEX_KDTREE = 1 index_params = dict(algorithm=FLANN_INDEX_KDTREE, trees=5) search_params = dict(checks=50) flann = cv2.FlannBasedMatcher(index_params, search_params) matches = flann.knnMatch(descriptors1, descriptors2, k=2) In Example Code 2 above, FLANN is used for feature point matching. FLANN_INDEX_KDTREE = 1 specifies that the FLANN matcher use the KD-Tree algorithm as the index structure (suitable for floating-point feature descriptors such as SIFT and SURF). Next, the index_params dictionary defines the index parameters. algorithm = 1 specifies the use of KD-Tree, and trees = 5 constructs five KD-Trees to improve search accuracy. The search_params dictionary sets search parameters. checks = 50 specifies that a maximum of 50 candidate nodes will be checked per query (a larger value results in a more accurate match, but slower computation). Then, a FLANN matcher object, flann, is created using cv2.FlannBasedMatcher(index_params, search_params). Finally, matches = flann.knnMatch(descriptors1, descriptors2, k=2) performs K-nearest neighbor matching to compare descriptors1 (the feature point descriptors of the first image) with descriptors2 (the feature point descriptors of the second image).

[0030] After feature point matching, feature point screening is performed to obtain filtered matching point pairs. The purpose is to screen out valid matching point pairs. For example, in one embodiment, a ratio test can be used to filter out false matches and retain high-quality matching point pairs (such as Lowe's ratio < 0.7). For example, as an illustrative example, the following Python code can be used for processing, which is not limited to the specifics: Sample code 3: good_matches = [m for m, n in matches if m.distance<0.7 * n.distance] This line of code, example 3, filters the feature point matching results using a ratio test to remove false matches. Specifically, for each pair of nearest neighbor matches [m, n] in matches , the distances (i.e., the similarity of the feature point descriptors) are compared, retaining those where the distance from the first match m is less than 0.7 times the distance from the second match n. In other words, only when the best match is significantly better than the next best match (at least 30% better) is it considered a reliable match and added to the good_matches list, resulting in the filtered matching point pairs for subsequent stitching.

[0031] As can be seen, this embodiment provides a method for stitching images. Based on the selected characteristic matching point pairs, the two wide-angle images are stitched together to obtain a stitched image, which can effectively improve the accuracy of the stitched image and the efficiency of the stitching process. It should be noted that in other embodiments, the above-mentioned image preprocessing can also be omitted, and this is not specifically limited.

[0032] In one embodiment, in step S1024, that is, based on the screened matching point pairs, the two wide-angle images are stitched together to obtain a stitched image, including: using the screened matching point pairs to calculate the corresponding target homography matrix through a random sampling consistency algorithm; and stitching the two wide-angle images according to the calculated target homography matrix to obtain a stitched image.

[0033] In this embodiment, the selected matching point pairs are used to calculate the corresponding homography matrix (homography matrix) through the Random Sample Consensus (RANSAC) algorithm for image stitching. For example, as an explanatory illustration, the following Python code can be used for processing, without specific limitation: Sample code 3: src_pts=np.float32([keypoints1[m.queryIdx].ptformin good_matches]).reshape(-1, 1, 2) dst_pts=np.float32([keypoints2[m.trainIdx].ptformin good_matches]).reshape(-1, 1, 2) H, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0) In this sample code 3, the image stitching process based on the filtered feature point matching is implemented, which includes three key processes: first, the coordinate points of the source image (keypoints1[m.queryIdx].pt) and the target image (keypoints2[m.trainIdx].pt) are extracted from the filtered matching point pairs (good_matches) through list derivation. The source image and the target image refer to the two images to be stitched, and are converted to 32-bit floating point numbers using np.float32. Then, the coordinate points are converted to 32-bit floating point numbers using reshape( -1,1,2) transforms the array into the N×1×2 format required by OpenCV; then calls the cv2.findHomography() function to calculate the optimal homography matrix H using the RANSAC robust algorithm (cv2.RANSAC), where 5.0 is the threshold parameter (unit: pixel) of the RANSAC algorithm, which is used to determine outliers with a reprojection error greater than 5 pixels; finally, the function returns a 3×3 homography transformation matrix H (used to project the source image coordinates to the target image coordinate system to complete the stitching process) and a mask mask (marking inliers / outliers).

[0034] In this embodiment, the above-mentioned stitching of images using the homography matrix H can achieve accurate geometric alignment and calculation, thereby improving the stitching processing efficiency and quality of the stitched images. In addition to the above-mentioned method of using the homography matrix H, other stitching methods can also be used, which are not specifically limited.

[0035] In one embodiment, after stitching the two wide-angle images according to the calculated target homography matrix to obtain a stitched image, the method further includes: Verify the stitching effect of the stitched image. If the stitching effect does not meet the preset conditions, adjust the rotation angle of the camera until the stitching effect of the stitched image meets the preset conditions, wherein the preset conditions include no obvious overlap or misalignment after stitching.

[0036] In this embodiment, image stitching verification is also performed. Specifically, the two images are projected (Warp Perspective) using a homography matrix to verify the stitching effect. For example, as an explanatory illustration, the following Python code can be used for processing, which is not limited to the specifics: Sample code 4: result = cv2.warpPerspective(image1, H, (width, height)) In this example code 4, the source image image1 is projected onto the target image coordinate system based on the homography matrix H to generate the transformed image result. image1 represents the source image to be transformed (the image to be stitched). H represents the 3×3 homography matrix, calculated using cv2.findHomography(). (width, height) represents the size of the output stitched image (usually set to the size of the target image image2). The effect of the stitched image is verified based on the projection result. Based on the stitching result, the spatial position relationship of the cameras can be determined. For example, if the bottom view of camera A seamlessly stitches with the middle view of camera B, then camera A is located to the upper left of camera B. If there is significant overlap or misalignment after stitching, the angle of camera B is adjusted to eliminate the gap until the stitching effect of the resulting stitched image meets the preset conditions, which include no significant overlap or misalignment after stitching.

[0037] In this embodiment, the stitching effect of the stitched image is verified. If the stitching effect does not meet the preset conditions, the rotation angle of the camera is adjusted until the stitching effect of the obtained stitched image meets the preset conditions. The preset conditions include no obvious overlap or misalignment after stitching, thereby improving the effectiveness and rationality of subsequent camera adjustments.

[0038] In one embodiment, if Figure 4 As shown, step 104, that is, determining the rotation angle and direction of the camera to be adjusted based on the uncovered area to control the camera to be adjusted according to the rotation angle and direction, includes the following steps: S1041. Calculate the position and area of ​​the uncovered area; S1042: If the uncovered area is located on the left side of the stitched image and the area is smaller than a preset area, adjust the camera responsible for left-side coverage to rotate leftward by a first preset angle.

[0039] S1043: If the uncovered area is located on the right side of the stitched image and the area is smaller than a preset area, adjust the camera responsible for right-side coverage to rotate rightward by a first preset angle; S1044: If the area of ​​the uncovered region is greater than or equal to the preset area, when adjusting the angle, the rotation angle is adjusted to a second preset angle, where the second preset angle is greater than the first preset angle.

[0040] In this embodiment, after the stitched image is obtained, an uncovered area analysis of the stitched image (i.e., stitching gap analysis) is performed. In one embodiment, the edge continuity of the stitched image can be used to determine whether there is an uncovered area (such as a surveillance blind spot at the edge of a school playground). The edge detection algorithm (Canny) is used to extract the boundary of the stitched image, and the area of ​​the uncovered area (gap area) is calculated. In short, if the gap is on the left side of the stitched image, the adjacent camera is rotated to the left (such as 15°). If the gap is on the right side, it is rotated to the right (such as 15°). If the gap area is large, the rotation angle is increased (such as from 15° to 30°). Among them, the above-mentioned preset area is an empirical value or a calibration value, and is not specifically limited.

[0041] For another example, as an explanatory description, the following Python code can be used for processing, without specific limitation: edges = cv2.Canny(result, 100, 200) contours,_=cv2.findContours(edges,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE) gap_area = sum(cv2.contourArea(contour) for contour in contours) In Example Code 4, edge detection is used to identify uncovered areas (surveillance blind spots) in the stitched image. This implementation involves three steps: First, the Canny edge detection algorithm (cv2.Canny(result, 100, 200)) is used to extract the edges of the stitched image. 100 and 200 represent the low and high thresholds, respectively, controlling the sensitivity of edge detection. Next, the cv2.findContours() function is used. The cv2.RETR_EXTERNAL parameter specifies detecting only the outer contours of the stitched image, while the cv2.CHAIN_APPROX_SIMPLE parameter enables contour point compression to retrieve all edge contours. Finally, cv2.contourArea(contour) calculates the sum of the areas enclosed by all contours. This area (gap_area) represents the size of the uncovered area. When gap_area exceeds a predetermined threshold, a significant stitching blind spot is identified. This method automatically quantifies the extent of the blind spot, making it particularly suitable for scenarios requiring complete coverage, such as school playground surveillance.

[0042] In other embodiments, the adjustment may be performed only based on the position, which is not specifically limited.

[0043] In one embodiment, after controlling the camera to adjust according to the rotation angle and direction, the method further includes: re-capturing the two wide-angle images after the adjustment and verifying the stitching effect of the adjusted stitched image; if there is still an uncovered area, iteratively adjusting the rotation angle of the adjusted camera.

[0044] In this embodiment, a feedback calibration process is also provided, that is, after the angle is adjusted, the image is recaptured and the effect of the stitched image is verified. If there is still an uncovered area, the angle is iteratively adjusted, such as increasing by 5° each time. That is, if there is still an uncovered area after the last adjustment of 5°, the angle is increased by 5 each time.

[0045] In summary, the present invention provides a camera angle adjustment method with the following advantages: No manual intervention required: The camera position is automatically determined through image stitching technology, eliminating the need for manual debugging.

[0046] Strong dynamic adaptability: supports real-time angle adjustment under environmental changes.

[0047] High coverage: Minimize blind spots through multi-angle image analysis.

[0048] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0049] In one embodiment, a camera angle adjustment system is further provided, comprising a camera angle adjustment device and a plurality of cameras, wherein the camera angle adjustment device is configured to implement any of the aforementioned methods to dynamically and adaptively adjust the camera angle. Exemplarily, the camera angle adjustment device may be implemented by a server.

[0050] In one embodiment, a camera angle adjustment system is provided, wherein the camera angle adjustment device is used to: Utilize multiple rotatable cameras deployed in the target area to collect wide-angle images at multiple different angles; performing feature point matching and splicing analysis on the two wide-angle images at multiple different angles to obtain a spliced ​​image; Determining whether the stitched image has an uncovered area; When it is determined that the stitched image has an uncovered area, determining the rotation angle and direction of the adjusted camera based on the uncovered area; The camera is controlled to adjust according to the rotation angle and direction.

[0051] It can be seen that in this embodiment, a camera angle adjustment system is provided, which can perform stitching analysis on multi-angle images taken by the camera to obtain a stitched image. The situation of the stitched image reflects the relative position relationship of the cameras. The relative positions of the arranged cameras are automatically analyzed based on the stitched image and the angles of the cameras are dynamically adjusted. Real-time angle adjustment under environmental changes is supported, and blind-angle monitoring is achieved, thereby improving the dynamic adaptability of intelligent monitoring. Moreover, the position of the camera to be adjusted is automatically determined through image stitching technology, and there is no need for manual intervention to adjust the camera, and no manual debugging is required, which is simpler. Through multi-angle image analysis, blind spots in monitoring are minimized to achieve high coverage.

[0052] By deploying multiple cameras, generating multi-angle photos, analyzing image stitching relationships, and automatically adjusting camera angles, this system overcomes the complex manual debugging and numerous blind spots in traditional surveillance systems. This system and method are particularly suitable for scenarios requiring wide-area coverage, such as schools and shopping malls, offering advantages such as high coverage and strong dynamic adaptability.

[0053] In one embodiment, a camera angle adjustment device is provided, which corresponds to the camera angle adjustment method in the above embodiment. Figure 5 As shown, the camera angle adjustment device includes an acquisition module 501, a splicing module 502, a judgment module 503 and an adjustment module 504. The functional modules are described in detail as follows: The acquisition module 501 is configured to utilize multiple rotatable cameras deployed in the target area to respectively acquire multiple wide-angle images at different angles; A stitching module 502 is configured to perform feature point matching and stitching analysis on the two wide-angle images at different angles to obtain a stitched image; A determination module 503 is used to determine whether the spliced ​​image has an uncovered area; The adjustment module 504 is configured to, when determining that the stitched image has an uncovered area, determine the rotation angle and direction of the camera to be adjusted based on the uncovered area, so as to control the camera to be adjusted according to the rotation angle and direction.

[0054] In one embodiment, the adjustment module 504 is configured to: Calculating the location and area of ​​the uncovered area; If the uncovered area is located on the left side of the stitched image and the area is smaller than a preset area, the camera responsible for left-side coverage is determined to rotate leftward by a first preset angle.

[0055] If the uncovered area is located on the right side of the stitched image and the area is smaller than a preset area, determining that the camera responsible for right side coverage is rotated rightward by a first preset angle; If the area of ​​the uncovered region is greater than or equal to the preset area, it is determined that when adjusting the angle, the rotation angle is adjusted to a second preset angle, and the second preset angle is greater than the first preset angle.

[0056] In one embodiment, the adjustment module 5014 is also used to control the camera to be adjusted according to the rotation angle and direction, re-capture the two wide-angle images after adjustment and verify the stitching effect of the adjusted stitched image. If there is still an uncovered area, iteratively adjust the rotation angle of the adjusted camera.

[0057] In one embodiment, the splicing module 502 is used to: performing dedistortion correction on the collected wide-angle image, converting the distortion-corrected wide-angle image into a grayscale image, and performing histogram equalization processing on the grayscale image; Extract the feature points of each grayscale image after histogram equalization processing; Based on the feature points of each of the grayscale images, matching and screening the feature points between the grayscale images to obtain screened matching point pairs; Based on the screened matching point pairs, the two wide-angle images are stitched together to obtain a stitched image.

[0058] In one embodiment, the splicing module 502 is further configured to: Using the selected matching point pairs, the corresponding target homography matrix is ​​calculated through the random sampling consistency algorithm; The two wide-angle images are stitched together according to the calculated target homography matrix to obtain a stitched image.

[0059] In one embodiment, the adjustment module 504 is further configured to: Verify the stitching effect of the stitched image. If the stitching effect does not meet the preset conditions, adjust the rotation angle of the camera until the stitching effect of the stitched image meets the preset conditions, wherein the preset conditions include no obvious overlap or misalignment after stitching.

[0060] The embodiment of the present application provides a camera angle adjustment device, which can perform stitching analysis on multi-angle images taken by the camera to obtain a stitched image. The situation of the stitched image reflects the relative position relationship of the cameras. The relative position of the arranged cameras is automatically analyzed based on the stitched image and the angle of the camera is dynamically adjusted. It supports real-time angle adjustment under environmental changes, realizes monitoring without blind spots, and improves the dynamic adaptability of intelligent monitoring. Moreover, this embodiment automatically determines the position of the camera to be adjusted through image stitching technology, and does not require manual intervention to adjust the camera. It does not require manual debugging, which is simpler. Through multi-angle image analysis, it can minimize monitoring blind spots and achieve high coverage. For the specific definition of the camera angle adjustment device, please refer to the definition of the camera angle adjustment device method above, and will not be repeated here. The various modules in the above-mentioned camera angle adjustment device can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0061] In one embodiment, if Figure 6 As shown, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a camera angle adjustment method in the above embodiment is implemented, for example Figure 1 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the camera angle adjustment device are realized, for example, Figure 5 The functions of the modules shown are not described here in detail to avoid repetition.

[0062] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a camera angle adjustment method in the above embodiment is implemented, for example Figure 1 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the camera angle adjustment device are realized, for example, Figure 5 The functions of the modules shown are not described here in detail to avoid repetition.

[0063] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A camera angle adjustment method, characterized in that: include: Utilize multiple rotatable cameras deployed in the target area to collect wide-angle images at multiple different angles; performing feature point matching and splicing analysis on the two wide-angle images at multiple different angles to obtain a spliced ​​image; Determining whether the stitched image has an uncovered area; When it is determined that the spliced ​​image has an uncovered area, the rotation angle and direction of the camera being adjusted are determined based on the uncovered area, so as to control the camera to be adjusted according to the rotation angle and direction.

2. The camera angle adjustment method according to claim 1, wherein: The determining the rotation angle and direction of the camera to be adjusted based on the uncovered area to control the camera to be adjusted according to the rotation angle and direction includes: Calculating the location and area of ​​the uncovered area; If the uncovered area is located on the left side of the stitched image and the area is smaller than a preset area, adjusting the camera responsible for left coverage to rotate leftward by a first preset angle; If the uncovered area is located on the right side of the stitched image and the area is smaller than a preset area, adjusting the camera responsible for right side coverage to rotate rightward by a first preset angle; If the area of ​​the uncovered region is greater than or equal to the preset area, when adjusting the angle, the rotation angle is adjusted to a second preset angle, and the second preset angle is greater than the first preset angle.

3. The camera angle adjustment method according to claim 2, wherein: After controlling the camera to adjust according to the rotation angle and direction, the method further includes: After the adjustment, the two wide-angle images are recaptured and the stitching effect of the adjusted stitched image is verified. If there is still an uncovered area, the rotation angle of the adjusted camera is iteratively adjusted.

4. The camera angle adjustment method according to any one of claims 1 to 3, characterized in that: The performing feature point matching and stitching analysis on the two wide-angle images at multiple different angles to obtain a stitched image includes: performing dedistortion correction on the collected wide-angle image, converting the distortion-corrected wide-angle image into a grayscale image, and performing histogram equalization processing on the grayscale image; Extract the feature points of each grayscale image after histogram equalization processing; Based on the feature points of each of the grayscale images, matching and screening the feature points between the grayscale images to obtain screened matching point pairs; Based on the screened matching point pairs, the two wide-angle images are stitched together to obtain a stitched image.

5. The camera angle adjustment method according to claim 4, wherein: The step of stitching the two wide-angle images based on the screened matching point pairs to obtain a stitched image comprises: Using the selected matching point pairs, the corresponding target homography matrix is ​​calculated through the random sampling consistency algorithm; The two wide-angle images are stitched together according to the calculated target homography matrix to obtain a stitched image.

6. The camera angle adjustment method according to claim 4, characterized in that: After stitching the two wide-angle images according to the calculated target homography matrix to obtain a stitched image, the method further includes: Verify the stitching effect of the stitched image. If the stitching effect does not meet the preset conditions, adjust the rotation angle of the camera until the stitching effect of the stitched image meets the preset conditions, wherein the preset conditions include no overlap or misalignment after stitching.

7. A camera angle adjustment device, characterized in that: include: an acquisition module, configured to utilize multiple rotatable cameras deployed in a target area to respectively acquire multiple wide-angle images at different angles; a stitching module, configured to perform feature point matching and stitching analysis on the two wide-angle images at multiple different angles to obtain a stitched image; A judging module, configured to judge whether the stitched image has an uncovered area; The adjustment module is used to determine the rotation angle and direction of the camera to be adjusted based on the uncovered area when it is determined that the stitched image has an uncovered area, so as to control the camera to be adjusted according to the rotation angle and direction.

8. A camera angle adjustment system, characterized in that: It comprises a camera angle adjustment device and multiple cameras, wherein the camera angle adjustment device is used to implement the method according to any one of claims 1 to 6 to dynamically and adaptively adjust the camera angle.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the camera angle adjustment method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the camera angle adjustment method according to any one of claims 1 to 6 is implemented.