Video fusion method and fusion system

By using a comprehensive mapping matrix and inter-frame change detection in the video fusion method, the problems of instability and information loss in splicing multi-camera video streams are solved, achieving high-quality video fusion effects that adapt to dynamic scene changes.

CN119012024AInactive Publication Date: 2024-11-22SICHUAN GUANGXIN TIANXIA MEDIA CO LTD

Patent Information

Application Number
CN202411073252.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN119012024A_ABST
    Figure CN119012024A_ABST
Patent Text Reader

Abstract

The invention provides a video fusion method and fusion system, relates to the technical field of video processing, and is applied to a plurality of video streams with different shooting angles and overlapping areas in the same scene, the plurality of video streams are acquired by a plurality of cameras, and through constructing a comprehensive mapping matrix and combining transmission correction, distortion transformation and zoom adjustment, the video streams can be fused. And homography transformation is carried out on a single-frame image in the video stream. In non-first frame processing, an inter-frame change detection mechanism is introduced, a mapping matrix is dynamically adjusted according to a detection result, and the accuracy of video fusion is ensured. And finally, splicing the transformed images according to the relative positions of the cameras to realize high-quality video fusion. According to the technical scheme, the key problem in multi-view video stream fusion is effectively solved, the fusion efficiency and effect are improved, and the method is suitable for the fields of video monitoring, virtual reality, augmented reality and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video processing technology, and in particular to a video fusion method and a fusion system. Background Art

[0002] These systems deploy multiple cameras at different locations to achieve multi-angle and all-round monitoring of the same scene. However, there are problems such as different shooting angles and overlapping fields of view between the video streams shot by multiple cameras. How to effectively fuse these video streams to form a complete, coherent and information-rich monitoring picture has become an important research topic in the current video processing field.

[0003] Most traditional video fusion methods are based on simple image stitching technology. When processing video streams with large perspective differences and complex backgrounds, these methods often have problems such as obvious stitching gaps, image distortion, and information loss. In addition, when the scene in the video stream changes dynamically, such as lighting changes, object movement, etc., traditional stitching methods are difficult to maintain the stability and accuracy of the stitching effect.

[0004] Therefore, it is necessary to provide a video fusion method and a fusion system to solve the above technical problems. Summary of the invention

[0005] To solve the above technical problems, the present invention provides a video fusion method and a fusion system, which performs homography transformation on single-frame images in multiple video streams through a comprehensive mapping matrix, and dynamically adjusts the mapping matrix based on the inter-frame change detection results to achieve high-quality video fusion.

[0006] The present invention provides a video fusion method, which is applied to multiple video streams with different shooting angles and overlapping areas in the same scene, wherein the multiple video streams are acquired by multiple cameras, and the fusion method comprises the following steps:

[0007] Single-frame images are respectively acquired from the multiple video streams, and all single-frame images are images of the first time frame,

[0008] If the first time frame is the first frame of the multiple video streams, image homography transformation is performed on all single-frame images through a comprehensive mapping matrix, wherein the comprehensive mapping matrix is ​​formed by matrix multiplication of a transmission correction mapping matrix, a distortion transformation mapping matrix, and a scaling mapping matrix, the transmission correction mapping matrix is ​​calculated based on the to-be-joined area between the single-frame images, the distortion transformation mapping matrix is ​​calculated based on the intrinsic parameters and extrinsic parameters of the camera, and the scaling mapping matrix is ​​calculated based on the required scaling ratio;

[0009] If the first time frame is a non-first frame of the multiple video streams, then performing change detection of corresponding frames on all single-frame images of the first time frame and all single-frame images in a previous frame of the first time frame to obtain single-frame change results, wherein the single-frame change results include pixel difference values, feature point change values, and block similarity;

[0010] Determine whether the single frame change result meets preset conditions, wherein the preset conditions include a pixel difference threshold, a feature point change threshold, and a block similarity threshold;

[0011] If the conditions are met, performing image homography transformation on all single-frame images of the first time frame by using the comprehensive mapping matrix of the previous frame of the first time frame, and splicing all single-frame images after the homography transformation according to the relative positions of the cameras;

[0012] If not satisfied, the comprehensive mapping matrix is ​​updated, and all single-frame images of the first time frame are subjected to image homography transformation using the updated comprehensive mapping matrix, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

