WO2022028595A1 - 图像处理方法、装置、计算机可读存储介质及计算机设备 - Google Patents

图像处理方法、装置、计算机可读存储介质及计算机设备 Download PDF

Info

Publication number
WO2022028595A1
WO2022028595A1 PCT/CN2021/111265 CN2021111265W WO2022028595A1 WO 2022028595 A1 WO2022028595 A1 WO 2022028595A1 CN 2021111265 W CN2021111265 W CN 2021111265W WO 2022028595 A1 WO2022028595 A1 WO 2022028595A1
Authority
WO
WIPO (PCT)
Prior art keywords
video frame
rotation amount
video
frame
fused
Prior art date
Application number
PCT/CN2021/111265
Other languages
English (en)
French (fr)
Inventor
陈聪
袁文亮
姜文杰
Original Assignee
影石创新科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 影石创新科技股份有限公司 filed Critical 影石创新科技股份有限公司
Publication of WO2022028595A1 publication Critical patent/WO2022028595A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present application belongs to the field of image processing, and in particular, relates to an image processing method, apparatus, computer-readable storage medium, and computer equipment.
  • the embodiments of the present application provide an image processing method, an apparatus, a computer-readable storage medium, a computer device, a terminal, and a camera, aiming to solve one of the above problems.
  • an embodiment of the present application provides an image processing method, the method comprising:
  • the multiple video frame sequences are captured by multiple cameras respectively;
  • an embodiment of the present application provides an image processing apparatus, and the apparatus includes:
  • a first synchronization module configured to acquire a plurality of video frame sequences, and synchronize the plurality of video frame sequences, and the plurality of video frame sequences are respectively photographed by a plurality of cameras;
  • a first registration module configured to register each group of synchronized video frames in the plurality of video frame sequences respectively
  • a first fusion module configured to fuse each group of synchronized video frames after registration, respectively, to generate a fused video frame
  • the first motion estimation module is used for estimating the motion rotation amount of each fused video frame relative to the reference coordinate system
  • a first smoothing module for smoothing the motion rotation amount to obtain a smooth rotation amount
  • the first rendering module is configured to rotate and render each fused video frame by using a smooth rotation amount, and output the video frame and/or video.
  • an embodiment of the present application provides an image processing method, the method comprising:
  • each group of synchronized video frames in the plurality of video frame sequences using any one of the video frames in each group of synchronized video frames as a reference image, registration is performed on each group of synchronized video frames, respectively.
  • Each group of synchronized video frames after registration is fused to generate a fused video frame;
  • an embodiment of the present application provides an image processing apparatus, and the apparatus includes:
  • the second synchronization module is configured to acquire multiple video frame sequences, extract the timestamps of the multiple video frame sequences respectively, and synchronize the multiple video frame sequences according to the timestamps of the multiple video frame sequences.
  • Each video frame sequence is shot by multiple cameras respectively;
  • the second fusion module is configured to, for each group of synchronized video frames in the plurality of video frame sequences, use any one of the video frames in each group of synchronized video frames as a reference image, respectively, for each group of synchronized video frames
  • the frames are registered, and each group of synchronized video frames after registration is fused respectively to generate a fused video frame;
  • the second smoothing module is used for estimating the motion rotation amount of the reference image relative to the reference coordinate system, and smoothing the motion rotation amount to obtain a smooth rotation amount;
  • the second rendering module is configured to rotate and render each fused video frame by using a smooth rotation amount, and output the video frame and/or video.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method as described above are implemented.
  • an embodiment of the present application provides a computer device, including:
  • processors one or more processors
  • the processor implements the steps of the image processing method when executing the computer program.
  • an embodiment of the present application provides a camera, including:
  • processors one or more processors
  • the processor implements the steps of the image processing method when executing the computer program.
  • an embodiment of the present application provides a terminal, including:
  • processors one or more processors
  • the processor implements the steps of the image processing method when executing the computer program.
  • each group of synchronized video frames in the multiple video frame sequences is registered, and each registered video frame sequence is registered.
  • Group-synchronized video frames are fused to generate fused video frames, so that video frames and/or videos with wider viewing angles can be generated. Because of estimating the motion rotation amount of each fused video frame relative to the reference coordinate system; smoothing the motion rotation amount to obtain a smooth rotation amount; using the smooth rotation amount to rotate and render the fused video frame, Output video frames and/or video. It is thus possible to generate high-definition, stabilized video frames and/or video.
  • the image processing method of the present application has fast processing speed, low power consumption and strong robustness.
  • FIG. 1 , FIG. 2 and FIG. 3 are schematic diagrams of application scenarios of the image processing method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an image processing apparatus provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of an image processing method provided by another embodiment of the present application.
  • FIG. 7 is a schematic diagram of an image processing apparatus provided by another embodiment of the present application.
  • FIG. 8 is a specific structural block diagram of a computer device provided by an embodiment of the present application.
  • FIG. 9 is a specific structural block diagram of a terminal provided by an embodiment of the present application.
  • FIG. 10 is a specific structural block diagram of a camera provided by an embodiment of the present application.
  • An application scenario of the image processing method provided by an embodiment of the present application may be a terminal including multiple cameras or a camera including multiple cameras.
  • a terminal including multiple cameras or a camera including multiple cameras executes the image processing method provided by an embodiment of the present application to process multiple images captured by the multiple cameras.
  • An application scenario of the image processing method provided by an embodiment of the present application may also include a connected computer device 100 and a camera 200 including a plurality of cameras (as shown in FIG. 1 ).
  • the image processing method provided by an embodiment of the present application The application scenario may also include a connected computer device 100 and a plurality of cameras 300 including one or more cameras (as shown in FIG.
  • the application scenario of the image processing method provided by an embodiment of the present application may also include
  • the connected computer device 100 and multiple terminals 400 including one or more cameras (as shown in FIG. 3 ), the application scenario of the image processing method provided by an embodiment of the present application may also include computer devices and computer devices respectively.
  • a plurality of terminals including one or more cameras and a plurality of cameras (not shown) including one or more cameras are connected.
  • the computer device 100 , the camera 200 including a plurality of cameras, the camera 300 including one or more cameras, and the terminal 400 including the one or more cameras may run at least one application program.
  • Computer device 100 may be a server, desktop computer, tablet computer, laptop computer, personal digital assistant, or the like.
  • the computer device 100 executes the image processing method provided by an embodiment of the present application to process multiple images captured by one camera 200 including multiple cameras, or, multiple images captured by multiple cameras 300 including one or more cameras processing, or processing multiple images captured by the terminal 400 including one or more cameras.
  • FIG. 4 is a flowchart of an image processing method provided by an embodiment of the present application.
  • This embodiment mainly takes the application of the image processing method to a computer device, a terminal, or a camera as an example for illustration.
  • the image processing method includes the following steps:
  • the number of the multiple cameras is n, where n is an integer greater than or equal to 2, the multiple cameras are located in one terminal or camera, and may also be located in multiple terminals and/or cameras, which is not specifically limited in this application.
  • the camera is used to capture images and videos, and may include components such as lenses and image sensors.
  • the lens of the camera can be a standard lens, a wide-angle lens, an ultra-wide-angle lens or other lenses; if multiple cameras are located in multiple cameras or terminals, the distance between the lenses of two adjacent cameras can be but not limited to within 5cm, The motion states of the multiple cameras may be consistent, but not limited to. If multiple cameras are located in one terminal or camera, the positional relationship of the multiple cameras is fixed, and the distance between the lenses of two adjacent cameras may be, but not limited to, within 5 cm.
  • the synchronization of the multiple video frame sequences is specifically:
  • the timestamps of the multiple video frame sequences are respectively extracted, and the multiple video frame sequences are synchronized by the timestamps of the multiple video frame sequences.
  • the synchronization of the multiple video frame sequences is specifically:
  • the gyroscope signals corresponding to the multiple video frame sequences are respectively extracted, and the multiple video frame sequences are synchronized by the gyroscope signals corresponding to the multiple video frame sequences.
  • the synchronization of the multiple video frame sequences by using the timestamps of the multiple video frame sequences is specifically:
  • a reference time is used to synchronize the timestamps of the multiple video frame sequences, and the reference time may include, but is not limited to: using the system time of the terminal or camera where the multiple cameras are located as the reference time or using any video frame Timestamp of the sequence as a base time etc.
  • S102 may specifically be: performing pairwise registration on two video frames with overlapping regions in each group of synchronized video frames in the plurality of video frame sequences.
  • the pairwise registration can be implemented by methods including but not limited to the following:
  • Each pair of synchronized video frames with overlapping areas is registered respectively; specifically, the following methods may be adopted, including but not limited to: performing feature point detection and matching on each pair of synchronized video frames, and using an affine transformation model for registration.
  • the feature point detection may use: Oriented Fast and Rotated Brief (ORB), Scale-invariant feature transform (SIFT), or Speeded Up Robust Features (SURF), etc. Algorithm; the matching can be calculated by Fast Library for Approximate Nearest Neighbor (FLANN) algorithm according to the descriptor of the feature point, and RANSAC (Random Sample Consensus, random sampling consistency algorithm) is used to eliminate errors according to the affine transformation model. match.
  • ORB Oriented Fast and Rotated Brief
  • SIFT Scale-invariant feature transform
  • SURF Speeded Up Robust Features
  • S103 can specifically adopt a traditional image stitching fusion algorithm, or can adopt the following image fusion method:
  • S104 Estimate the motion rotation amount of each fused video frame relative to the reference coordinate system.
  • the reference coordinate system includes but is not limited to the reference system of the video frame after the fusion of the first frame or the reference system of the IMU (Inertial measurement unit, inertial measurement unit) state when the first video frame is captured, or the earth coordinate system.
  • IMU Inertial measurement unit, inertial measurement unit
  • S104 may specifically include:
  • the real-time or offline update key frame may specifically be:
  • a fused video frame is set as a key frame, and the degree of overlap and the number of associated feature points between the current fused video frame and the field of view of the key frame is judged. When the degree of overlap and the number of associated feature points are greater than or When it is equal to the preset value, keep the first fused video frame as the key frame unchanged; when the overlap and the number of feature points associated are less than the preset value, update the key frame, and set the current fused video frame to Keyframe;
  • the beam adjustment method uses the attitude of the camera or the terminal and the three-dimensional coordinates of the measurement point as unknown parameters, and uses the coordinates of the feature points detected on the image for forward intersection as the observation data, so as to obtain the optimal adjustment.
  • Camera parameters and world point coordinates are used to calculate the attitude of the camera or the terminal and the three-dimensional coordinates of the measurement point as unknown parameters, and uses the coordinates of the feature points detected on the image for forward intersection as the observation data, so as to obtain the optimal adjustment.
  • the IMU method can be used to estimate the motion rotation amount of each fused video frame relative to the reference coordinate system.
  • S104 can also be specifically: use the IMU method to estimate the motion rotation amount of each fused video frame relative to the reference coordinate system, and the IMU method can specifically adopt the following motion estimation method: real-time acquisition of the gyroscope in the terminal or camera The current state timestamp, acceleration count value and angular velocity value of the fused video frame are estimated; the motion rotation of each fused video frame relative to the reference coordinate system is estimated by combining the acceleration count value and angular velocity value with extended Kalman filter.
  • S104 may specifically include: combining the visual motion estimation algorithm and the IMU method to estimate the motion rotation amount of each fused video frame relative to the reference coordinate system.
  • S105 may specifically be:
  • the motion rotation amount q′ N_0 is smoothed by controlling the trimming allowance to obtain a smooth rotation amount
  • S106 may specifically be:
  • the video frame when a video is output, the video frame is specifically output first, and then all the output video frames are connected in time sequence to generate a video.
  • the image processing apparatus provided by an embodiment of the present application may be a computer program or a piece of program code running in a computer device, a terminal, or a camera, for example, the image processing apparatus is an application software; the image processing apparatus may It is used to execute corresponding steps in the image processing method provided by an embodiment of the present application.
  • An image processing apparatus provided by an embodiment of the present application includes:
  • the first synchronization module 11 is configured to acquire multiple video frame sequences, and synchronize the multiple video frame sequences, and the multiple video frame sequences are respectively captured by multiple cameras;
  • a first registration module 12 configured to register each group of synchronized video frames in the multiple video frame sequences respectively;
  • the first fusion module 13 is used to respectively fuse each group of synchronized video frames after registration to generate fused video frames;
  • the first motion estimation module 14 is used for estimating the motion rotation amount of each fused video frame relative to the reference coordinate system
  • the first smoothing module 15 is used to smooth the motion rotation amount to obtain a smooth rotation amount
  • the first rendering module 16 is configured to rotate and render each fused video frame by using a smooth rotation amount, and output the video frame and/or video.
  • the image processing apparatus provided by an embodiment of the present application and the image processing method provided by an embodiment of the present application belong to the same concept, and the specific implementation process thereof can be found in the full text of the specification, which will not be repeated here.
  • each group of synchronized video frames in the multiple video frame sequences is registered, and the registered Each group of synchronized video frames is fused to generate a fused video frame, so that a wider viewing angle video and/or video frame can be generated.
  • the image processing method of the present application has fast processing speed, low power consumption and strong robustness.
  • FIG. 6 is a flowchart of an image processing method provided by another embodiment of the present application.
  • This embodiment mainly takes the image processing method applied to a computer device, a terminal, or a camera as an example for illustration.
  • Another embodiment of the present application is used for illustration.
  • the provided image processing method includes the following steps:
  • the number of the multiple cameras is n, where n is an integer greater than or equal to 2, and the multiple cameras are located in one terminal or camera.
  • the lens of the camera can be a standard lens, a wide-angle lens or an ultra-wide-angle lens; if multiple cameras are located in multiple cameras or terminals, the distance between the lenses of two adjacent cameras can be, but not limited to, within 5cm.
  • the state of motion of the player can be, but is not limited to, be consistent;
  • the synchronization of the multiple video frame sequences by using the timestamps of the multiple video frame sequences is specifically:
  • a reference time is used to synchronize the timestamps of the multiple video frame sequences, and the reference time may include, but is not limited to: using the system time of the terminal or camera where the multiple cameras are located as the reference time or using any video frame Timestamp of the sequence as a base time etc.
  • the motion rotation amount of the reference image relative to the reference coordinate system is estimated, and the motion rotation amount is smoothed to obtain a smooth rotation amount.
  • each group of synchronized video frames in the multiple video frame sequences use any one of the video frames in each group of synchronized video frames as a reference image.
  • the synchronous video frames of the group are registered, and each group of synchronous video frames after registration is respectively fused to generate the steps of the fused video frames, and the described estimation of the motion rotation amount of the reference image relative to the reference coordinate system,
  • the steps of smoothing the motion rotation amount to obtain a smooth rotation amount these two steps may be performed simultaneously, or any one step may be preceded and the other step may be followed.
  • the registration of each group of synchronized video frames by using any one of the video frames in each group of synchronized video frames as a reference image is specifically as follows:
  • pairwise registration is performed on two video frames with overlapping areas in each group of synchronized video frames.
  • the reference coordinate system may be the reference system of the fused video frame of the first frame or the reference system of the state of an IMU (Inertial measurement unit, inertial measurement unit) when the first video frame is captured, or the earth coordinate system.
  • IMU Inertial measurement unit, inertial measurement unit
  • the first video frame and the reference image are captured by the same camera.
  • a visual motion estimation algorithm is used to estimate the motion rotation amount of the reference image relative to the reference coordinate system
  • the inertial measurement unit method is used to estimate the motion rotation amount of the reference image relative to the reference coordinate system
  • the estimating the motion rotation amount of the reference image relative to the reference coordinate system is specifically: estimating the motion rotation amount of the reference image relative to the reference coordinate system in combination with the visual motion estimation algorithm and the inertial measurement unit method.
  • the use of the visual motion estimation algorithm to estimate the motion rotation amount of the reference image relative to the reference coordinate system specifically includes:
  • the first rotation amount q N_0 is optimized by the beam adjustment method to obtain the second rotation amount q′ N_0 , and the second rotation amount q′ N_0 is used as the motion rotation amount of the reference image relative to the first video frame.
  • the real-time or offline update key frame is specifically:
  • the smoothing of the motion rotation amount to obtain a smooth rotation amount is specifically:
  • the motion rotation amount is smoothed by controlling the trimming allowance to obtain a smooth rotation amount.
  • S203 may specifically be:
  • a video when a video is output, specifically, video frames are output first, and then all the output video frames are connected in time sequence to generate a video.
  • the image processing apparatus provided by another embodiment of the present application may be a computer program or a piece of program code running in a computer device, a terminal, or a camera, for example, the image processing apparatus is an application software; the image processing apparatus It can be used to execute corresponding steps in the image processing method provided by another embodiment of the present application.
  • An image processing apparatus provided by another embodiment of the present application includes:
  • the second synchronization module 21 is configured to acquire multiple video frame sequences, extract timestamps of the multiple video frame sequences respectively, and synchronize the multiple video frame sequences according to the timestamps of the multiple video frame sequences. Multiple video frame sequences are shot by multiple cameras respectively;
  • the second fusion module 22 is configured to, for each group of synchronized video frames in the multiple video frame sequences, use any video frame in the synchronized video frames of each group as a The video frames are registered, and each group of synchronized video frames after registration is fused respectively to generate a fused video frame;
  • the second smoothing module 23 is used for estimating the motion rotation amount of the reference image relative to the reference coordinate system, and smoothing the motion rotation amount to obtain a smooth rotation amount;
  • the second rendering module 24 is configured to rotate and render each fused video frame with a smooth rotation amount, and output the video frame and/or video.
  • An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the implementation is as provided in an embodiment and another embodiment of the present application.
  • the steps of the image processing method are as provided in an embodiment and another embodiment of the present application.
  • FIG. 8 shows a specific structural block diagram of a computer device provided by an embodiment of the present application.
  • the computer device may be the computer device shown in FIG. 1 , FIG. 2 and FIG. 3 .
  • a computer device 100 includes: one or more A processor 101, a memory 102, and one or more computer programs, wherein the processor 101 and the memory 102 are connected by a bus, the one or more computer programs are stored in the memory 102, and configured is executed by the one or more processors 101, and when the processor 101 executes the computer program, the steps of the image processing method provided by one embodiment and another embodiment of the present application are implemented.
  • Computer device 100 may be a server, desktop computer, tablet computer, laptop computer, personal digital assistant, or the like.
  • FIG. 9 shows a specific structural block diagram of a terminal provided by an embodiment of the present application.
  • a terminal 500 includes: one or more processors 201, a memory 202, and one or more computer programs, wherein the processors 201 and The memory 202 is connected by a bus, and the one or more computer programs are stored in the memory 202 and configured to be executed by the one or more processors 201 that execute the computer
  • the program implements the steps of the image processing method provided by one embodiment and another embodiment of the present application.
  • FIG. 10 shows a specific structural block diagram of a camera provided by an embodiment of the present application.
  • a camera 600 includes: one or more processors 301, a memory 302, and one or more computer programs, wherein the processors 301 and The memory 302 is connected by a bus, and the one or more computer programs are stored in the memory 302 and configured to be executed by the one or more processors 301 that execute the computer
  • the program implements the steps of the image processing method provided by one embodiment and another embodiment of the present application.
  • the motion rotation amount is smoothed to obtain a smooth rotation amount; the fused video frame is rotated and rendered by the smooth rotation amount, and the video frame and/or video are output; therefore, it is possible to generate HD, stabilized video frames and/or video.
  • the image processing method of the present application has fast processing speed, low power consumption and strong robustness.
  • the steps in the embodiments of the present application are not necessarily executed sequentially in the order indicated by the step numbers. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution of these sub-steps or stages The sequence is also not necessarily sequential, but may be performed alternately or alternately with other steps or sub-steps of other steps or at least a portion of a phase.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Road (Synchlink) DRAM
  • SLDRAM synchronous chain Road (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理方法、装置、计算机可读存储介质及计算机设备,适用于图像处理领域。所述图像处理方法包括:获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄(S101);分别对所述多个视频帧序列中的每组同步的视频帧进行配准(S102);分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧(S103);估算每个融合后的视频帧相对参考坐标系的运动旋转量(S104);对所述运动旋转量进行平滑,得到平滑的旋转量(S105);采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频(S106)。可以生成高清、稳定、视角更广的视频帧和/或视频,该方法速度快、功耗低,具有很强的鲁棒性。

Description

图像处理方法、装置、计算机可读存储介质及计算机设备 技术领域
本申请属于图像处理领域,尤其涉及一种图像处理方法、装置、计算机可读存储介质及计算机设备。
背景技术
目前大多数手机都具有双摄像头或多摄像头,双摄像头或多摄像头带来了更出色的拍照体验的同时还有些功能不够完善。例如,有些手机支持拍摄广角的大视场图像,但图像清晰度不高;有些手机则支持长焦拍摄出超级清晰的图像,但不能支持拍摄广角的大视场图像。另外,现有技术中对由多个终端的摄像头分别拍摄的多幅图像进行融合的方法中,也是存在无法生成广角的大视场且高清晰度的图像或视频的问题。
技术问题
本申请实施例在于提供一种图像处理方法、装置、计算机可读存储介质及计算机设备、终端及相机,旨在解决以上问题之一。
技术解决方案
第一方面,本申请实施例提供了一种图像处理方法,所述方法包括:
获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
分别对所述多个视频帧序列中的每组同步的视频帧进行配准;
分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
估算每个融合后的视频帧相对参考坐标系的运动旋转量;
对所述运动旋转量进行平滑,得到平滑的旋转量;
采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
第二方面,本申请实施例提供了一种图像处理装置,所述装置包括:
第一同步模块,用于获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
第一配准模块,用于分别对所述多个视频帧序列中的每组同步的视频帧进行配准;
第一融合模块,用于分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
第一运动估算模块,用于估算每个融合后的视频帧相对参考坐标系的运动旋转量;
第一平滑模块,用于对所述运动旋转量进行平滑,得到平滑的旋转量;
第一渲染模块,用于采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
第三方面,本申请实施例提供了一种图像处理方法,所述方法包括:
获取多个视频帧序列,分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量;
采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
第四方面,本申请实施例提供了一种图像处理装置,所述装置包括:
第二同步模块,用于获取多个视频帧序列,分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
第二融合模块,用于针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
第二平滑模块,用于估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量;
第二渲染模块,用于采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
第五方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如所述的图像处理方法的步骤。
第六方面,本申请实施例提供了一种计算机设备,包括:
一个或多个处理器;
存储器;以及
一个或多个计算机程序,所述处理器和所述存储器通过总线连接,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述处理器执行所述计算机程序时实现如所述的图像处理方法的步骤。
第七方面,本申请实施例提供了一种相机,包括:
一个或多个处理器;
存储器;以及
一个或多个计算机程序,所述处理器和所述存储器通过总线连接,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述处理器执行所述计算机程序时实现如所述的图像处理方法的步骤。
第八方面,本申请实施例提供了一种终端,包括:
一个或多个处理器;
存储器;以及
一个或多个计算机程序,所述处理器和所述存储器通过总线连接,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述处理器执行所述计算机程序时实现如所述的图像处理方法的步骤。
有益效果
在本申请实施例中,由于对多个由多个摄像头拍摄的视频帧序列进行同步,再对所述多个视频帧序列中的每组同步的视频帧进行配准,将配准后的每组同步的视频帧进行融合,生成融合后的视频帧,因此可以生成视角更广的视频帧和/或视频。又由于估算每个融合后的视频帧相对参考坐标系的运动旋转量;对所述运动旋转量进行平滑,得到平滑的旋转量;采用平滑的旋转量对融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。因此可以生成高清、稳定的视频帧和/或视频。此外,本申请的图像处理方法处理速度快、功耗低,具有很强的鲁棒性。
附图说明
图1、图2和图3是本申请一实施例提供的图像处理方法的应用场景示意图。
图4是本申请一实施例提供的图像处理方法的流程图。
图5是本申请一实施例提供的图像处理装置示意图。
图6是本申请另一实施例提供的图像处理方法的流程图。
图7是本申请另一实施例提供的图像处理装置示意图。
图8是本申请一实施例提供的计算机设备的具体结构框图。
图9是本申请一实施例提供的终端的具体结构框图。
图10是本申请一实施例提供的相机的具体结构框图。
本发明的实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
以下结合具体实施例对本发明的具体实现进行详细描述:
本申请一实施例提供的图像处理方法的应用场景可以是包括多个摄像头的终端或者是包括多个摄像头的相机。包括多个摄像头的终端或者包括多个摄像头的相机执行本申请一实施例提供的图像处理方法对多个摄像头拍摄的多幅图像进行处理。本申请一实施例提供的图像处理方法的应用场景也可以是包括相连接的计算机设备100和一个包括多个摄像头的相机200(如图1所示),本申请一实施例提供的图像处理方法的应用场景也可以是包括相连接的计算机设备100和多个包括一个或多个摄像头的相机300(如图2所示),本申请一实施例提供的图像处理方法的应用场景也可以是包括相连接的计算机设备100和多个包括一个或多个摄像头的终端400(如图3所示),本申请一实施例提供的图像处理方法的应用场景也可以是包括计算机设备和分别与计算机设备连接的多个包括一个或多个摄像头的终端和多个包括一个或多个摄像头的相机(图未示)。计算机设备100、包括多个摄像头的相机200、包括一个或多个摄像头的相机300和包括一个或多个摄像头的终端400中可运行至少一个的应用程序。计算机设备100可以是服务器、台式计算机、平板电脑、笔记本电脑、个人数字助理等。计算机设备100执行本申请一实施例提供的图像处理方法对一个包括多个摄像头的相机200拍摄的多幅图像进行处理,或者,对多个包括一个或多个摄像头的相机300拍摄的多幅图像进行处理,或者,对包括一个或多个摄像头的终端400拍摄的多幅图像进行处理。
请参阅图4,是本申请一实施例提供的图像处理方法的流程图,本实施例主要以该图像处理方法应用于计算机设备、终端或相机为例来举例说明,本申请一实施例提供的图像处理方法包括以下步骤:
S101、获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄。
在本申请一实施例中,
所述多个摄像头的数量为n个,n是大于或等于2的整数,所述多个摄像头位于 一个终端或相机,也可以位于多个终端和/或相机,本申请不做具体限定。
所述摄像头用于捕获图像和视频,可以包括镜头、图像传感器等组件。所述摄像头的镜头可以是标准镜头、广角镜头、超广角镜头或其他镜头;如果多个摄像头是位于多个相机或者终端时,相邻两个摄像头的镜头之间的距离可以但不限于在5cm以内,多个摄像头的运动状态可以但不限于保持一致。如果多个摄像头是位于一个终端或者相机时,多个摄像头的位置关系是固定的,相邻两个摄像头的镜头之间的距离可以但不限于在5cm以内。
当所述多个摄像头位于一个终端或者相机时,所述对所述多个视频帧序列进行同步具体为:
分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步。
当所述多个摄像头位于多个相机和/或终端时,所述对所述多个视频帧序列进行同步具体为:
分别提取多个视频帧序列对应的陀螺仪信号,通过所述多个视频帧序列对应的陀螺仪信号对所述多个视频帧序列进行同步。
所述通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步具体为:
采用基准时间将所述多个视频帧序列的时间戳保持同步,所述基准时间可以包括但不限于:采用所述多个摄像头位于的终端或相机的系统时间作为基准时间或采用任一个视频帧序列的时间戳作为基准时间等。
S102、分别对所述多个视频帧序列中的每组同步的视频帧进行配准。
在本申请一实施例中,S102具体可以为:对所述多个视频帧序列中的每组同步的视频帧中有重叠区域的两幅视频帧进行两两配准。
所述两两配准可采用包括但不限于如下方法实现:
分别将有重叠区域的每对同步的视频帧对齐;具体可以采用包括但不限于以下方式:根据标定的相机参数对每对同步的视频帧进行畸变校正、尺度变换以及极线校正等操作,使每对同步的视频帧的同名点位于同一行或者同一列;
或者,
分别将有重叠区域的每对同步的视频帧进行配准;具体可以采用包括但不限于以下方式:对每对同步的视频帧进行特征点检测和匹配,并用仿射变换模型进行配准。
所述特征点检测可以采用:定向快速旋转简报(Oriented Fast and Rotated Brief,ORB)、尺度不变特征变换(Scale-invariant feature transform,SIFT)或加 速鲁棒特征(Speeded Up Robust Features,SURF)等算法;所述匹配可以根据特征点的描述子用快速最近邻(Fast Library for Approximate Nearest Neighbor,FLANN)算法计算,并根据仿射变换模型用RANSAC(Random Sample Consensus,随机抽样一致性算法)剔除错误匹配。
S103、分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧。
在本申请一实施例中,S103具体可以采用传统的图像拼接融合算法,也可以采用以下的图像融合方法:
获取若干张已对齐的图像;分别计算每张图像的梯度信息;设定每张图像的掩模图,生成目标梯度图像;对目标梯度图像进行梯度运算,得到目标拉普拉斯图像;对拉普拉斯图像做反卷积变换,生成融合后的全景图像。
S104、估算每个融合后的视频帧相对参考坐标系的运动旋转量。
所述参考坐标系包括但不限于第一帧融合后的视频帧的参考系或拍摄第一帧视频帧时IMU(Inertial measurement unit,惯性测量单元)状态的参考系或者地球坐标系。
当参考坐标系为第一帧融合后的视频帧的参考系时,可以采用视觉运动估计算法(例如运动恢复结构(structure-from-motion,sfm)算法、同步定位与建图(Simultaneous Localization and Mapping,slam)算法等)估算每个融合后的视频帧相对所述第一帧融合后的视频帧的参考系的运动旋转量,在本申请一实施例中,S104具体可以包括:
S1041、实时或离线更新关键帧K,得到所有关键帧K,分别计算每个关键帧K相对第一帧融合后的视频帧的旋转量;所述实时或离线更新关键帧具体可以为:将第一帧融合后的视频帧设置为关键帧,判断当前融合后的视频帧与关键帧的视场之间的交叠度和特征点关联个数,当交叠度和特征点关联个数大于或等于预设值时,保持第一帧融合后的视频帧为关键帧不变;当交叠度和特征点关联个数小于预设值时,更新关键帧,将当前融合后的视频帧设置为关键帧;
S1042、计算融合后的视频帧N和与所述融合后的视频帧N匹配的同名点最多的关键帧K之间的相对旋转量q N_k
S1043、获得融合后的视频帧N相对第一帧融合后的视频帧的第一旋转量q N_0,其中,q N_0=q N_K·q K_0
S1044、采用光束平差法(Bundle Adjustment,BA)对第一旋转量q N_0进行优 化,得到第二旋转量q′ N_0,将所述第二旋转量q′ N_0作为当前融合后的视频帧相对第一帧融合后的视频帧的运动旋转量。
所述光束平差法,为通过将相机或终端的姿态和测量点的三维坐标作为未知参数,将影像上探测到的用于前方交会的特征点坐标作为观测数据从而进行平差得到最优的相机参数和世界点坐标。
当参考坐标系为拍摄第一帧视频帧时IMU状态的参考系或者地球坐标系时,可以采用IMU方法估算每个融合后的视频帧相对参考坐标系的运动旋转量,在本申请一实施例中,S104具体还可以为:用IMU方法估算每个融合后的视频帧相对参考坐标系的运动旋转量,所述IMU方法具体可采用以下的运动估计方法:实时获取终端或相机中的陀螺仪的当前状态时间戳、加速度计数值和角速度数值;利用扩展卡尔曼滤波结合加速度计数值和角速度数值,估计得到每个融合后的视频帧相对参考坐标系的运动旋转量。
在本申请一实施例中,S104具体还可以为:结合所述视觉运动估计算法和所述IMU方法估算每个融合后的视频帧相对参考坐标系的运动旋转量。
S105、对所述运动旋转量进行平滑,得到平滑的旋转量。
在本申请一实施例中,S105具体可以为:
采用控制裁剪余度的方式对所述运动旋转量q′ N_0进行平滑,得到平滑的旋转量
Figure PCTCN2021111265-appb-000001
S106、采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
在本申请一实施例中,S106具体可以为:
对每个融合后的视频帧进行3D旋转,渲染获得输出视频帧和/或视频,其中,3D旋转的旋转量Δq计算公式为:
Figure PCTCN2021111265-appb-000002
在本申请一实施例中,当输出视频时,具体是先输出视频帧,然后将输出的所有视频帧按时间顺序接起来生成视频。
请参阅图5,本申请一实施例提供的图像处理装置可以是运行于计算机设备、终端或相机中的一个计算机程序或一段程序代码,例如该图像处理装置为一个应用软件;该图像处理装置可以用于执行本申请一实施例提供的图像处理方法中的相应步骤。本申请一实施例提供的图像处理装置包括:
第一同步模块11,用于获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
第一配准模块12,用于分别对所述多个视频帧序列中的每组同步的视频帧进行配准;
第一融合模块13,用于分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
第一运动估算模块14,用于估算每个融合后的视频帧相对参考坐标系的运动旋转量;
第一平滑模块15,用于对所述运动旋转量进行平滑,得到平滑的旋转量;
第一渲染模块16,用于采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
本申请一实施例提供的图像处理装置与本申请一实施例提供的图像处理方法属于同一构思,其具体实现过程详见说明书全文,此处不再赘述。
在本申请一实施例中,由于对多个由多个摄像头拍摄的视频帧序列进行同步,再对所述多个视频帧序列中的每组同步的视频帧进行配准,将配准后的每组同步的视频帧进行融合,生成融合后的视频帧,因此可以生成视角更广的视频和/或视频帧。又由于估算每个融合后的视频帧相对参考坐标系的运动旋转量;对所述运动旋转量进行平滑,得到平滑的旋转量;采用平滑的旋转量对融合后的视频帧进行旋转和渲染,输出视频帧和/或视频;因此可以生成高清、稳定的视频帧和/或视频。此外,本申请的图像处理方法处理速度快、功耗低,具有很强的鲁棒性。
请参阅图6,是本申请另一实施例提供的图像处理方法的流程图,本实施例主要以该图像处理方法应用于计算机设备、终端或相机为例来举例说明,本申请另一实施例提供的图像处理方法包括以下步骤:
S201、获取多个视频帧序列,分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄。
在本申请另一实施例中,
所述多个摄像头的数量为n个,n是大于或等于2的整数,所述多个摄像头位于一个终端或者相机。
所述摄像头的镜头可以是标准镜头、广角镜头或超广角镜头;如果多个摄像头是位于多个相机或者终端时,相邻两个摄像头的镜头之间的距离可以但不限于在5cm以内,多个摄像头的运动状态可以但不限于保持一致;
所述通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步具体为:
采用基准时间将所述多个视频帧序列的时间戳保持同步,所述基准时间可以包括但不限于:采用所述多个摄像头位于的终端或相机的系统时间作为基准时间或采用任一个视频帧序列的时间戳作为基准时间等。
S202、针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量。
在本申请另一实施例中,所述针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧的步骤,和所述估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量的步骤,这两个步骤可以同时进行,也可以任意一个步骤在前,另一个步骤在后。
在本申请另一实施例中,所述以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准具体为:
以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧中有重叠区域的两幅视频帧进行两两配准。
所述参考坐标系可以为第一帧融合后视频帧的参考系或拍摄第一帧视频帧时IMU(Inertial measurement unit,惯性测量单元)状态的参考系或者地球坐标系。所述第一帧视频帧和所述基准图像是由同一个摄像头拍摄的。
当参考坐标系为第一帧视频帧的参考系时,采用视觉运动估计算法估算所述基准图像相对参考坐标系的运动旋转量;
当参考坐标系为拍摄第一帧视频帧时惯性测量单元状态的参考系或者地球坐标系时,采用惯性测量单元方法估算所述基准图像相对参考坐标系的运动旋转量;
或者,所述估算所述基准图像相对参考坐标系的运动旋转量具体为:结合所述视觉运动估计算法和所述惯性测量单元方法估算所述基准图像相对参考坐标系的运动旋转量。
所述采用视觉运动估计算法估算所述基准图像相对参考坐标系的运动旋转量具体包括:
实时或离线更新关键帧K,得到所有关键帧K,分别计算每个关键帧K相对第一帧 视频帧的旋转量q K_0,所述关键帧K和第一帧视频帧是由同一个摄像头拍摄的;
计算所述基准图像N和与所述基准图像N匹配的同名点最多的关键帧K之间的相对旋转量q N_k
获得所述基准图像N相对第一帧视频帧的第一旋转量q N_0,其中,q N_0=q N_K·q K_0
采用光束平差法对第一旋转量q N_0进行优化,得到第二旋转量q′ N_0,将所述第二旋转量q′ N_0作为所述基准图像相对第一帧视频帧的运动旋转量。
所述实时或离线更新关键帧具体为:
将第一帧视频帧设置为关键帧,判断所述基准图像与关键帧的视场之间的交叠度和特征点关联个数,当交叠度和特征点关联个数大于或等于预设值时,保持第一帧视频帧为关键帧不变;当交叠度和特征点关联个数小于预设值时,更新关键帧,将所述基准图像设置为关键帧。
所述对所述运动旋转量进行平滑,得到平滑的旋转量具体为:
采用控制裁剪余度的方式对所述运动旋转量进行平滑,得到平滑的旋转量。
S203、采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
在本申请另一实施例中,S203具体可以为:
对每个融合后的视频帧进行3D旋转,渲染获得输出视频帧和/或视频,其中,3D旋转的旋转量Δq计算公式为:
Figure PCTCN2021111265-appb-000003
其中,
Figure PCTCN2021111265-appb-000004
是平滑的旋转量。
在本申请另一实施例中,当输出视频时,具体是先输出视频帧,然后将输出的所有视频帧按时间顺序接起来生成视频。
请参阅图7,本申请另一实施例提供的图像处理装置可以是运行于计算机设备、终端或相机中的一个计算机程序或一段程序代码,例如该图像处理装置为一个应用软件;该图像处理装置可以用于执行本申请另一实施例提供的图像处理方法中的相应步骤。本申请另一实施例提供的图像处理装置包括:
第二同步模块21,用于获取多个视频帧序列,分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
第二融合模块22,用于针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分 别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
第二平滑模块23,用于估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量;
第二渲染模块24,用于采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
本申请另一实施例提供的图像处理装置与本申请另一实施例提供的图像处理方法属于同一构思,其具体实现过程详见说明书全文,此处不再赘述。
本申请一实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如本申请一实施例和另一实施例提供的图像处理方法的步骤。
图8示出了本申请一实施例提供的计算机设备的具体结构框图,该计算机设备可以是图1、图2和图3中所示的计算机设备,一种计算机设备100包括:一个或多个处理器101、存储器102、以及一个或多个计算机程序,其中所述处理器101和所述存储器102通过总线连接,所述一个或多个计算机程序被存储在所述存储器102中,并且被配置成由所述一个或多个处理器101执行,所述处理器101执行所述计算机程序时实现如本申请一实施例和另一实施例提供的图像处理方法的步骤。
计算机设备100可以是服务器、台式计算机、平板电脑、笔记本电脑、个人数字助理等。
图9示出了本申请一实施例提供的终端的具体结构框图,一种终端500包括:一个或多个处理器201、存储器202、以及一个或多个计算机程序,其中所述处理器201和所述存储器202通过总线连接,所述一个或多个计算机程序被存储在所述存储器202中,并且被配置成由所述一个或多个处理器201执行,所述处理器201执行所述计算机程序时实现如本申请一实施例和另一实施例提供的图像处理方法的步骤。
图10示出了本申请一实施例提供的相机的具体结构框图,一种相机600包括:一个或多个处理器301、存储器302、以及一个或多个计算机程序,其中所述处理器301和所述存储器302通过总线连接,所述一个或多个计算机程序被存储在所述存储器302中,并且被配置成由所述一个或多个处理器301执行,所述处理器301执行所述计算机程序时实现如本申请一实施例和另一实施例提供的图像处理方法的步骤。
在本申请另一实施例中,由于对多个由多个摄像头拍摄的视频帧序列进行同步,再进行配准融合,生成融合后的视频帧,因此可以生成视角更广的视频帧和/或视频。又由于并估算运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量;采用平滑的旋 转量对融合后的视频帧进行旋转和渲染,输出视频帧和/或视频;因此可以生成高清、稳定的视频帧和/或视频。此外,本申请的图像处理方法处理速度快、功耗低,具有很强的鲁棒性。
应该理解的是,本申请各实施例中的各个步骤并不是必然按照步骤标号指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,各实施例中至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (26)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
    分别对所述多个视频帧序列中的每组同步的视频帧进行配准;
    分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
    估算每个融合后的视频帧相对参考坐标系的运动旋转量;
    对所述运动旋转量进行平滑,得到平滑的旋转量;
    采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
  2. 如权利要求1所述的图像处理方法,其特征在于,所述多个摄像头位于一个终端或者相机,或者位于多个终端和/或相机。
  3. 如权利要求2所述的图像处理方法,其特征在于,当所述多个摄像头位于一个终端或者相机时,所述对所述多个视频帧序列进行同步具体为:
    分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步。
  4. 如权利要求2所述的图像处理方法,其特征在于,当所述多个摄像头位于多个终端和/或相机时,所述对所述多个视频帧序列进行同步具体为:
    分别提取多个视频帧序列对应的陀螺仪信号,通过所述多个视频帧序列对应的陀螺仪信号对所述多个视频帧序列进行同步。
  5. 如权利要求3所述的图像处理方法,其特征在于,所述通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步具体为:
    采用基准时间将所述多个视频帧序列的时间戳保持同步。
  6. 如权利要求1所述的图像处理方法,其特征在于,所述对所述多个视频帧序列中的每组同步的视频帧进行配准具体为:
    对所述多个视频帧序列中的每组同步的视频帧中有重叠区域的两幅视频帧进行两两配准。
  7. 如权利要求1所述的图像处理方法,其特征在于,所述参考坐标系为第一帧融合后的视频帧的参考系、拍摄第一帧视频帧时惯性测量单元状态的参考系或者地球坐标系;
    当所述参考坐标系为所述第一帧融合后的视频帧的参考系时,所述估算每个融合后的视频帧相对参考坐标系的运动旋转量具体为:采用视觉运动估计算法估算每个融合后的视频帧相对所述第一帧融合后的视频帧的参考系的运动旋转量;
    当所述参考坐标系为拍摄第一帧视频帧时惯性测量单元状态的参考系或者地球坐标系 时,所述估算每个融合后的视频帧相对参考坐标系的运动旋转量具体为:采用惯性测量单元方法估算每个融合后的视频帧相对所述参考坐标系的运动旋转量;
    或者,
    所述估算每个融合后的视频帧相对参考坐标系的运动旋转量具体为:结合所述视觉运动估计算法和所述惯性测量单元方法估算每个融合后的视频帧相对所述参考坐标系的运动旋转量。
  8. 如权利要求7所述的图像处理方法,其特征在于,所述采用视觉运动估计算法估算每个融合后的视频帧相对所述第一帧融合后的视频帧的参考系的运动旋转量具体包括:
    实时或离线更新关键帧K,得到所有关键帧K,分别计算每个关键帧K相对所述第一帧融合后的视频帧的旋转量q K_0
    计算融合后的视频帧N和与所述融合后的视频帧N匹配的同名点最多的关键帧K之间的相对旋转量q N_k
    获得所述融合后的视频帧N相对所述第一帧融合后的视频帧的第一旋转量q N_0,其中,q N_0=q N_K·q K_0
    采用光束平差法对所述第一旋转量q N_0进行优化,得到第二旋转量q′ N_0,将所述第二旋转量q′ N_0作为融合后的视频帧相对第一帧融合后的视频帧的运动旋转量。
  9. 如权利要求8所述的图像处理方法,其特征在于,所述实时或离线更新关键帧具体为:
    将所述第一帧融合后的视频帧设置为关键帧,判断当前融合后的视频帧与关键帧的视场之间的交叠度和特征点关联个数,当交叠度和特征点关联个数大于或等于预设值时,保持所述第一帧融合后的视频帧为关键帧不变;当交叠度和特征点关联个数小于预设值时,更新关键帧,将所述当前融合后的视频帧设置为关键帧。
  10. 如权利要求1至9中任意一项所述的图像处理方法,其特征在于,所述对所述运动旋转量进行平滑,得到平滑的旋转量具体为:
    采用控制裁剪余度的方式对所述运动旋转量进行平滑,得到平滑的旋转量。
  11. 如权利要求8所述的图像处理方法,其特征在于,所述采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频具体为:
    对每个融合后的视频帧进行3D旋转,渲染获得输出视频帧和/或视频,其中,3D旋转的旋转量Δq计算公式为:
    Figure PCTCN2021111265-appb-100001
    其中,
    Figure PCTCN2021111265-appb-100002
    是平滑的旋转量。
  12. 一种图像处理装置,其特征在于,所述装置包括:
    第一同步模块,用于获取多个视频帧序列,并对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
    第一配准模块,用于分别对所述多个视频帧序列中的每组同步的视频帧进行配准;
    第一融合模块,用于分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
    第一运动估算模块,用于估算每个融合后的视频帧相对参考坐标系的运动旋转量;
    第一平滑模块,用于对所述运动旋转量进行平滑,得到平滑的旋转量;
    第一渲染模块,用于采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
  13. 一种图像处理方法,其特征在于,所述方法包括:
    获取多个视频帧序列,分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
    针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
    估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量;
    采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
  14. 如权利要求13所述的图像处理方法,其特征在于,所述多个摄像头位于一个终端或者相机。
  15. 如权利要求13所述的图像处理方法,其特征在于,所述通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步具体为:
    采用基准时间将所述多个视频帧序列的时间戳保持同步。
  16. 如权利要求13所述的图像处理方法,其特征在于,所述以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准具体为:以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧中有重叠区域的两幅视频帧进行两两配准。
  17. 如权利要求14所述的图像处理方法,其特征在于,所述参考坐标系为第一帧视频帧的参考系、拍摄第一帧视频帧时惯性测量单元状态的参考系或者地球坐标系;所述第一帧视频帧和所述基准图像是由同一个摄像头拍摄的;
    当所述参考坐标系为第一帧视频帧的参考系时,所述估算所述基准图像相对参考坐标系的运动旋转量具体为:采用视觉运动估计算法估算所述基准图像相对所述参考坐标系的运动旋转量;
    当所述参考坐标系为拍摄第一帧视频帧时惯性测量单元状态的参考系或者地球坐标系时,所述估算所述基准图像相对参考坐标系的运动旋转量具体为:采用惯性测量单元方法估算所述基准图像相对所述参考坐标系的运动旋转量;
    或者,
    所述估算所述基准图像相对参考坐标系的运动旋转量具体为:结合所述视觉运动估计算法和所述惯性测量单元方法估算所述基准图像相对所述参考坐标系的运动旋转量。
  18. 如权利要求17所述的图像处理方法,其特征在于,所述采用视觉运动估计算法估算所述基准图像相对所述参考坐标系的运动旋转量具体包括:
    实时或离线更新关键帧K,得到所有关键帧K,分别计算每个关键帧K相对所述第一帧视频帧的旋转量q K_0,所述关键帧K和第一帧视频帧是由同一个摄像头拍摄的;
    计算所述基准图像N和与所述基准图像N匹配的同名点最多的关键帧K之间的相对旋转量q N_k
    获得所述基准图像N相对第一帧视频帧的第一旋转量q N_0,其中,q N_0=q N_K·q K_0
    采用光束平差法对所述第一旋转量q N_0进行优化,得到第二旋转量q′ N_0,将所述第二旋转量q′ N_0作为所述基准图像相对第一帧视频帧的运动旋转量。
  19. 如权利要求18所述的图像处理方法,其特征在于,所述实时或离线更新关键帧具体为:
    将所述第一帧视频帧设置为关键帧,判断所述基准图像与关键帧的视场之间的交叠度和特征点关联个数,当交叠度和特征点关联个数大于或等于预设值时,保持所述第一帧视频帧为关键帧不变;当交叠度和特征点关联个数小于预设值时,更新关键帧,将所述基准图像设置为关键帧。
  20. 如权利要求13至19任一项所述的图像处理方法,其特征在于,所述对所述运动旋转量进行平滑,得到平滑的旋转量具体为:
    采用控制裁剪余度的方式对所述运动旋转量进行平滑,得到平滑的旋转量。
  21. 如权利要求18所述的图像处理方法,其特征在于,所述采用平滑的旋转量对每 个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频具体为:
    对每个融合后的视频帧进行3D旋转,渲染获得输出视频帧和/或视频,其中,3D旋转的旋转量Δq计算公式为:
    Figure PCTCN2021111265-appb-100003
    其中,
    Figure PCTCN2021111265-appb-100004
    是平滑的旋转量。
  22. 一种图像处理装置,其特征在于,所述装置包括:
    第二同步模块,用于获取多个视频帧序列,分别提取多个视频帧序列的时间戳,通过所述多个视频帧序列的时间戳对所述多个视频帧序列进行同步,所述多个视频帧序列分别由多个摄像头拍摄;
    第二融合模块,用于针对所述多个视频帧序列中的每组同步的视频帧,以所述每组同步的视频帧中的任一幅视频帧作为基准图像分别对每组同步的视频帧进行配准,分别将配准后的每组同步的视频帧进行融合,生成融合后的视频帧;
    第二平滑模块,用于估算所述基准图像相对参考坐标系的运动旋转量,对所述运动旋转量进行平滑,得到平滑的旋转量;
    第二渲染模块,用于采用平滑的旋转量对每个融合后的视频帧进行旋转和渲染,输出视频帧和/或视频。
  23. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至11和13至21任一项所述的图像处理方法的步骤。
  24. 一种计算机设备,包括:
    一个或多个处理器;
    存储器;以及
    一个或多个计算机程序,所述处理器和所述存储器通过总线连接,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至11和13至21任一项所述的图像处理方法的步骤。
  25. 一种相机,包括:
    一个或多个处理器;
    存储器;以及
    一个或多个计算机程序,所述处理器和所述存储器通过总线连接,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至11和13至21任一项所 述的图像处理方法的步骤。
  26. 一种终端,包括:
    一个或多个处理器;
    存储器;以及
    一个或多个计算机程序,所述处理器和所述存储器通过总线连接,其中所述一个或多个计算机程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至11和13至21任一项所述的图像处理方法的步骤。
PCT/CN2021/111265 2020-08-06 2021-08-06 图像处理方法、装置、计算机可读存储介质及计算机设备 WO2022028595A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010784882.0A CN112017216B (zh) 2020-08-06 2020-08-06 图像处理方法、装置、计算机可读存储介质及计算机设备
CN202010784882.0 2020-08-06

Publications (1)

Publication Number Publication Date
WO2022028595A1 true WO2022028595A1 (zh) 2022-02-10

Family

ID=73500151

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111265 WO2022028595A1 (zh) 2020-08-06 2021-08-06 图像处理方法、装置、计算机可读存储介质及计算机设备

Country Status (2)

Country Link
CN (1) CN112017216B (zh)
WO (1) WO2022028595A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116485858A (zh) * 2023-06-25 2023-07-25 中国人民解放军国防科技大学 基于多尺度跨模态邻域描述子的异源图像配准方法及装置
CN116993927A (zh) * 2023-09-26 2023-11-03 深圳探谱特科技有限公司 一种基于热成像的流体融合成像方法、装置以及系统

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017216B (zh) * 2020-08-06 2023-10-27 影石创新科技股份有限公司 图像处理方法、装置、计算机可读存储介质及计算机设备
CN112712549A (zh) * 2020-12-31 2021-04-27 上海商汤临港智能科技有限公司 数据处理方法、装置、电子设备以及存储介质
CN113052056A (zh) * 2021-03-19 2021-06-29 华为技术有限公司 一种视频处理的方法以及装置
CN113242431B (zh) * 2021-05-13 2023-04-25 山西省智慧交通研究院有限公司 一种面向路侧感知的标注数据预处理方法
CN114612613B (zh) * 2022-03-07 2022-11-29 北京拙河科技有限公司 动态光场重建方法及系统
CN114449130B (zh) * 2022-03-07 2022-09-09 北京拙河科技有限公司 一种多摄像头的视频融合方法及系统
CN114612360B (zh) * 2022-03-11 2022-10-18 北京拙河科技有限公司 基于运动模型的视频融合方法及系统
CN115550563A (zh) * 2022-09-13 2022-12-30 影石创新科技股份有限公司 视频处理方法、装置、计算机设备和存储介质
CN117746513B (zh) * 2024-02-19 2024-04-30 成都体育学院 基于视频运动目标检测与融合的运动技术教学方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103269413A (zh) * 2013-05-13 2013-08-28 重庆大学 一种多源视频融合系统
CN105222789A (zh) * 2015-10-23 2016-01-06 哈尔滨工业大学 一种基于激光测距传感器的楼宇室内平面图建立方法
CN109961394A (zh) * 2017-12-23 2019-07-02 沈阳灵景智能科技有限公司 一种mri/pet/ct/pet-ct全景视频辅助系统
CN110519507A (zh) * 2019-07-23 2019-11-29 深圳岚锋创视网络科技有限公司 一种相机镜头平滑处理方法、装置及便携式终端
CN111242975A (zh) * 2020-01-07 2020-06-05 影石创新科技股份有限公司 自动调整视角的全景视频渲染方法、存储介质及计算机设备
CN112017215A (zh) * 2020-08-06 2020-12-01 影石创新科技股份有限公司 图像处理方法、装置、计算机可读存储介质及计算机设备
CN112017216A (zh) * 2020-08-06 2020-12-01 影石创新科技股份有限公司 图像处理方法、装置、计算机可读存储介质及计算机设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10547784B2 (en) * 2017-06-19 2020-01-28 SighTour Technologies, Inc. Image stabilization
US20190045213A1 (en) * 2017-08-03 2019-02-07 Intel Corporation Reference frame reprojection for improved video coding
JP7487464B2 (ja) * 2018-11-30 2024-05-21 株式会社リコー 画像処理装置、撮像装置、動画再生システム、方法およびプログラム

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103269413A (zh) * 2013-05-13 2013-08-28 重庆大学 一种多源视频融合系统
CN105222789A (zh) * 2015-10-23 2016-01-06 哈尔滨工业大学 一种基于激光测距传感器的楼宇室内平面图建立方法
CN109961394A (zh) * 2017-12-23 2019-07-02 沈阳灵景智能科技有限公司 一种mri/pet/ct/pet-ct全景视频辅助系统
CN110519507A (zh) * 2019-07-23 2019-11-29 深圳岚锋创视网络科技有限公司 一种相机镜头平滑处理方法、装置及便携式终端
CN111242975A (zh) * 2020-01-07 2020-06-05 影石创新科技股份有限公司 自动调整视角的全景视频渲染方法、存储介质及计算机设备
CN112017215A (zh) * 2020-08-06 2020-12-01 影石创新科技股份有限公司 图像处理方法、装置、计算机可读存储介质及计算机设备
CN112017216A (zh) * 2020-08-06 2020-12-01 影石创新科技股份有限公司 图像处理方法、装置、计算机可读存储介质及计算机设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116485858A (zh) * 2023-06-25 2023-07-25 中国人民解放军国防科技大学 基于多尺度跨模态邻域描述子的异源图像配准方法及装置
CN116485858B (zh) * 2023-06-25 2023-09-01 中国人民解放军国防科技大学 基于多尺度跨模态邻域描述子的异源图像配准方法及装置
CN116993927A (zh) * 2023-09-26 2023-11-03 深圳探谱特科技有限公司 一种基于热成像的流体融合成像方法、装置以及系统
CN116993927B (zh) * 2023-09-26 2024-01-05 深圳探谱特科技有限公司 一种基于热成像的流体融合成像方法、装置以及系统

Also Published As

Publication number Publication date
CN112017216A (zh) 2020-12-01
CN112017216B (zh) 2023-10-27

Similar Documents

Publication Publication Date Title
WO2022028595A1 (zh) 图像处理方法、装置、计算机可读存储介质及计算机设备
WO2022028594A1 (zh) 图像处理方法、装置、计算机可读存储介质及计算机设备
US9177384B2 (en) Sequential rolling bundle adjustment
WO2020014909A1 (zh) 拍摄方法、装置和无人机
WO2019119328A1 (zh) 一种基于视觉的定位方法及飞行器
US8131113B1 (en) Method and apparatus for estimating rotation, focal lengths and radial distortion in panoramic image stitching
Tanskanen et al. Live metric 3D reconstruction on mobile phones
KR102367361B1 (ko) 위치 측정 및 동시 지도화 방법 및 장치
CN111127524A (zh) 一种轨迹跟踪与三维重建方法、系统及装置
WO2020007320A1 (zh) 多视角图像的融合方法、装置、计算机设备和存储介质
KR100982192B1 (ko) 사진의 촬영 위치 및 방향 정보 태깅 방법과 그 장치
Jia et al. Online calibration and synchronization of cellphone camera and gyroscope
CN110660098A (zh) 基于单目视觉的定位方法和装置
CN111882655B (zh) 三维重建的方法、装置、系统、计算机设备和存储介质
KR101938067B1 (ko) Sift 플로우를 이용한 광각영상의 스테레오 정합 방법 및 장치
CN115705651A (zh) 视频运动估计方法、装置、设备和计算机可读存储介质
Dasari et al. A joint visual-inertial image registration for mobile HDR imaging
CN110796690B (zh) 图像匹配方法和图像匹配装置
CN116579923A (zh) 图像拼接方法、设备及存储介质
WO2021114883A1 (zh) 图像配准方法、终端及存储介质
WO2022179555A1 (zh) 视频数据的防抖处理方法、装置、计算机设备和存储介质
WO2020146965A1 (zh) 图像重新聚焦的控制方法及系统
Yuan et al. A novel method for geometric correction of multi-cameras in panoramic video system
CN113642451B (zh) 确定视频的匹配性的方法、装置、设备及可读记录介质
Coito et al. Building and evaluation of a mosaic of images using aerial photographs

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21854526

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21854526

Country of ref document: EP

Kind code of ref document: A1