Panoramic splicing method based on two-dimensional rotating platform
By using position information and camera frame rate calculation on a two-dimensional rotating platform for image splicing, the problem of splicing inaccuracy and loss is solved, and efficient image splicing effects are achieved, which is suitable for video splicing applications.
Patent Information
- Application Number
- CN202410770536.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-01
AI Technical Summary
On a two-dimensional rotating platform, during the panoramic image stitching process, since feature point matching depends on the size of the overlapping area and rotation speed, it can easily lead to inaccurate stitching and missing stitching.
By using the position information of the two-dimensional rotating platform for splicing, fixing the vertical direction and performing 360° splicing in the horizontal direction, the actual angle difference is calculated based on the camera frame rate and rotation speed, and the position information is read in real time for image splicing, and is used in the splicing process. Feature point extraction and matching methods to eliminate splicing traces.
It achieves the accuracy and completeness of image splicing on a two-dimensional rotating platform, avoids splicing loss, and is suitable for video splicing applications. The method is simple and easy to implement and suitable for engineering practice.
Smart Images

Figure CN118741318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to panoramic image stitching, and in particular to a panoramic stitching method based on a two-dimensional rotating platform. Background Art
[0002] Image panorama stitching technology mostly uses feature matching and other methods to detect feature points in the overlapping area of two images, and then match them to stitch them together. This method depends on the size of the overlapping area, the number of feature points, etc. On some two-dimensional rotating platforms, 360° panoramic stitching is achieved by rotating one circle. If feature point matching is used, a large number of image frames are required (generally, the overlapping area of the two images is large to ensure the number of extracted feature points), and the rotation speed of the two-dimensional rotating platform affects the extraction and matching of image feature points, which may cause inaccurate stitching and stitching loss during image stitching. Summary of the invention
[0003] In view of the defects of panoramic stitching images on existing two-dimensional rotating platforms, the technical problem to be solved by the present invention is to provide a panoramic stitching method based on a two-dimensional rotating platform, which performs stitching according to position information and does not cause stitching loss during the stitching process.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a panoramic stitching method based on a two-dimensional rotating platform, based on the position information of the two-dimensional rotating platform, stitching is performed according to the position information, the product is fixedly installed, the vertical direction remains stationary during the stitching process, and a 360° stitching operation is performed in the horizontal direction. The specific operation steps are: S1. The camera frame rate used for panoramic stitching is HZ, and the horizontal field of view of the image is F. The number of images required for stitching 360° is greater than 360 / F, so the time required for the two-dimensional rotating platform to rotate one circle must be greater than 360 / (F×HZ); S2. After satisfying the S1 condition and setting the rotation speed v of the appropriate two-dimensional rotation platform, select the appropriate splicing display mode according to the needs and actual effects; S3. From the rotation speed v of S2 and the frame rate HZ of the stitching camera, it can be known that when rotating two adjacent frames of images at this speed, the angle of rotation of the two-dimensional rotating platform is v / HZ. Taking a certain frame as a reference, the angle between the subsequent n consecutive frames of images is n×v / HZ. If the reference frame is stitched with this nth frame, then n×v / HZ must be less than the horizontal field of view angle S of the image; therefore, after determining the first stitching frame, select the appropriate nth frame as the second stitching frame according to the actual situation; S4. After the two-dimensional rotating platform sets the splicing speed, it starts splicing after time t (speed is stable), takes the first splicing frame as the starting point, reads the real-time position information W1 of the current platform as the relative zero position, selects a suitable frame as the second splicing frame in step S3, reads the real-time position information W2 of the current platform, and then the actual angle difference S'1 between the two splicing frames at this time, if W2 is greater than W1, S'1=(W2-W1)×360° / N, if W2 is less than W1, S'1=(W2+N-W1)×360° / N; S5. From step S4, we can get the overlap angle S'2 = S - S'1 between the two stitched frames. From the horizontal pixel size u of the camera and the focal length f of the lens, we can get the horizontal angle of a single pixel to be S 像元 =arctan(u / f), from which the number of overlapping horizontal pixels is P 重叠 =S'2 / S 像元 ; S6. The actual camera horizontal effective pixel value H1 and the horizontal effective pixel H2 after scaling are stitched together. The horizontal overlapping pixels of the scaled image calculated by step S5 are P' 重叠 =P 重叠 ×(H2 / H1), so far, the two frames of images can be spliced; S7. After the stitching of step S6 is completed, the second frame of the current stitching is used as the first frame of the next stitching, and the subsequent stitching repeats steps S3, S4, S5, and S6 until the stitching stops.
[0005] The splicing display method in step 2 is to divide the two-dimensional rotating platform into four parts in the vertical direction, and to splice each part in the horizontal direction at an angle of equal to or greater than 90 degrees, so that the last splicing area 4 will have a margin in the horizontal direction.
[0006] When performing stitching in step S6, corresponding algorithms are used to eliminate stitching marks in the stitching area. In addition, feature point extraction and matching stitching are used in step S6. If the feature point matching fails, stitching is performed according to step S6.
[0007] The present invention adopts a panoramic stitching method based on a two-dimensional rotating platform designed by the above technical solution, and performs hard stitching through the position information of the two-dimensional rotating platform and the calculation of relevant indicators. The method does not have the stitching loss phenomenon caused by software processing and other reasons, and according to the real-time position information of the stitched image, the stitching effect is good, which is very suitable for video stitching based on the rotating platform. The method of the present invention is simple, easy to implement, and convenient for engineering application. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is an image stitching flow chart of the method of the present invention; Figure 2It is a display diagram of a panoramic stitching method; Figure 3 It is a simplified diagram of system connection of an embodiment of the present invention. DETAILED DESCRIPTION
[0009] A panoramic stitching method based on a two-dimensional rotating platform of the present invention is specifically described below in conjunction with the accompanying drawings.
[0010] The present invention discloses a panoramic stitching method based on a two-dimensional rotating platform. The method performs stitching based on the position information of the two-dimensional rotating platform, and does not cause stitching loss during the stitching process. Generally, the product is fixedly installed, and the vertical direction remains stationary during the stitching process, and a 360° stitching operation is performed in the horizontal direction. The operation process is as follows: Figure 1 As shown, the specific steps are: S1. The camera frame rate used for panoramic stitching is HZ, and the horizontal field of view of the image is F. The number of images required for stitching 360° is greater than 360 / F, so the time required for the two-dimensional rotating platform to rotate one circle must be greater than 360 / (F×HZ); S2. After satisfying the S1 condition and setting the appropriate 2D rotation platform rotation speed v, select the appropriate splicing display mode according to the needs and actual effect, for example Figure 2 In the vertical direction, it is divided into 4 parts, and the horizontal direction is spliced 90° for display. Of course, the horizontal direction can also be greater than 90°, so that the last splicing area 4 will have a margin in the horizontal direction; S3. From the rotation speed v of S2 and the frame rate HZ of the stitching camera, it can be known that when rotating two adjacent frames of images at this speed, the angle of rotation of the two-dimensional rotating platform is v / HZ. Taking a certain frame as a reference, the angle between the subsequent n consecutive frames of images is n×v / HZ. If the reference frame is spliced with this nth frame, then n×v / HZ must be less than the image horizontal field of view S. Therefore, after determining the first splicing frame, select the appropriate nth frame as the second splicing frame according to the actual situation (generally, if the performance is met, a larger span frame is selected to reduce the amount of data calculation); S4. After the two-dimensional rotating platform sets the splicing speed, it starts splicing after time t (the speed is stable), takes the first splicing frame as the starting point, reads the real-time position information W1 of the current platform as the relative zero position, selects a suitable frame as the second splicing frame in step S3, and reads the real-time position information W2 of the current platform (the position information here is calculated using the photoelectric encoder as an example, the encoder accuracy J is 360° / N, N is the acquisition encoder value of the turntable moving one circle), then the actual angle difference S'1 between the two splicing frames at this time, if W2 is greater than W1, S'1=(W2-W1)×360° / N, if W2 is less than W1, S'1=(W2+N-W1)×360° / N, uses the real-time position information for splicing, and the splicing accuracy is high; S5. From step S4, we can get the overlap angle S'2 = S - S'1 between the two stitched frames. From the horizontal pixel size u of the camera and the focal length f of the lens, we can get the horizontal angle of a single pixel as S 像元 =arctan(u / f), from which the number of overlapping horizontal pixels is P 重叠 =S'2 / S 像元 ; S6. Based on the actual camera horizontal effective pixel value H1 and the horizontal effective pixel H2 after splicing and scaling, the horizontal overlapping pixels of the spliced and scaled image can be calculated from step S5 as P' 重叠 =P 重叠 ×(H2 / H1), so far, the two frames of images can be spliced; S7. After the stitching of step S6 is completed, the second frame of the current stitching is used as the first frame of the next stitching, and the subsequent stitching repeats steps S3, S4, S5, and S6 until the stitching stops.
[0011] When stitching in step S6, the stitching marks in the stitching area can be eliminated by the corresponding algorithm. In addition, in step S6, stitching methods such as feature point extraction and matching can be used. If the feature point matching fails, stitching can be performed according to step S6 to improve the stitching effect and eliminate the situation where the stitching fails when the feature point matching is lost. For some high-speed rotating platforms, there will be corresponding compensation measures on the camera side (such as galvanometer, etc.).
[0012] like Figure 3 As shown, the platform position signal generally provides the current position information to the two-dimensional rotating platform. Generally, a photoelectric encoder is used. The acquisition module can obtain the current position of the rotating platform through the encoder accuracy and the currently acquired count value; the panoramic stitching module is used to perform horizontal panoramic stitching during the rotation process; the control platform controls the rotation, scanning, stop and other functions of the two-dimensional rotating platform, and sends corresponding instructions to the two-dimensional rotating platform. Generally, the rotating platform will have a corresponding control module. The control platform forwards the instructions through the rotating platform, and indirectly controls the related functions of the panoramic stitching module.
[0013] The system is set up in a fixed position. The control platform controls the two-dimensional rotating platform to perform corresponding functions through the upper computer software. The vertical direction is fixed in the stitching mode, and panoramic stitching is only performed in the horizontal direction. The stitching camera is 1280×1024×60HZ, and the stitching speed is 6s per circle, which meets the stitching conditions of this method. The horizontal field of view of the stitching camera is 6.6°. This system is based on Figure 2The 6s panoramic stitching module can collect 6×60HZ=360 frames of images. Each stitching area (90°) can use 90 frames of images. There is sufficient image margin for stitching a 90° field of view. The first frame of each stitching area is directly displayed in the output video format according to the scaling ratio. The output video is 1080P@30HZ. The remaining unstitched parts are displayed as the default black for the first time. After the panoramic stitching is completed, the last processed image will be overwritten when the processing is completed. After the two images are stitched, the first frame is updated only from the overlapping area and the second frame after stitching is displayed on the image. After the system starts stitching, after the rotating platform rotates for 100ms, the system takes the absolute zero position of the platform position signal as the starting point for the first time. When the first frame image for stitching is selected, the system will calculate the appropriate second frame image required for stitching in real time according to step S3. After the stitching is completed, the second frame image of the last stitching is the first frame image required for the current stitching. The system performs subsequent stitching processing according to steps S3, S4, S5, and S6. The stitching marks in the stitching area can be repaired by software. The system has good use effect and is easy to implement, and has practical engineering value.
Claims
1. A panoramic stitching method based on a two-dimensional rotating platform, characterized in that Based on the position information of the two-dimensional rotating platform, the splicing is performed according to the position information. The product is fixed and installed. During the splicing process, the vertical direction remains stationary and the horizontal direction performs a 360° splicing operation. The specific operation steps are as follows: S1. The camera frame rate used for panoramic stitching is HZ, and the horizontal field of view of the image is F. The number of images required for stitching 360° is greater than 360 / F, so the time required for the two-dimensional rotating platform to rotate one circle must be greater than 360 / (F×HZ); S2. After satisfying the S1 condition and setting the rotation speed v of the appropriate two-dimensional rotation platform, select the appropriate splicing display mode according to the needs and actual effects; S3. From the rotation speed v of S2 and the frame rate HZ of the stitching camera, it can be known that when rotating two adjacent frames of images at this speed, the angle of rotation of the two-dimensional rotating platform is v / HZ. Taking a certain frame as a reference, the angle between the subsequent n consecutive frames of images is n×v / HZ. If the reference frame is stitched with this nth frame, then n×v / HZ must be less than the horizontal field of view angle S of the image; therefore, after determining the first stitching frame, select the appropriate nth frame as the second stitching frame according to the actual situation; S4. After the two-dimensional rotating platform sets the splicing speed, it starts splicing after time t (speed is stable), takes the first splicing frame as the starting point, reads the real-time position information W1 of the current platform as the relative zero position, selects a suitable frame as the second splicing frame in step S3, reads the real-time position information W2 of the current platform, and then the actual angle difference S'1 between the two splicing frames at this time, if W2 is greater than W1, S'1=(W2-W1)×360° / N, if W2 is less than W1, S'1=(W2+N-W1)×360° / N; S5. From step S4, we can get the overlap angle S'2 = S - S'1 between the two stitched frames. From the horizontal pixel size u of the camera and the focal length f of the lens, we can get the horizontal angle of a single pixel to be S 像元 =arctan(u / f), from which the number of overlapping horizontal pixels is P 重叠 =S'2 / S 像元 ; S6. The actual camera horizontal effective pixel value H1 and the horizontal effective pixel H2 after scaling are stitched together. The horizontal overlapping pixels of the scaled image calculated by step S5 are P' 重叠 =P 重叠 ×(H2 / H1), so far, the two frames of images can be spliced; S7. After the stitching of step S6 is completed, the second frame of the current stitching is used as the first frame of the next stitching, and the subsequent stitching repeats steps S3, S4, S5, and S6 until the stitching stops.
2. A panoramic stitching method based on a two-dimensional rotating platform according to claim 1, characterized in that The splicing display method in step 2 is to divide the two-dimensional rotating platform into four parts in the vertical direction, and to splice each part in the horizontal direction at an angle of equal to or greater than 90 degrees, so that the last splicing area 4 will have a margin in the horizontal direction.
3. A panoramic stitching method based on a two-dimensional rotating platform according to claim 1, characterized in that when stitching is performed in step S6, a corresponding algorithm is used to eliminate the stitching marks appearing in the stitching area. In addition, in step S6, a feature point extraction and matching stitching method is adopted. If the feature point matching fails, stitching is performed according to step S6.