[0013] Preferably, the area to be spliced ​​between the single-frame images is obtained by using a feature point matching method.

[0014] Preferably, the feature point matching method is applied to determine the area to be spliced ​​between single-frame images, comprising the following steps:

[0015] In the multiple video streams, detecting feature points in all single-frame images belonging to the first time frame, the feature points including corner points and edge points;

[0016] Determine the adjacent single-frame images according to the relative position of the cameras, and match the feature points in the adjacent single-frame image pairs using the SIFT method to obtain successfully matched feature point pairs;

[0017] According to the successfully matched feature point pairs, a transformation model between single-frame images is estimated by the least square method, wherein the transformation model is used to characterize the translation relationship, rotation relationship and scaling relationship between images;

[0018] The region to be spliced ​​between single-frame images is predicted according to the transformation model.

[0019] Preferably, the step of acquiring the single frame change result includes:

[0020] Calculating pixel differences between all single-frame images of the first time frame and single-frame images at corresponding positions in a frame before the first time frame to obtain pixel difference values;

[0021] Using a feature point detection method, calculating feature point position change values ​​for all single-frame images of the first time frame and single-frame images at corresponding positions in a frame before the first time frame to obtain feature point change values;

[0022] The single frame images of adjacent frames are divided into multiple blocks, and the similarities between corresponding blocks are calculated to obtain the block similarity.

[0023] Preferably, the determining whether the single frame change result satisfies a preset condition includes:

[0024] The calculated pixel difference value, feature point change value and block similarity are compared with the preset pixel difference threshold, feature point change threshold and block similarity threshold respectively;

[0025] If the pixel difference value is less than or equal to the pixel difference threshold, and the feature point change value is less than or equal to the feature point change threshold, and the block similarity is greater than or equal to the block similarity threshold, then it is determined that the single frame change result meets the preset condition;

[0026] If any of the above conditions is not met, it is determined that the single frame change result does not meet the preset condition.

[0027] Preferably, the updating process of the comprehensive mapping matrix includes:

[0028] Recalculate the transmission correction mapping matrix, distortion transformation mapping matrix, and scale mapping matrix.

[0029] Preferably, the fusion method further comprises:

[0030] The fused video is post-processed, and the post-processing includes color correction, brightness adjustment and denoising.

[0031] The present invention also provides a video fusion system for executing the video fusion method, which is applied to multiple video streams with different shooting angles and overlapping areas in the same scene, wherein the multiple video streams are acquired by multiple cameras, and the fusion system comprises:

[0032] An image acquisition module is used to acquire single-frame images from the multiple video streams, and all single-frame images are images of the first time frame.

[0033] The image processing module is used to perform the following steps:

[0034] If the first time frame is the first frame of the multiple video streams, image homography transformation is performed on all single-frame images through a comprehensive mapping matrix, wherein the comprehensive mapping matrix is ​​formed by matrix multiplication of a transmission correction mapping matrix, a distortion transformation mapping matrix, and a scaling mapping matrix, the transmission correction mapping matrix is ​​calculated based on the to-be-joined area between the single-frame images, the distortion transformation mapping matrix is ​​calculated based on the intrinsic parameters and extrinsic parameters of the camera, and the scaling mapping matrix is ​​calculated based on the required scaling ratio;

[0035] If the first time frame is a non-first frame of the multiple video streams, then performing change detection of corresponding frames on all single-frame images of the first time frame and all single-frame images in a previous frame of the first time frame to obtain single-frame change results, wherein the single-frame change results include pixel difference values, feature point change values, and block similarity;

[0036] Determine whether the single frame change result meets preset conditions, wherein the preset conditions include a pixel difference threshold, a feature point change threshold, and a block similarity threshold;

[0037] If the conditions are met, performing image homography transformation on all single-frame images of the first time frame by using the comprehensive mapping matrix of the previous frame of the first time frame, and splicing all single-frame images after the homography transformation according to the relative positions of the cameras;

[0038] If not satisfied, the comprehensive mapping matrix is ​​updated, and all single-frame images of the first time frame are subjected to image homography transformation using the updated comprehensive mapping matrix, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

[0039] Compared with the related art, the video fusion method and fusion system provided by the present invention have the following advantages:

[0040] Beneficial effects:

[0041] The present invention adopts the product of the transmission correction mapping matrix, the distortion transformation mapping matrix and the scaling mapping matrix as the comprehensive mapping matrix, which respectively considers the transmission deformation, camera distortion and the required scaling ratio between video streams, thereby more accurately achieving alignment between images.

[0042] In the non-first frame processing of the video stream, an inter-frame change detection mechanism is introduced. By calculating parameters such as pixel difference value, feature point change value and block similarity, the degree of change between adjacent frames is evaluated, providing a basis for dynamically adjusting the mapping matrix.

[0043] According to the inter-frame change detection results, if the change between the current frame and the previous frame meets the preset conditions, the comprehensive mapping matrix of the previous frame will continue to be used for transformation; if not, the mapping matrix will be updated to ensure the accuracy and stability of video fusion.

[0044] After the homography transformation, the transformed single-frame images are stitched together according to the relative positions of the cameras to form coherent, high-quality video content.

[0045] In summary, the present invention performs homography transformation on single-frame images in multiple video streams through a comprehensive mapping matrix, and dynamically adjusts the mapping matrix in combination with the inter-frame change detection result to achieve high-quality video fusion. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a video fusion method provided by the present invention;

[0047] Figure 2 A module structure diagram of a video fusion system provided by the present invention. DETAILED DESCRIPTION

[0048] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0049] It should also be noted that, for ease of description, only the part relevant to the present invention but not all the content is shown in the accompanying drawings. It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as the processing or method described as a flow chart. Although the flow chart describes each operation (or step) as being processed sequentially, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0050] Embodiment 1

[0051] The present invention provides a video fusion method, which is applied to multiple video streams with different shooting angles and overlapping areas in the same scene, wherein the multiple video streams are acquired by multiple cameras, and the video fusion method ... and the multiple video streams are acquired by multiple cameras, and the video fusion method is applied Figure 1 As shown, the fusion method comprises the following steps:

[0052] Single-frame images are respectively acquired from the multiple video streams, and all the single-frame images are images of the first time frame.

[0053] In this embodiment, first, a single frame image of the current first time frame (i.e., the frame corresponding to the current processing time point) is synchronously extracted from the video streams captured by multiple cameras. These images will be used as input data for subsequent processing. In order to ensure the synchronization of data, the system needs to record the clock information of each camera and use timestamps to align video frames from different cameras.

[0054] If the first time frame is the first frame of the multiple video streams, image homography transformation is performed on all single-frame images through a comprehensive mapping matrix, wherein the comprehensive mapping matrix is ​​formed by matrix multiplication of a transmission correction mapping matrix, a distortion transformation mapping matrix and a scaling mapping matrix, the transmission correction mapping matrix is ​​calculated based on the area to be spliced ​​between single-frame images, the distortion transformation mapping matrix is ​​calculated based on the intrinsic and extrinsic parameters of the camera, and the scaling mapping matrix is ​​calculated based on the required scaling ratio.

[0055] In this embodiment, when it is detected that the first frame of the video stream is currently being processed, it will first calculate the transmission correction mapping matrix, specifically: analyze the overlapping area between the single-frame images, and use methods such as feature point matching to determine the relative position relationship between the images. Then, based on the camera's internal parameters (such as focal length, optical center, etc.) and external parameters (such as the position and direction of the camera in the world coordinate system), calculate the distortion transformation mapping matrix. Finally, according to the required scaling ratio, calculate the scaling mapping matrix. These three matrices are multiplied to form a comprehensive mapping matrix, which is then applied to all single-frame images to perform image homography transformation to correct transmission deformation and distortion, and scale the image as needed.

[0056] If the first time frame is not the first frame of the multiple video streams, corresponding frame change detection is performed on all single-frame images of the first time frame and all single-frame images in the previous frame of the first time frame to obtain single-frame change results, wherein the single-frame change results include pixel difference values, feature point change values ​​and block similarity.

[0057] In this embodiment, for the processing of non-first frames, all single-frame images of the current first time frame are first compared with single-frame images of corresponding positions in the previous frame. By calculating the pixel difference value, the pixel-level change of the image content is evaluated. At the same time, the feature point detection method is used to detect and match the feature points, and the change value of the feature point position is calculated. At the same time, the image is divided into multiple blocks, and the similarity between the corresponding blocks of adjacent frames is calculated to obtain more comprehensive inter-frame change information.

[0058] Determine whether the single frame change result meets preset conditions, wherein the preset conditions include a pixel difference threshold, a feature point change threshold, and a block similarity threshold.

[0059] In this embodiment, the calculated pixel difference value, feature point change value and block similarity are compared with preset thresholds. These thresholds are set in advance according to the actual application scenario and the requirements of the fusion effect. If all the change results meet the preset conditions (i.e., the pixel difference value is less than or equal to the pixel difference threshold, the feature point change value is less than or equal to the feature point change threshold, and the block similarity is greater than or equal to the block similarity threshold), it is considered that the similarity between the current frame and the previous frame is high enough, and the comprehensive mapping matrix of the previous frame can be used for transformation.

[0060] If satisfied, all single-frame images of the first time frame are subjected to image homography transformation using the comprehensive mapping matrix of the previous frame of the first time frame, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

[0061] In this embodiment, if the single frame change result meets the preset conditions, the system will directly use the comprehensive mapping matrix of the previous frame to perform image homography transformation on all single frame images of the current frame. The transformed images will be spliced ​​according to the relative positions of the cameras to form a complete fused video frame.

[0062] If not satisfied, the comprehensive mapping matrix is ​​updated, and all single-frame images of the first time frame are subjected to image homography transformation using the updated comprehensive mapping matrix, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

[0063] In this embodiment, if the single frame change result does not meet the preset conditions, it means that the current frame is significantly different from the previous frame, and the comprehensive mapping matrix needs to be updated. The system will recalculate the transmission correction mapping matrix, the distortion transformation mapping matrix, and the scaling mapping matrix, and form a new comprehensive mapping matrix by matrix multiplication. Then, the updated comprehensive mapping matrix is ​​used to perform image homography transformation on all single frame images of the current frame, and spliced ​​according to the relative position of the camera.

[0064] Specifically, the area to be spliced ​​between the single-frame images is obtained by using a feature point matching method, which includes the following steps:

[0065] In the multiple video streams, feature points are detected in all single-frame images belonging to the first time frame, and the feature points include corner points and edge points.

[0066] In this embodiment, feature point detection is first performed on a single frame image belonging to the first time frame in each video stream to identify corner points and edge points in the image. These feature points are usually points in the image that are easy to identify and remain relatively stable under different viewing angles.

[0067] Adjacent single-frame images are determined according to the relative positions of the cameras, and the feature points in the adjacent single-frame image pairs are matched using the SIFT method to obtain successfully matched feature point pairs.

[0068] In this embodiment, after adjacent single-frame image pairs are determined (based on the relative position information of the cameras), the SIFT algorithm is used to match the feature points in each pair of images. The SIFT algorithm finds matching items by comparing the descriptors of the feature points (i.e., the gradient direction histogram around the feature points).

[0069] During the matching process, a matching threshold is set to filter out matching pairs with low descriptor similarity and retain only feature point pairs with high matching quality.

[0070] According to the successfully matched feature point pairs, the transformation model between single-frame images is estimated by the least square method, and the transformation model is used to characterize the translation relationship, rotation relationship and scaling relationship between images.

[0071] In this embodiment, after obtaining the successfully matched feature point pairs, the least square method is used to estimate the transformation model between the single-frame images. This transformation model is an affine transformation, which can characterize the translation relationship, rotation relationship and scaling relationship between images.

[0072] In addition, the RANSAC (Random Sample Consensus) algorithm is used to remove the wrong matches (i.e., outliers) in the matching pairs to improve the accuracy of the transformation model. Then, based on the remaining matching pairs (i.e., inliers), the least squares method is used to solve the parameters of the transformation model.

[0073] The region to be spliced ​​between single-frame images is predicted according to the transformation model.

[0074] In this embodiment, after the transformation model is obtained, the model is used to predict the region to be spliced ​​between single-frame images. Specifically, the region to be spliced ​​can be determined by applying the transformation model to a certain region (such as a boundary region or a feature point-dense region) in one image and observing its corresponding position in another image.

[0075] Specifically, the step of obtaining the single frame change result includes:

[0076] Pixel difference calculation is performed on all single-frame images of the first time frame and single-frame images at corresponding positions in a frame before the first time frame to obtain pixel difference values.

[0077] In this embodiment, for all single-frame images in the first time frame, the system compares them pixel by pixel with the single-frame images at the corresponding positions in the previous frame. The comparison is completed by calculating the difference between the corresponding pixel values ​​of the two images (specifically, the absolute value difference), and all the difference values ​​are accumulated or averaged to obtain an overall pixel difference value, which reflects the degree of change in pixel level between adjacent frames.

[0078] A feature point detection method is used to calculate feature point position change values ​​for all single-frame images of the first time frame and single-frame images at corresponding positions in a frame before the first time frame to obtain feature point change values.

[0079] In this embodiment, the SIFT feature point detection method is used to extract feature points from single-frame images of the first time frame and its previous frame, and then the feature descriptor matching algorithm is used to find matching feature point pairs between adjacent frames. For each pair of matching feature points, their position difference in the image (i.e., the feature point position change value) is calculated, and this value is the Euclidean distance.

[0080] The single frame images of adjacent frames are divided into multiple blocks, and the similarities between corresponding blocks are calculated to obtain the block similarity.

[0081] In this embodiment, a single-frame image of adjacent frames is divided into multiple blocks of the same size (also called windows or regions), and then, for each pair of corresponding blocks (i.e., blocks in the same position in the previous frame and the current frame), the similarity between them is calculated, and the similarity calculation is completed using the structural similarity index SSIM.

[0082] Specifically, the determining whether the single frame change result meets a preset condition includes:

[0083] The calculated pixel difference value, feature point change value and block similarity are compared with the preset pixel difference threshold, feature point change threshold and block similarity threshold respectively.

[0084] If the pixel difference value is less than or equal to the pixel difference threshold, and the feature point change value is less than or equal to the feature point change threshold, and the block similarity is greater than or equal to the block similarity threshold, it is determined that the single frame change result meets the preset condition.

[0085] If any of the above conditions is not met, it is determined that the single frame change result does not meet the preset condition.

[0086] In addition, the fusion method also includes:

[0087] The fused video is post-processed, and the post-processing includes color correction, brightness adjustment and denoising.

[0088] The working principle of a video fusion method and fusion system provided by the present invention is as follows:

[0089] First, the system synchronously extracts the single frame image of the current first time frame of all video streams from the video streams captured by multiple cameras in the same scene but at different angles. This is the starting point of the video fusion process.

[0090] For the first frame of the video stream, the system uses a comprehensive mapping matrix to perform homography transformation on these single-frame images. This comprehensive mapping matrix is ​​the product of the transmission correction mapping matrix, the distortion transformation mapping matrix, and the scaling mapping matrix, which are used to correct the transmission deformation and camera lens distortion caused by differences in camera angle and position, and adjust the image scaling ratio according to actual needs. Through this step, the system can preliminarily align these single-frame images in preparation for subsequent stitching.

[0091] For non-first frames, the system first performs inter-frame change detection on these single-frame images and the corresponding images of the previous frame. This includes calculating pixel difference values, feature point change values, and block similarity to comprehensively evaluate the degree of inter-frame change. The purpose of this step is to determine the similarity between the current frame and the previous frame, so as to decide whether the comprehensive mapping matrix needs to be updated.

[0092] Next, the system determines whether the inter-frame change results meet the preset conditions based on the preset thresholds (pixel difference threshold, feature point change threshold, and block similarity threshold). If the conditions are met, it means that the current frame is highly similar to the previous frame, and the comprehensive mapping matrix of the previous frame can be directly used to perform homography transformation on the current frame and splice according to the relative position of the camera. If the conditions are not met, it means that the inter-frame changes are large and the comprehensive mapping matrix needs to be updated.

[0093] In the case where the comprehensive mapping matrix needs to be updated, the system recalculates the transmission correction mapping matrix, the distortion transformation mapping matrix, and the scaling mapping matrix to more accurately reflect the difference between the current frame and the previous frame. Then, the current frame is homographically transformed using the updated comprehensive mapping matrix and stitched.

[0094] Finally, in order to improve the quality of the fused video, the system will also post-process the stitched video, including color correction, brightness adjustment, and denoising, to ensure that the fused video is more natural and coherent in visual effects.

[0095] In summary, the video fusion method proposed in the present invention realizes the efficient and accurate fusion of multiple video streams with different shooting angles and overlapping areas in the same scene through the construction and dynamic adjustment of the comprehensive mapping matrix, inter-frame change detection and post-processing and other technical means.

[0096] Embodiment 2

[0097] The present invention also provides a video fusion system for executing the video fusion method, which is applied to multiple video streams with different shooting angles and overlapping areas in the same scene, wherein the multiple video streams are acquired by multiple cameras, and the reference Figure 2 As shown, the fusion system includes:

[0098] The image acquisition module 100 is used to respectively acquire single-frame images from the multiple video streams, and all single-frame images are images of the first time frame.

[0099] The image processing module 200 is used to perform the following steps:

[0100] If the first time frame is the first frame of the multiple video streams, image homography transformation is performed on all single-frame images through a comprehensive mapping matrix, wherein the comprehensive mapping matrix is ​​formed by matrix multiplication of a transmission correction mapping matrix, a distortion transformation mapping matrix, and a scaling mapping matrix, the transmission correction mapping matrix is ​​calculated based on the to-be-joined area between the single-frame images, the distortion transformation mapping matrix is ​​calculated based on the intrinsic parameters and extrinsic parameters of the camera, and the scaling mapping matrix is ​​calculated based on the required scaling ratio;

[0101] If the first time frame is a non-first frame of the multiple video streams, then performing change detection of corresponding frames on all single-frame images of the first time frame and all single-frame images in a previous frame of the first time frame to obtain single-frame change results, wherein the single-frame change results include pixel difference values, feature point change values, and block similarity;

[0102] Determine whether the single frame change result meets preset conditions, wherein the preset conditions include a pixel difference threshold, a feature point change threshold, and a block similarity threshold;

[0103] If the conditions are met, performing image homography transformation on all single-frame images of the first time frame by using the comprehensive mapping matrix of the previous frame of the first time frame, and splicing all single-frame images after the homography transformation according to the relative positions of the cameras;

[0104] If not satisfied, the comprehensive mapping matrix is ​​updated, and all single-frame images of the first time frame are subjected to image homography transformation using the updated comprehensive mapping matrix, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

[0105] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0106] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0107] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or includes elements that are inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

Claims

1. A video fusion method, characterized in that: Applied to multiple video streams with different shooting angles and overlapping areas in the same scene, the multiple video streams are acquired by multiple cameras, and the fusion method includes the following steps: Single-frame images are respectively acquired from the multiple video streams, and all single-frame images are images of the first time frame, If the first time frame is the first frame of the multiple video streams, image homography transformation is performed on all single-frame images through a comprehensive mapping matrix, wherein the comprehensive mapping matrix is ​​formed by matrix multiplication of a transmission correction mapping matrix, a distortion transformation mapping matrix, and a scaling mapping matrix, the transmission correction mapping matrix is ​​calculated based on the to-be-joined area between the single-frame images, the distortion transformation mapping matrix is ​​calculated based on the intrinsic parameters and extrinsic parameters of the camera, and the scaling mapping matrix is ​​calculated based on the required scaling ratio; If the first time frame is a non-first frame of the multiple video streams, then performing change detection of corresponding frames on all single-frame images of the first time frame and all single-frame images in a previous frame of the first time frame to obtain single-frame change results, wherein the single-frame change results include pixel difference values, feature point change values, and block similarity; Determine whether the single frame change result meets preset conditions, wherein the preset conditions include a pixel difference threshold, a feature point change threshold, and a block similarity threshold; If the conditions are met, performing image homography transformation on all single-frame images of the first time frame by using the comprehensive mapping matrix of the previous frame of the first time frame, and splicing all single-frame images after the homography transformation according to the relative positions of the cameras; If not satisfied, the comprehensive mapping matrix is ​​updated, and all single-frame images of the first time frame are subjected to image homography transformation using the updated comprehensive mapping matrix, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

2. A video fusion method according to claim 1, characterized in that: The area to be spliced ​​between the single-frame images is obtained by using a feature point matching method.

3. A video fusion method according to claim 2, characterized in that: The feature point matching method is used to determine the area to be stitched between single frame images, including the following steps: In the multiple video streams, detecting feature points in all single-frame images belonging to the first time frame, the feature points including corner points and edge points; Determine the adjacent single-frame images according to the relative positions of the cameras, and match the feature points in the adjacent single-frame image pairs using the SIFT method to obtain successfully matched feature point pairs; According to the successfully matched feature point pairs, a transformation model between single-frame images is estimated by the least square method, wherein the transformation model is used to characterize the translation relationship, rotation relationship and scaling relationship between images; The region to be spliced ​​between single-frame images is predicted according to the transformation model.

4. A video fusion method according to claim 3, characterized in that: The step of obtaining the single frame change result includes: Calculating pixel differences between all single-frame images of the first time frame and single-frame images at corresponding positions in a frame before the first time frame to obtain pixel difference values; Using a feature point detection method, calculating feature point position change values ​​for all single-frame images of the first time frame and single-frame images at corresponding positions in a frame before the first time frame to obtain feature point change values; The single frame images of adjacent frames are divided into multiple blocks, and the similarities between corresponding blocks are calculated to obtain the block similarity.

5. A video fusion method according to claim 4, characterized in that: The determining whether the single frame change result meets a preset condition includes: The calculated pixel difference value, feature point change value and block similarity are compared with the preset pixel difference threshold, feature point change threshold and block similarity threshold respectively; If the pixel difference value is less than or equal to the pixel difference threshold, and the feature point change value is less than or equal to the feature point change threshold, and the block similarity is greater than or equal to the block similarity threshold, then it is determined that the single frame change result meets the preset condition; If any of the above conditions is not met, it is determined that the single frame change result does not meet the preset condition.

6. A video fusion method according to claim 5, characterized in that: The updating process of the comprehensive mapping matrix includes: Recalculate the transmission correction mapping matrix, distortion transformation mapping matrix, and scale mapping matrix.

7. A video fusion method according to claim 6, characterized in that: Fusion methods also include: The fused video is post-processed, and the post-processing includes color correction, brightness adjustment and denoising.

8. A video fusion system, used to execute a video fusion method according to any one of claims 1 to 7, characterized in that: Applicable to multiple video streams with different shooting angles and overlapping areas in the same scene, the multiple video streams are acquired by multiple cameras, and the fusion system includes: An image acquisition module is used to acquire single-frame images from the multiple video streams, and all single-frame images are images of the first time frame. The image processing module is used to perform the following steps: If the first time frame is the first frame of the multiple video streams, image homography transformation is performed on all single-frame images through a comprehensive mapping matrix, wherein the comprehensive mapping matrix is ​​formed by matrix multiplication of a transmission correction mapping matrix, a distortion transformation mapping matrix, and a scaling mapping matrix, the transmission correction mapping matrix is ​​calculated based on the to-be-joined area between the single-frame images, the distortion transformation mapping matrix is ​​calculated based on the intrinsic parameters and extrinsic parameters of the camera, and the scaling mapping matrix is ​​calculated based on the required scaling ratio; If the first time frame is a non-first frame of the multiple video streams, then performing change detection of corresponding frames on all single-frame images of the first time frame and all single-frame images in a previous frame of the first time frame to obtain single-frame change results, wherein the single-frame change results include pixel difference values, feature point change values, and block similarity; Determine whether the single frame change result meets preset conditions, wherein the preset conditions include a pixel difference threshold, a feature point change threshold, and a block similarity threshold; If the conditions are met, performing image homography transformation on all single-frame images of the first time frame by using the comprehensive mapping matrix of the previous frame of the first time frame, and splicing all single-frame images after the homography transformation according to the relative positions of the cameras; If not satisfied, the comprehensive mapping matrix is ​​updated, and all single-frame images of the first time frame are subjected to image homography transformation using the updated comprehensive mapping matrix, and all single-frame images after the homography transformation are spliced ​​according to the relative positions of the cameras.

Citation Information

Patent Citations

  • Method for splicing video in real time based on multiple cameras

    CN102006425A

  • Panoramic video stitching method

    CN112037128A

  • Image matching method and device based on ORB and feature pixel gray scale information, medium and equipment

    CN116824184A

Cited By

  • Man-machine interaction control method and control system

    CN119323831A

  • Human-computer interaction control method and control system

    CN119323831B

  • Wireless video transmission method, device and equipment and storable medium

    CN119853867A