[go: up one dir, main page]

CN112367460B - Video anti-shake method and device - Google Patents

Video anti-shake method and device Download PDF

Info

Publication number
CN112367460B
CN112367460B CN202011147197.3A CN202011147197A CN112367460B CN 112367460 B CN112367460 B CN 112367460B CN 202011147197 A CN202011147197 A CN 202011147197A CN 112367460 B CN112367460 B CN 112367460B
Authority
CN
China
Prior art keywords
frame picture
picture
current frame
angle
recorded
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202011147197.3A
Other languages
Chinese (zh)
Other versions
CN112367460A (en
Inventor
陆寅辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zongzhang Technology Group Co.,Ltd.
Original Assignee
Shanghai Zhangmen Science and Technology Co Ltd
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 Shanghai Zhangmen Science and Technology Co Ltd filed Critical Shanghai Zhangmen Science and Technology Co Ltd
Priority to CN202011147197.3A priority Critical patent/CN112367460B/en
Publication of CN112367460A publication Critical patent/CN112367460A/en
Application granted granted Critical
Publication of CN112367460B publication Critical patent/CN112367460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6811Motion detection based on the image signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/683Vibration or motion blur correction performed by a processor, e.g. controlling the readout of an image memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application aims to provide a video anti-shaking method, which comprises the following steps: responding to the recording operation of a user, and acquiring a frame picture to be processed, wherein the frame picture to be processed comprises a current frame picture and a previous frame picture of the current frame picture; determining offset information of the image information in the current frame picture relative to the image information in the previous frame picture according to the image information in the current frame picture and the previous frame picture; performing picture processing on the current frame picture according to the offset information to obtain a processed current frame picture; and combining the processed current frame picture and the previous frame picture according to the video frame sequence to generate a recorded video. The processed image information in the current frame picture and the processed image information in the previous frame picture are positioned on the same horizontal line, so that the recorded video is prevented from shaking and affecting the quality of the recorded video.

Description

一种视频防抖方法与设备A kind of video anti-shake method and device

技术领域technical field

本申请涉及通信领域,尤其涉及一种用于视频防抖的技术。The present application relates to the field of communications, and in particular, to a technology for video stabilization.

背景技术Background technique

视频(Video)泛指将一系列静态影像以电信号的方式加以捕捉、纪录、处理、储存、传送与重现的各种技术。连续的图像变化每秒超过24帧(frame)画面以上时,根据视觉暂留原理,人眼无法辨别单幅的静态画面;看上去是平滑连续的视觉效果,这样连续的画面叫做视频。Video generally refers to various technologies that capture, record, process, store, transmit and reproduce a series of static images in the form of electrical signals. When the continuous image changes exceed 24 frames per second, according to the principle of persistence of vision, the human eye cannot distinguish a single static image; it appears to be a smooth and continuous visual effect, and such a continuous image is called a video.

随着时代的发展,越来越多的用户会通过拍摄视频的方式来记录生活,或者制作各式各样的影视作品。根据应用的不同,对视频拍摄的要求也不同,但是最基本的要求就是在拍摄的过程中尽量不能抖动,抖动会严重影响视频拍摄的效果。With the development of the times, more and more users will record their lives by shooting videos, or produce various film and television works. According to different applications, the requirements for video shooting are also different, but the most basic requirement is to try not to shake during the shooting process, which will seriously affect the effect of video shooting.

发明内容SUMMARY OF THE INVENTION

本申请的一个目的是提供一种视频防抖方法与设备。An object of the present application is to provide a video anti-shake method and device.

根据本申请的一个方面,提供了一种视频防抖方法,该方法包括:According to one aspect of the present application, a video anti-shake method is provided, the method comprising:

响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括当前帧图片,以及所述当前帧图片的前一帧图片;In response to a user's recording operation, obtain a frame picture to be processed, wherein the frame picture to be processed includes a current frame picture and a previous frame picture of the current frame picture;

根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息;Determine the offset information of the image information in the current frame picture relative to the image information in the previous frame picture in the target anti-shake direction according to the image information in the current frame picture and the previous frame picture ;

根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片;Perform picture processing on the current frame picture according to the offset information to obtain the processed current frame picture;

将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。The processed picture of the current frame and the picture of the previous frame are combined according to the sequence of video frames to generate a recorded video.

根据本申请的一个方面,提供了一种视频防抖设备,该设备包括:According to an aspect of the present application, a video anti-shake device is provided, the device comprising:

一一模块,用于响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括当前帧图片,以及所述当前帧图片的前一帧图片;A module, configured to obtain a frame picture to be processed in response to a user's recording operation, wherein the frame picture to be processed includes a current frame picture and a previous frame picture of the current frame picture;

一二模块,用于根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息;Modules 1 and 2 are used to determine, according to the image information in the current frame picture and the previous frame picture, whether the image information in the current frame picture is in the target anti-shake relative to the image information in the previous frame picture Offset information in the direction;

一三模块,用于根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片;One or three modules are used to perform picture processing on the current frame picture according to the offset information to obtain the processed current frame picture;

一四模块,用于将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。A fourth module, configured to combine the processed picture of the current frame and the picture of the previous frame according to the sequence of video frames to generate a recorded video.

根据本申请的一个方面,提供了一种用于视频防抖设备,其中,该设备包括:According to an aspect of the present application, there is provided a video stabilization device, wherein the device includes:

处理器;以及processor; and

被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如上所述任一方法的操作。A memory arranged to store computer-executable instructions which, when executed, cause the processor to perform the operations of any of the methods described above.

根据本申请的一个方面,提供了一种存储指令的计算机可读介质,所述指令在被执行时使得系统进行如上所述任一方法的操作。According to one aspect of the present application, there is provided a computer-readable medium storing instructions that, when executed, cause a system to operate any of the methods described above.

与现有技术相比,本申请通过响应于用户的录制操作,获取待处理帧图片;通过根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息,根据所述偏移信息对所述当前帧图片进行图片处理,使得处理后的所述当前帧图片中的图像信息与所述前一帧图片中的图像信息处于同一水平线上,防止录制的视频产生抖动的感觉,影响录制视频的质量。Compared with the prior art, the present application obtains the frame picture to be processed in response to the user's recording operation; and determines the frame picture in the current frame picture according to the image information in the current frame picture and the previous frame picture. The offset information of the image information relative to the image information in the previous frame picture in the target anti-shake direction, and the current frame picture is processed according to the offset information, so that the processed current frame picture The image information in the picture is on the same horizontal line as the image information in the previous frame of picture, which prevents the recorded video from feeling jittery and affects the quality of the recorded video.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1示出根据本申请一个实施例的一种视频防抖方法流程图;FIG. 1 shows a flowchart of a video anti-shake method according to an embodiment of the present application;

图2示出根据本申请一个实施例的一种视频防抖方法的图片处理示意图;2 shows a schematic diagram of picture processing of a video anti-shake method according to an embodiment of the present application;

图3示出根据本申请一个实施例的一种视频防抖设备的设备结构图;3 shows a device structure diagram of a video anti-shake device according to an embodiment of the present application;

图4示出可被用于实施本申请中所述的各个实施例的示例性系统。FIG. 4 illustrates an exemplary system that may be used to implement various embodiments described in this application.

附图中相同或相似的附图标记代表相同或相似的部件。The same or similar reference numbers in the drawings represent the same or similar parts.

具体实施方式Detailed ways

下面结合附图对本申请作进一步详细描述。The present application will be described in further detail below with reference to the accompanying drawings.

在本申请一个典型的配置中,终端、服务网络的设备和可信方均包括一个或多个处理器(例如,中央处理器(Central Processing Unit,CPU))、输入/输出接口、网络接口和内存。In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party all include one or more processors (for example, a central processing unit (CPU)), an input/output interface, a network interface, and Memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RandomAccess Memory,RAM)和/或非易失性内存等形式,如只读存储器(Read Only Memory,ROM)或闪存(Flash Memory)。内存是计算机可读介质的示例。The memory may include non-persistent memory in computer readable media, random access memory (Random Access Memory, RAM) and/or non-volatile memory, such as read only memory (Read Only Memory, ROM) or flash memory (Flash). Memory). Memory is an example of a computer-readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(Phase-Change Memory,PCM)、可编程随机存取存储器(Programmable Random Access Memory,PRAM)、静态随机存取存储器(Static Random-Access Memory,SRAM)、动态随机存取存储器(Dynamic Random AccessMemory,DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能光盘(Digital Versatile Disc,DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (Phase-Change Memory, PCM), programmable random access memory (Programmable Random Access Memory, PRAM), static random access memory (Static Random-Access Memory, SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically-Erasable Programmable Read-Only Memory (Electrically-Erasable Programmable Read- Only Memory (EEPROM), flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

本申请所指设备包括但不限于终端、网络设备、或终端与网络设备通过网络相集成所构成的设备。所述终端包括但不限于任何一种可与用户进行人机交互(例如通过触摸板进行人机交互)的移动电子产品,例如智能手机、平板电脑等,所述移动电子产品可以采用任意操作系统,如Android操作系统、iOS操作系统等。其中,所述网络设备包括一种能够按照事先设定或存储的指令,自动进行数值计算和信息处理的电子设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑器件(Programmable Logic Device,PLD)、现场可编程门阵列(Field ProgrammableGate Array,FPGA)、数字信号处理器(Digital Signal Processor,DSP)、嵌入式设备等。所述网络设备包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云;在此,云由基于云计算(Cloud Computing)的大量计算机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个虚拟超级计算机。所述网络包括但不限于互联网、广域网、城域网、局域网、VPN网络、无线自组织网络(Ad Hoc网络)等。优选地,所述设备还可以是运行于所述终端、网络设备、或终端与网络设备、网络设备、触摸终端或网络设备与触摸终端通过网络相集成所构成的设备上的程序。The devices referred to in this application include but are not limited to terminals, network devices, or devices formed by integrating terminals and network devices through a network. The terminal includes but is not limited to any mobile electronic product that can perform human-computer interaction with the user (for example, human-computer interaction through a touchpad), such as a smart phone, a tablet computer, etc., and the mobile electronic product can use any operating system. , such as Android operating system, iOS operating system, etc. The network device includes an electronic device that can automatically perform numerical calculation and information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs) ), Programmable Logic Device (PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), Digital Signal Processor (Digital Signal Processor, DSP), embedded devices, etc. The network device includes, but is not limited to, a computer, a network host, a single network server, multiple network server sets, or a cloud composed of multiple servers; here, a cloud is composed of a large number of computers or network servers based on cloud computing, Among them, cloud computing is a kind of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets. The network includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless ad hoc network (Ad Hoc network), and the like. Preferably, the device may also be a program running on the terminal, a network device, or a device formed by a terminal and a network device, a network device, a touch terminal, or a network device and a touch terminal integrated through a network.

当然,本领域技术人员应能理解上述设备仅为举例,其他现有的或今后可能出现的设备如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。Of course, those skilled in the art should understand that the above-mentioned devices are only examples, and other existing or possible devices that may appear in the future, if applicable to this application, should also be included within the protection scope of this application, and are included in this application by reference. this.

在本申请的描述中,“多个”的含义是两个或者更多,除非另有明确具体的限定。In the description of this application, "plurality" means two or more, unless expressly and specifically defined otherwise.

图1示出了根据本申请一个实施例的一种视频防抖方法的方法流程图,该方法包括步骤S11、步骤S12、步骤S13以及步骤S14。在步骤S11中,用户设备响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括当前帧图片,以及所述当前帧图片的前一帧图片。在步骤S12中,用户设备根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息。在步骤S13中,用户设备根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片。在步骤S14中,用户设备将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。FIG. 1 shows a method flowchart of a video anti-shake method according to an embodiment of the present application, and the method includes step S11 , step S12 , step S13 and step S14 . In step S11, the user equipment acquires a frame picture to be processed in response to the user's recording operation, wherein the frame picture to be processed includes a current frame picture and a previous frame picture of the current frame picture. In step S12, the user equipment determines, according to the image information in the current frame picture and the image information in the previous frame picture, whether the image information in the current frame picture is relative to the image information in the previous frame picture in the target defense Offset information in the dither direction. In step S13, the user equipment performs picture processing on the current frame picture according to the offset information to obtain a processed current frame picture. In step S14, the user equipment combines the processed picture of the current frame with the picture of the previous frame according to the sequence of video frames to generate a recorded video.

具体而言,在步骤S11中,用户设备响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括当前帧图片,以及所述当前帧图片的前一帧图片。在一些实施例中,所述用户设备包括但不限于手机、平板电脑、电脑、视频拍摄设备(例如,普通相机等)等。在一些实施例中,本申请所述的方案通过安装在所述用户设备中的、对应的应用实现,例如,在所述手机、平板电脑或电脑中下载安装所述应用,通过所述应用获取所述待处理帧图片,并通过对比所述当前帧图片与所述前一帧图片,对所述当前帧图片进行图片处理,以生成所述录制视频。在另一些实施例中,本申请所述的方案通过安装在所述用户设备中的、对应的模块实现,例如,在所述视频拍摄设备中安装所述对应的模块,通过所述模块获取所述待处理帧图片,并通过对比所述当前帧图片与所述前一帧图片,对所述当前帧图片进行图片处理,以生成所述录制视频。例如,录制的视频信息可以被分拆为一帧一帧的帧图片。在一些实施例中,所述当前帧图片包括所述用户设备当前获取的帧图片;所述前一帧图片包括在所述当前帧图片之前获取的前一帧帧图片。在一些实施例中,所述待处理帧图片包括起始帧图片,所述起始帧图片需要满足起始条件,所述起始帧图片作为所述生成的录制帧视频的第一帧图片。Specifically, in step S11, the user equipment obtains a frame picture to be processed in response to a user's recording operation, wherein the frame picture to be processed includes a current frame picture and a previous frame picture of the current frame picture. In some embodiments, the user equipment includes, but is not limited to, a mobile phone, a tablet computer, a computer, a video capture device (eg, a common camera, etc.), and the like. In some embodiments, the solution described in this application is implemented by a corresponding application installed in the user equipment, for example, the application is downloaded and installed in the mobile phone, tablet or computer, and obtained through the application The to-be-processed frame picture, and by comparing the current frame picture with the previous frame picture, image processing is performed on the current frame picture to generate the recorded video. In other embodiments, the solution described in this application is implemented by a corresponding module installed in the user equipment, for example, the corresponding module is installed in the video shooting device, and the The to-be-processed frame picture is compared, and the current frame picture is subjected to picture processing by comparing the current frame picture with the previous frame picture, so as to generate the recorded video. For example, recorded video information can be split into frame-by-frame pictures. In some embodiments, the current frame picture includes a frame picture currently obtained by the user equipment; the previous frame picture includes a previous frame picture obtained before the current frame picture. In some embodiments, the frame picture to be processed includes a start frame picture, the start frame picture needs to satisfy a start condition, and the start frame picture is used as the first frame picture of the generated recording frame video.

在步骤S12中,用户设备根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息。在一些实施例中,所述图像信息包括基于图像识别技术识别出的、所述当前帧图片以及所述前一帧图片的图片内容信息(例如,所述当前帧图片或者所述前一帧图片中的桌子、椅子、房子、小狗等图片内容信息)。在一些实施例中,所述用户设备通过对比所述当前帧图片中的图像信息的位置与所述前一帧图片中的图像信息的位置,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息。在一些实施例中,所述目标防抖方向包括但不限于横向、纵向、横向和纵向等。在一些实施例中,所述用户设备仅对比所述当前帧图片与所述前一帧图片在所述目标防抖方向上的偏移信息。在一些实施例中,所述偏移信息包括但不限于具体的偏移值(例如,5cm、6cm等)。例如,所述目标防抖方向为横向,所述用户设备通过对比确定所述当前帧图片中的图像信息(例如,小狗)与所述前一帧图片中的该图像信息(例如,该小狗)在横向上的偏移信息。例如,所述目标防抖方向为横向,用户A在录制视频时,手向左抖动了5cm,则此时获取的当前帧图片中的图像信息(例如,小狗)相对于前一帧图片中的图像信息(例如,该小狗)而言,就向右偏移了5cm。所述用户设备通过对比当前帧图片中的图像信息与前一帧图片中的该图像信息,确定所述偏移信息。在一些实施例中,由于当前帧图片与所述前一帧图片的获取时间仅相差毫秒,因此,所述当前帧图片与所述前一帧图片的图像信息几乎是相同的,两者的不同可能仅仅在于,由于抖动产生的所述图像信息的位置的偏移。In step S12, the user equipment determines, according to the image information in the current frame picture and the image information in the previous frame picture, whether the image information in the current frame picture is relative to the image information in the previous frame picture in the target defense Offset information in the dither direction. In some embodiments, the image information includes picture content information of the current frame picture and the previous frame picture identified based on an image recognition technology (for example, the current frame picture or the previous frame picture table, chair, house, dog, etc. in the picture content information). In some embodiments, the user equipment determines, by comparing the position of the image information in the current frame picture and the position of the image information in the previous frame picture, that the image information in the current frame picture is relative to the image information in the previous frame picture. The offset information of the image information in the previous frame picture in the target anti-shake direction. In some embodiments, the target anti-shake direction includes, but is not limited to, landscape, portrait, landscape, and portrait. In some embodiments, the user equipment only compares the offset information of the current frame picture and the previous frame picture in the target anti-shake direction. In some embodiments, the offset information includes, but is not limited to, a specific offset value (eg, 5 cm, 6 cm, etc.). For example, the target anti-shake direction is landscape, and the user equipment determines by comparing the image information (for example, the dog) in the current frame picture with the image information (for example, the small dog) in the previous frame picture dog) offset information in the lateral direction. For example, if the target anti-shake direction is horizontal, and user A shakes his hand to the left by 5 cm when recording a video, the image information (for example, a dog) in the current frame picture obtained at this time is relative to that in the previous frame picture. In terms of image information (for example, the puppy), it is shifted to the right by 5 cm. The user equipment determines the offset information by comparing the image information in the current frame picture with the image information in the previous frame picture. In some embodiments, since the acquisition time of the current frame picture and the previous frame picture differs only by milliseconds, the image information of the current frame picture and the previous frame picture are almost the same, and the difference between the two is different. It may simply be a shift in the position of the image information due to jitter.

在步骤S13中,用户设备根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片。在一些实施例中,所述偏移信息包括偏移方向、偏移值(例如,具体的偏移数值)。在一些实施例中,所述图片处理包括但不限于裁剪、拼接。在一些实施例中,所述用户设备根据所述偏移信息对所述当前帧图片进行裁剪、拼接,以得到裁剪、拼接后的当前帧图片。具体图片处理过程请参见下面的实施例,在此不做赘述。In step S13, the user equipment performs picture processing on the current frame picture according to the offset information to obtain a processed current frame picture. In some embodiments, the offset information includes an offset direction and an offset value (eg, a specific offset value). In some embodiments, the picture processing includes but is not limited to cropping and stitching. In some embodiments, the user equipment performs cropping and splicing of the current frame picture according to the offset information, so as to obtain the cropped and spliced current frame picture. For the specific picture processing process, please refer to the following embodiments, which will not be repeated here.

在步骤S14中,用户设备将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。例如,所述用户设备实时地将处理后的所述当前帧图片与所述前一帧图片组合,从而使得组合形成的所述录制视频中的每一帧图片都是处理后的图片。In step S14, the user equipment combines the processed picture of the current frame with the picture of the previous frame according to the sequence of video frames to generate a recorded video. For example, the user equipment combines the processed picture of the current frame with the picture of the previous frame in real time, so that each frame of the picture in the recorded video formed by the combination is a processed picture.

例如,用户A正在拍地上的一只小狗,获取的当前帧图片以及所述前一帧图片中均包括该小狗。基于图像识别技术识别出所述当前帧图片中的小狗,以及所述前一帧图片中的小狗。进一步地,通过对比当前帧图片中的小狗在该当前帧图片中的位置,以及该前一帧图片中的小狗在该前一帧图片中的位置确定该小狗在目标防抖方向上的偏移信息。例如,这只小狗在当前帧图片的位置相对于前一帧图片的位置向上移动了5mm,其中,所述偏移信息包括向上偏移5mm。进一步地,根据所述偏移信息对当前帧图片进行裁剪、拼接,以使所述当前帧图片中的图像信息与所述前一帧图片中的图像信息位于同一水平线上。例如,使当前帧图片中的小狗与前一帧图片中的小狗保持在同一水平线上(或者说,位置不发生偏移)。将裁剪、拼接后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。例如,录制视频是通过一帧一帧的帧图片组合而生的,所述一帧一帧的帧图片基于录制获取的时间按照视频帧顺序组合,以生成录制视频。For example, user A is photographing a puppy on the ground, and the obtained current frame picture and the previous frame picture both include the puppy. The puppy in the current frame picture and the puppy in the previous frame picture are identified based on the image recognition technology. Further, by comparing the position of the puppy in the current frame picture in the current frame picture, and the position of the puppy in the previous frame picture in the previous frame picture, determine that the puppy is in the target anti-shake direction. offset information. For example, the position of the dog in the current frame is moved upward by 5mm relative to the position of the previous frame, wherein the offset information includes an upward offset of 5mm. Further, the current frame picture is cropped and spliced according to the offset information, so that the image information in the current frame picture and the image information in the previous frame picture are located on the same horizontal line. For example, the puppy in the current frame picture is kept on the same horizontal line as the puppy in the previous frame picture (or the position does not shift). Combine the cropped and spliced picture of the current frame with the picture of the previous frame according to the sequence of video frames to generate a recorded video. For example, the recorded video is generated by combining frame-by-frame frame pictures, and the frame-by-frame frame pictures are combined in the order of video frames based on the time obtained during the recording to generate the recorded video.

在一些实施例中,所述步骤S11包括:用户设备响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括起始帧图片、所述当前帧图片,以及所述当前帧图片的前一帧图片,所述起始帧图片满足起始条件。由于在本方案中需要通过对比所述当前帧图片与所述前一帧图片的图像信息确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息的偏移信息,因此,对于整个录制视频的起始帧图片有一定的要求,以便后续所有的帧图片都是在所述起始帧图片的基础上进行前后对比的。例如,所述起始帧图片的图像信息需呈自然摆放状态(例如,桌子的边缘与图片边缘水平)。In some embodiments, the step S11 includes: the user equipment, in response to a user's recording operation, obtains a frame picture to be processed, wherein the frame picture to be processed includes a start frame picture, the current frame picture, and the The picture of the previous frame of the picture of the current frame, the picture of the starting frame satisfies the starting condition. Because in this solution, the offset information of the image information in the current frame picture relative to the image information in the previous frame picture needs to be determined by comparing the image information of the current frame picture and the previous frame picture, Therefore, there are certain requirements for the start frame picture of the entire recorded video, so that all subsequent frame pictures are compared on the basis of the start frame picture. For example, the image information of the initial frame picture needs to be in a natural arrangement state (for example, the edge of the table is horizontal to the edge of the picture).

在一些实施例中,所述方法还包括步骤S15(未示出)。在步骤S15中,用户设备响应于所述用户的启动录制操作,获取录制帧图片;从所述录制帧图片中确定所述起始帧图片,其中,所述起始帧图片满足所述起始条件。例如,用户开始录制时,将获取的前几帧图片作为所述录制帧图片。在一些实施例中,所述录制帧图片不一定是所述待处理帧图片,例如,在用户开始录制时获取的前几帧图里图像信息呈非自然摆放状态(例如,桌子的边缘与图片边缘的夹角不是0度,即非水平)。在本实施例中,在用户进行启动录制操作时,对获取的录制帧图片进行解析,并检测每一帧录制帧图片是否满足起始条件,若满足,将该录制帧图片作为起始帧图片,若不满足,继续检测下一帧录制帧图片,直至检测到满足所述起始条件的录制帧图片。In some embodiments, the method further includes step S15 (not shown). In step S15, the user equipment acquires a recording frame picture in response to the user's starting recording operation; and determines the starting frame picture from the recording frame picture, wherein the starting frame picture satisfies the starting frame picture condition. For example, when the user starts recording, the acquired first few frames of pictures are used as the recording frame pictures. In some embodiments, the recorded frame picture is not necessarily the to-be-processed frame picture, for example, the image information in the first few frames obtained when the user starts recording is in an unnatural placement state (for example, the edge of the table and the The angle between the edges of the picture is not 0 degrees, that is, it is not horizontal). In this embodiment, when the user starts the recording operation, the obtained recording frame picture is analyzed, and whether each frame of the recording frame picture satisfies the initial condition is detected, and if so, the recording frame picture is used as the initial frame picture. , if not, continue to detect the next frame of recording frame picture until a recording frame picture that satisfies the initial condition is detected.

例如,用户A开始录制时,获取了录制帧图片1,若开始录制后,获取的第一帧录制帧图片1就满足所述起始条件,则将该录制帧图片1作为所述起始帧图片,进一步地,将该录制帧图片1作为前一帧图片,将获取的录制帧图片2作为当前帧图片,对比所述当前帧图片与所述前一帧图片中的图像信息,以确定所述偏移信息。若所述录制帧图片1不满足所述起始条件,继续获取录制帧图片2、录制帧图片3……直至检测到满足所述起始条件的录制帧图片。For example, when user A starts recording, a recording frame picture 1 is obtained. If the first frame of recording frame picture 1 obtained satisfies the starting condition after the recording starts, the recording frame picture 1 is used as the starting frame. picture, further, take the recording frame picture 1 as the previous frame picture, take the acquired recording frame picture 2 as the current frame picture, and compare the image information in the current frame picture and the previous frame picture to determine the the offset information. If the recording frame picture 1 does not meet the initial condition, continue to acquire the recording frame picture 2, the recording frame picture 3, . . . until a recording frame picture that satisfies the initial condition is detected.

在一些实施例中,所述起始条件包括所述录制帧图片的倾斜角度等于或小于角度阈值;所述从所述录制帧图片中确定所述起始帧图片,包括步骤S16(未示出)以及步骤S17。在步骤S16中,用户设备确定所述录制帧图片的倾斜角度;在步骤S17中,若所述录制帧图片的倾斜角度等于或小于角度阈值,用户设备确定该录制帧图片满足所述起始条件,并将该录制帧图片作为所述起始帧图片。在一些实施例中,所述用户设备中预设所述倾斜角度的角度阈值,当所述录制帧图片的倾斜角度小于或等于所述角度阈值时,确定该录制帧图片满足所述起始条件。在一些实施例中,所述录制帧图片的倾斜角度就是所述录制帧图片的图片角度(例如,所述录制帧图片中图像信息的摆放角度);在另一些实施例中,所述录制帧图片的倾斜角度是基于所述录制帧图片的图片角度,以及所述用户设备的设备角度计算获得的。In some embodiments, the starting condition includes that the inclination angle of the recorded frame picture is equal to or less than an angle threshold; the determining the starting frame picture from the recorded frame picture includes step S16 (not shown). ) and step S17. In step S16, the user equipment determines the inclination angle of the recorded frame picture; in step S17, if the inclination angle of the recorded frame picture is equal to or less than the angle threshold, the user equipment determines that the recorded frame picture satisfies the initial condition , and use the recording frame picture as the starting frame picture. In some embodiments, an angle threshold of the tilt angle is preset in the user equipment, and when the tilt angle of the recorded frame picture is less than or equal to the angle threshold, it is determined that the recorded frame picture satisfies the initial condition . In some embodiments, the inclination angle of the recorded frame picture is the picture angle of the recorded frame picture (for example, the placement angle of the image information in the recorded frame picture); in other embodiments, the recording The tilt angle of the frame picture is obtained by calculation based on the picture angle of the recorded frame picture and the device angle of the user equipment.

在一些实施例中,所述步骤S16包括:用户设备确定所述录制帧图片的图片角度,并将所述图片角度作为所述录制帧图片的倾斜角度。例如,所述录制帧图片的倾斜角度就是所述录制帧图片的图片角度。在一些实施例中,所述图片角度包括所述录制帧图片中图像信息的摆放角度。例如,所述图片角度包括所述录制帧图片中图像信息与该录制帧图片的边缘的角度,例如,所述图像信息包括桌子,所述图片角度为桌子与该录制帧图片的图片边缘的角度。In some embodiments, the step S16 includes: the user equipment determines a picture angle of the recorded frame picture, and uses the picture angle as the inclination angle of the recorded frame picture. For example, the inclination angle of the recorded frame picture is the picture angle of the recorded frame picture. In some embodiments, the picture angle includes an arrangement angle of image information in the recorded frame picture. For example, the picture angle includes the angle between the image information in the recording frame picture and the edge of the recording frame picture, for example, the image information includes a table, and the picture angle is the angle between the table and the picture edge of the recording frame picture .

在另一些实施例中,所述步骤S16包括:用户设备确定所述录制帧图片的图片角度,并通过角度传感器所述用户设备的设备角度;用户设备根据所述图片角度以及所述设备角度计算所述录制帧图片的倾斜角度。例如,所述用户设备包括手机,通过手机的角度传感器获取手机的角度,并将该角度作为所述设备角度。在一些实施例中,所述图片角度包括所述录制帧图片中图像信息与该录制帧图片的边缘的角度,例如,所述图像信息包括桌子,所述图片角度为桌子与该录制帧图片的图片边缘的角度。在本实施例中,基于所述录制帧图片的图片角度,以及所述用户设备的设备角度计算获得的所述录制帧图片的倾斜角度。In other embodiments, the step S16 includes: the user equipment determines the picture angle of the recorded frame picture, and uses the angle sensor to obtain the device angle of the user equipment; the user equipment calculates the picture angle and the device angle according to the picture angle and the device angle. The tilt angle of the recorded frame picture. For example, the user equipment includes a mobile phone, and the angle of the mobile phone is acquired through an angle sensor of the mobile phone, and the angle is used as the device angle. In some embodiments, the picture angle includes an angle between the image information in the recording frame picture and the edge of the recording frame picture, for example, the image information includes a table, and the picture angle is the angle between the table and the recording frame picture The angle of the edge of the picture. In this embodiment, the inclination angle of the recorded frame picture is calculated and obtained based on the picture angle of the recorded frame picture and the device angle of the user equipment.

在一些实施例中,所述确定所述录制帧图片的图片角度,包括:用户设备基于图像识别技术识别所述录制帧图片的图像信息,其中,所述图像信息包括目标对象;用户设备确定所述目标对象的边缘与所述录制帧图片的边缘的夹角,并将所述夹角确定为所述录制帧图片的图片角度。例如,所述目标对象包括桌子、楼房等目标对象。所述用户设备基于图像识别技术识别所述目标对象。并将所述目标对象的边缘与所述录制帧图片的边缘之间的夹角确定为所述录制帧图片的图片角度。In some embodiments, the determining the picture angle of the recorded frame picture includes: the user equipment recognizes image information of the recorded frame picture based on an image recognition technology, wherein the image information includes a target object; the user equipment determines the image information of the recorded frame picture. The included angle between the edge of the target object and the edge of the recorded frame picture is determined, and the included angle is determined as the picture angle of the recorded frame picture. For example, the target objects include target objects such as tables and buildings. The user equipment recognizes the target object based on an image recognition technology. and the included angle between the edge of the target object and the edge of the recorded frame picture is determined as the picture angle of the recorded frame picture.

在一些实施例中,所述图片角度对应有第一权重信息;所述设备角度对应有第二权重信息;所述根据所述图片角度以及所述设备角度计算所述录制帧图片的倾斜角度,包括:根据所述设备角度、所述倾斜角度、所述第一权重信息、所述第二权重信息计算得到所述录制帧图片的倾斜角度。例如,对所述图片角度和所述设备角度分配不同的权重,基于不同的权重,以及获取的具体的图片角度以及设备角度,计算所述录制帧图片的倾斜角度。例如,所述图片角度更能反映出所述录制帧图片中图像信息的呈现状态。所述图片角度的第一权重信息为0.3;所述设备角度的第二权重信息为0.1。例如,所述图片角度为3度,所述设备角度为5度,3*0.3+5*0.1=1.4。In some embodiments, the picture angle corresponds to the first weight information; the device angle corresponds to the second weight information; the calculating the tilt angle of the recorded frame picture according to the picture angle and the device angle, The method includes: calculating and obtaining the inclination angle of the recorded frame picture according to the device angle, the inclination angle, the first weight information, and the second weight information. For example, different weights are assigned to the picture angle and the device angle, and the tilt angle of the recorded frame picture is calculated based on the different weights and the acquired specific picture angle and device angle. For example, the picture angle can better reflect the presentation state of the image information in the recorded frame picture. The first weight information of the picture angle is 0.3; the second weight information of the device angle is 0.1. For example, the picture angle is 3 degrees, the device angle is 5 degrees, 3*0.3+5*0.1=1.4.

在一些实施例中,所述方法还包括步骤S18(未示出),在步骤S18中,用户设备获取关于所述录制视频的防抖配置信息,其中,所述防抖配置信息包括所述目标防抖方向。在一些实施例中,所述防抖配置信息是用户配置输入的。例如,用户在走路时录制视频,可能更需要防止在纵向上的抖动,因此,所述用户可以设置所述目标防抖方向为纵向;再例如,用户在坐观光电梯录制视频时,可能更需要防止在横向上的抖动,因此,所述用户可以设置所述目标防抖方向为横向;再例如,用户在录制地面上的一只小狗时,可能需要防止在横向和纵向上的抖动,因此,所述用户可以设置所述目标防抖方向为横向和纵向。在本实施例中,用户可以根据自己拍摄的实际需要去设置所述防抖配置信息。在一些实施例中,所述防抖配置信息还包括图像深度等参数信息。In some embodiments, the method further includes step S18 (not shown), in which the user equipment obtains anti-shake configuration information about the recorded video, wherein the anti-shake configuration information includes the target Anti-shake direction. In some embodiments, the anti-shake configuration information is user configuration input. For example, when a user records a video while walking, it may be more necessary to prevent shaking in the vertical direction. Therefore, the user can set the target anti-shake direction to be vertical. For another example, when a user records a video in a sightseeing elevator, it may be more necessary to To prevent shaking in the horizontal direction, the user can set the target anti-shake direction to be horizontal; for another example, when the user records a puppy on the ground, he may need to prevent shaking in the horizontal and vertical directions, so , the user can set the target anti-shake direction as landscape and portrait. In this embodiment, the user can set the anti-shake configuration information according to his actual shooting needs. In some embodiments, the anti-shake configuration information further includes parameter information such as image depth.

在一些实施例中,所述目标防抖方向包括以下至少一项:In some embodiments, the target anti-shake direction includes at least one of the following:

横向;例如,当用户坐观光电梯录制视频时,所述目标防抖方向包括横向。Horizontal direction; for example, when the user takes a sightseeing elevator to record a video, the target anti-shake direction includes horizontal direction.

纵向;例如,用户走路录制视频时,所述目标防抖方向包括纵向。Portrait orientation; for example, when a user walks to record a video, the target anti-shake direction includes portrait orientation.

横向和纵向;例如,用户静止录制一座房子的视频时,所述目标防抖方向包括横向和纵向。Landscape and portrait; for example, when the user is still recording a video of a house, the target anti-shake direction includes landscape and portrait.

在一些实施例中,所述偏移信息包括偏移方向以及偏移值;所述步骤S13包括步骤S131(未示出)、步骤S132以及步骤S133。在步骤S131中,用户设备分别根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,以及所述前一帧图片的复制区域;在步骤S132中,用户设备复制所述前一帧图片的复制区域,并裁剪掉所述当前帧图片的裁剪区域;在步骤S133中,用户设备将所述复制区域拼接到裁剪后的所述当前帧图片的拼接位置,其中,所述拼接位置在所述当前帧图片所处的方位与所述裁剪区域在所述当前帧图片中所处的方位相对。在一些实施例中,所述裁剪区域是要被裁剪掉的图片区域。在一些实施例中,所述复制区域是要复制并拼接到被裁剪后的所述当前帧图片上的。在一些实施例中,所述复制区域的尺寸与所述裁剪区域的尺寸是相等的。例如,所述用户设备裁剪掉所述当前帧图片的所述裁剪区域,并复制所述前一帧图片的所述复制区域将所述复制区域拼接到被裁剪了的所述当前帧图片上。在一些实施例中,所述偏移信息包括偏移方向以及偏移值,例如,所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息向左偏移了5mm,其中,所述偏移方向为“左方”,所述偏移值为“5mm”。In some embodiments, the offset information includes an offset direction and an offset value; the step S13 includes step S131 (not shown), step S132 and step S133. In step S131, the user equipment determines the cropping area of the current frame picture and the copy area of the previous frame picture according to the offset direction and the offset value respectively; in step S132, the user equipment copies the The copy area of the previous frame picture, and crop the crop area of the current frame picture; in step S133, the user equipment splices the copy area to the cropped splicing position of the current frame picture, wherein the The orientation of the splicing position in the picture of the current frame is opposite to the orientation of the cropped region in the picture of the current frame. In some embodiments, the cropped area is a picture area to be cropped out. In some embodiments, the copied region is to be copied and spliced onto the cropped picture of the current frame. In some embodiments, the size of the copied region is equal to the size of the cropped region. For example, the user equipment crops the cropped area of the current frame picture, and copies the duplicated area of the previous frame picture, and splices the duplicated area onto the cropped current frame picture. In some embodiments, the offset information includes an offset direction and an offset value, for example, the image information in the current frame picture is shifted to the left by 5 mm relative to the image information in the previous frame picture, Wherein, the offset direction is "left", and the offset value is "5mm".

在一些实施例中,所述根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,包括:根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,其中,所述裁剪区域在所述当前帧图片中所处的方位与所述偏移方向相反,所述裁剪区域的长度等于所述当前帧图片的长度或宽度,所述裁剪区域的宽度等于所述偏移值。例如,所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向左偏移了5mm,则需裁剪所述当前帧图片的右边区域,将所述偏移值确定为所述裁剪区域的宽度,所述裁剪区域的长度等于所述当前帧图片的宽度。再例如,所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向上偏移了5mm,则需裁剪所述当前帧图片的下边区域,将所述偏移值确定为所述裁剪区域的宽度,所述裁剪区域的长度等于所述当前帧图片的长度。In some embodiments, the determining the cropping region of the current frame picture according to the offset direction and the offset value includes: determining the current frame picture according to the offset direction and the offset value The cropping area, wherein the orientation of the cropping area in the current frame picture is opposite to the offset direction, the length of the cropping area is equal to the length or width of the current frame picture, the cropping area The width is equal to the offset value. For example, if the image information in the current frame picture is shifted to the left by 5mm relative to the image information in the previous frame picture, the right area of the current frame picture needs to be cropped, and the offset value is determined as the The width of the cropped area, where the length of the cropped area is equal to the width of the current frame picture. For another example, if the image information in the current frame picture is shifted upward by 5mm relative to the image information in the previous frame picture, the lower area of the current frame picture needs to be cropped, and the offset value is determined as the The width of the cropped area, where the length of the cropped area is equal to the length of the current frame picture.

在一些实施例中,所述根据所述偏移方向以及所述偏移值确定所述前一帧图片的复制区域,包括:根据所述偏移方向以及所述偏移值确定所述前一帧图片的复制区域,其中,所述复制区域在所述前一帧图片中所处的方位与所述偏移方向相同,所述复制区域的长度等于所述前一帧图片的长度或宽度,所述复制区域的宽度等于所述偏移值。例如,参考图2,图2(b)为当前帧图片,图2(a)为前一帧图片,图2(c)为裁剪、拼接后的所述当前帧图片。所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向上偏移了5mm,所述当前帧图片与所述前一帧图片的长度和宽度分别为5cm*5cm。则确定所述当前帧图片的裁剪区域为下方长为5cm,宽为5mm的区域。将所述前一帧图片中上方长5cm,宽5mm的区域确定为所述复制区域,复制所述复制区域,并将所述复制区域拼接到所述当前帧图片的上方。再例如,所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向左偏移了5mm,所述当前帧图片与所述前一帧图片的长度和宽度分别为5cm*5cm。则确定所述当前帧图片的裁剪区域为右方长为5cm,宽为5mm的区域。将所述前一帧图片中左方长5cm,款5mm的区域确定为所述复制区域,复制所述复制区域,并将所述复制区域拼接到所述当前帧图片的左方。In some embodiments, the determining the copy area of the previous frame picture according to the offset direction and the offset value includes: determining the previous frame according to the offset direction and the offset value a copy area of a frame picture, wherein the orientation of the copy area in the previous frame picture is the same as the offset direction, and the length of the copy area is equal to the length or width of the previous frame picture, The width of the copied area is equal to the offset value. For example, referring to FIG. 2 , FIG. 2( b ) is the picture of the current frame, FIG. 2( a ) is the picture of the previous frame, and FIG. 2( c ) is the picture of the current frame after cropping and splicing. The image information in the current frame picture is shifted upward by 5mm relative to the image information in the previous frame picture, and the length and width of the current frame picture and the previous frame picture are respectively 5cm*5cm. Then, it is determined that the cropping area of the current frame picture is an area with a bottom length of 5 cm and a width of 5 mm. An area with a length of 5 cm and a width of 5 mm in the upper part of the picture of the previous frame is determined as the copy area, the copy area is copied, and the copied area is spliced above the picture of the current frame. For another example, the image information in the current frame picture is shifted to the left by 5mm relative to the image information in the previous frame picture, and the length and width of the current frame picture and the previous frame picture are respectively 5cm*5cm. . Then, it is determined that the cropped area of the current frame picture is an area with a right length of 5 cm and a width of 5 mm. Determine the area with a length of 5 cm and a length of 5 mm on the left side of the previous frame picture as the copy area, copy the copy area, and splicing the copy area to the left side of the current frame picture.

在一些实施例中,所述步骤S14包括:用户设备将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合;在所述用户的录制过程中,重复执行上述操作,以生成录制视频。在一些实施例中,所述录制视频是由多帧图片组合而成的。例如,所述用户设备每获取一帧当前帧图片,就根据该当前帧图片中的图像信息以及前一帧图片中图像信息,确定所述偏移信息;并基于所述偏移信息对所述当前帧图片进行图片处理,将处理后的所述当前帧图片组合到所述前一帧图片之后。进一步地,所述用户设备再获取新的当前帧图片,继续与该新的当前帧图片之前的前一帧图片进行对比,确定偏移信息,对所述新的当前帧图片进行所述图片处理,直至录制结束。在整个录制过程中,每一张帧图片都会被对比处理,以使得获取的所述录制视频中的图像处于同一水平线上,不会让用户产生图像有抖动的感觉。In some embodiments, the step S14 includes: the user equipment combines the processed picture of the current frame and the picture of the previous frame according to the sequence of video frames; during the recording process of the user, repeating the above operations , to generate a recorded video. In some embodiments, the recorded video is composed of multiple frames of pictures. For example, each time the user equipment obtains a frame of the current frame picture, it determines the offset information according to the image information in the current frame picture and the image information in the previous frame picture; and based on the offset information, the offset information is determined. The current frame picture is subjected to picture processing, and the processed current frame picture is combined after the previous frame picture. Further, the user equipment obtains a new current frame picture, continues to compare with the previous frame picture before the new current frame picture, determines offset information, and performs the picture processing on the new current frame picture , until the recording ends. During the whole recording process, each frame picture will be compared and processed, so that the obtained images in the recorded video are on the same horizontal line, and the user will not feel that the images are shaken.

图3示出了根据本申请一个实施例的一种视频防抖的用户设备的设备结构图,该设备包括一一模块、一二模块、一三模块以及一四模块。一一模块,用于响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括当前帧图片,以及所述当前帧图片的前一帧图片。一二模块,用于根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息。一三模块,用于根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片。一四模块,用于将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。FIG. 3 shows a device structure diagram of a video anti-shake user equipment according to an embodiment of the present application, the device includes a one-module, a two-module, a three-module and a four-module. A module, configured to acquire a frame picture to be processed in response to a user's recording operation, wherein the frame picture to be processed includes a current frame picture and a previous frame picture of the current frame picture. Modules 1 and 2 are used to determine, according to the image information in the current frame picture and the previous frame picture, whether the image information in the current frame picture is in the target anti-shake relative to the image information in the previous frame picture Offset information in the direction. Modules 1 and 3 are configured to perform picture processing on the current frame picture according to the offset information to obtain the processed current frame picture. A fourth module, configured to combine the processed picture of the current frame and the picture of the previous frame according to the sequence of video frames to generate a recorded video.

具体而言,一一模块,用于响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括当前帧图片,以及所述当前帧图片的前一帧图片。在一些实施例中,所述用户设备包括但不限于手机、平板电脑、电脑、视频拍摄设备(例如,普通相机等)等。在一些实施例中,本申请所述的方案通过安装在所述用户设备中的、对应的应用实现,例如,在所述手机、平板电脑或电脑中下载安装所述应用,通过所述应用获取所述待处理帧图片,并通过对比所述当前帧图片与所述前一帧图片,对所述当前帧图片进行图片处理,以生成所述录制视频。在另一些实施例中,本申请所述的方案通过安装在所述用户设备中的、对应的模块实现,例如,在所述视频拍摄设备中安装所述对应的模块,通过所述模块获取所述待处理帧图片,并通过对比所述当前帧图片与所述前一帧图片,对所述当前帧图片进行图片处理,以生成所述录制视频。例如,录制的视频信息可以被分拆为一帧一帧的帧图片。在一些实施例中,所述当前帧图片包括所述用户设备当前获取的帧图片;所述前一帧图片包括在所述当前帧图片之前获取的帧图片。在一些实施例中,所述待处理帧图片包括起始帧图片,所述起始帧图片需要满足起始条件。Specifically, each module is configured to acquire a frame picture to be processed in response to a user's recording operation, wherein the frame picture to be processed includes a current frame picture and a previous frame picture of the current frame picture. In some embodiments, the user equipment includes, but is not limited to, a mobile phone, a tablet computer, a computer, a video capture device (eg, a common camera, etc.), and the like. In some embodiments, the solution described in this application is implemented by a corresponding application installed in the user equipment, for example, the application is downloaded and installed in the mobile phone, tablet or computer, and obtained through the application The to-be-processed frame picture, and by comparing the current frame picture with the previous frame picture, image processing is performed on the current frame picture to generate the recorded video. In other embodiments, the solution described in this application is implemented by a corresponding module installed in the user equipment, for example, the corresponding module is installed in the video shooting device, and the The to-be-processed frame picture is compared, and the current frame picture is subjected to picture processing by comparing the current frame picture with the previous frame picture, so as to generate the recorded video. For example, recorded video information can be split into frame-by-frame pictures. In some embodiments, the current frame picture includes a frame picture currently obtained by the user equipment; the previous frame picture includes a frame picture obtained before the current frame picture. In some embodiments, the frame picture to be processed includes a start frame picture, and the start frame picture needs to satisfy a start condition.

一二模块,用于根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息。在一些实施例中,所述图像信息包括基于图像识别技术识别出的、所述当前帧图片以及所述前一帧图片的图片内容信息(例如,所述当前帧图片或者所述前一帧图片中的桌子、椅子、房子、小狗等图片内容信息)。在一些实施例中,所述用户设备通过对比所述当前帧图片中的图像信息的位置与所述前一帧图片中的图像信息的位置,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息。在一些实施例中,所述目标防抖方向包括但不限于横向、纵向、横向和纵向等。在一些实施例中,所述用户设备仅对比所述当前帧图片与所述前一帧图片在所述目标防抖方向上的偏移信息。在一些实施例中,所述偏移信息包括但不限于具体的偏移值(例如,5cm、6cm等)。例如,所述目标防抖方向为横向,所述用户设备通过对比确定所述当前帧图片中的图像信息(例如,小狗)与所述前一帧图片中的该图像信息,在横向上的偏移信息。例如,所述目标防抖方向为横向,用户A在录制视频时,手向左抖动了5cm,则此时获取的当前帧图片中的图像信息(例如,小狗)相对于前一帧图片中的图像信息(例如,该小狗)而言,就向右偏移了5cm。所述用户设备通过对比当前帧图片中的图像信息与前一帧图片中的该图像信息,确定所述偏移信息。在一些实施例中,由于当前帧图片与所述前一帧图片的获取时间仅相差毫秒,因此,所述当前帧图片与所述前一帧图片的图像信息几乎是相同的,两者的不同可能仅仅在于,由于抖动产生的所述图像信息的位置的偏移。Modules 1 and 2 are used to determine, according to the image information in the current frame picture and the previous frame picture, whether the image information in the current frame picture is in the target anti-shake relative to the image information in the previous frame picture Offset information in the direction. In some embodiments, the image information includes picture content information of the current frame picture and the previous frame picture identified based on an image recognition technology (for example, the current frame picture or the previous frame picture table, chair, house, dog, etc. in the picture content information). In some embodiments, the user equipment determines, by comparing the position of the image information in the current frame picture and the position of the image information in the previous frame picture, that the image information in the current frame picture is relative to the image information in the previous frame picture. The offset information of the image information in the previous frame picture in the target anti-shake direction. In some embodiments, the target anti-shake direction includes, but is not limited to, landscape, portrait, landscape, and portrait. In some embodiments, the user equipment only compares the offset information of the current frame picture and the previous frame picture in the target anti-shake direction. In some embodiments, the offset information includes, but is not limited to, a specific offset value (eg, 5 cm, 6 cm, etc.). For example, the target anti-shake direction is horizontal. offset information. For example, if the target anti-shake direction is horizontal, and user A shakes his hand to the left by 5 cm when recording a video, the image information (for example, a dog) in the current frame picture obtained at this time is relative to that in the previous frame picture. In terms of image information (for example, the puppy), it is shifted to the right by 5 cm. The user equipment determines the offset information by comparing the image information in the current frame picture with the image information in the previous frame picture. In some embodiments, since the acquisition time of the current frame picture and the previous frame picture differs only by milliseconds, the image information of the current frame picture and the previous frame picture are almost the same, and the difference between the two is different. It may simply be a shift in the position of the image information due to jitter.

一三模块,用于根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片。在一些实施例中,所述偏移信息包括偏移方向、偏移值(例如,具体的偏移数值)。在一些实施例中,所述图片处理包括但不限于裁剪、拼接。在一些实施例中,所述用户设备根据所述偏移信息对所述当前帧图片进行裁剪、拼接,以得到裁剪、拼接后的当前帧图片。具体图片处理过程请参见下面的实施例,在此不做赘述。Modules 1 and 3 are configured to perform picture processing on the current frame picture according to the offset information to obtain the processed current frame picture. In some embodiments, the offset information includes an offset direction and an offset value (eg, a specific offset value). In some embodiments, the picture processing includes but is not limited to cropping and stitching. In some embodiments, the user equipment performs cropping and splicing of the current frame picture according to the offset information, so as to obtain the cropped and spliced current frame picture. For the specific picture processing process, please refer to the following embodiments, which will not be repeated here.

一四模块,用于将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。例如,所述用户设备实时地将处理后的所述当前帧图片与所述前一帧图片组合,从而使得组合形成的所述录制视频中的每一帧图片都是处理后的图片。A fourth module, configured to combine the processed picture of the current frame and the picture of the previous frame according to the sequence of video frames to generate a recorded video. For example, the user equipment combines the processed picture of the current frame with the picture of the previous frame in real time, so that each frame of the picture in the recorded video formed by the combination is a processed picture.

例如,用户A正在拍地上的一只小狗,获取的当前帧图片以及所述前一帧图片中均包括该小狗。基于图像识别技术识别出所述当前帧图片中的小狗,以及所述前一帧图片中的小狗。进一步地,通过对比当前帧图片中的小狗在该当前帧图片中的位置,以及该前一帧图片中的小狗在该前一帧图片中的位置确定该小狗在目标防抖方向上的偏移信息。例如,这只小狗在当前帧图片的位置相对于前一帧图片的位置向上移动了5mm,其中,所述偏移信息包括向上偏移5mm。进一步地,根据所述偏移信息对当前帧图片进行裁剪、拼接,以使所述当前帧图片中的图像信息与所述前一帧图片中的图像信息位于同一水平线上。例如,使当前帧图片中的小狗与前一帧图片中的小狗保持在同一水平线上(或者说,位置不发生偏移)。将裁剪、拼接后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频。例如,录制视频是通过一帧一帧的帧图片组合而生的,所述一帧一帧的帧图片基于录制获取的时间按照视频帧顺序组合,以生成录制视频。For example, user A is photographing a puppy on the ground, and the obtained current frame picture and the previous frame picture both include the puppy. The puppy in the current frame picture and the puppy in the previous frame picture are identified based on the image recognition technology. Further, by comparing the position of the puppy in the current frame picture in the current frame picture, and the position of the puppy in the previous frame picture in the previous frame picture, determine that the puppy is in the target anti-shake direction. offset information. For example, the position of the dog in the current frame is moved upward by 5mm relative to the position of the previous frame, wherein the offset information includes an upward offset of 5mm. Further, the current frame picture is cropped and spliced according to the offset information, so that the image information in the current frame picture and the image information in the previous frame picture are located on the same horizontal line. For example, the puppy in the current frame picture is kept on the same horizontal line as the puppy in the previous frame picture (or the position does not shift). Combine the cropped and spliced picture of the current frame with the picture of the previous frame according to the sequence of video frames to generate a recorded video. For example, the recorded video is generated by combining frame-by-frame frame pictures, and the frame-by-frame frame pictures are combined in the order of video frames based on the time obtained during the recording to generate the recorded video.

在一些实施例中,所述一一模块,用于响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括起始帧图片、所述当前帧图片,以及所述当前帧图片的前一帧图片,所述起始帧图片满足起始条件。In some embodiments, the one-to-one module is configured to acquire a frame picture to be processed in response to a user's recording operation, wherein the frame picture to be processed includes a start frame picture, the current frame picture, and the The picture of the previous frame of the picture of the current frame, the picture of the starting frame satisfies the starting condition.

在此,所述一一模块对应的具体实施方式与所述步骤S11的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Here, the specific implementation manner corresponding to the one-to-one modules is the same as or similar to the specific implementation manner of the step S11, and thus will not be repeated here, but is included here by reference.

在一些实施例中,所述设备还包括一五模块(未示出)。一五模块,用于响应于所述用户的启动录制操作,获取录制帧图片;从所述录制帧图片中确定所述起始帧图片,其中,所述起始帧图片满足所述起始条件。例如,用户开始录制时,将获取的前几帧图片作为所述录制帧图片。In some embodiments, the apparatus further includes a five-module (not shown). A module 15 is configured to acquire a recording frame picture in response to the user's start-up recording operation; determine the starting frame picture from the recording frame picture, wherein the starting frame picture satisfies the starting condition . For example, when the user starts recording, the acquired first few frames of pictures are used as the recording frame pictures.

在此,所述一五模块对应的具体实施方式与所述步骤S15的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Here, the specific implementation manner corresponding to the one and five modules is the same as or similar to the specific implementation manner of the step S15, and thus will not be repeated, but is included here by reference.

在一些实施例中,所述起始条件包括所述录制帧图片的倾斜角度等于或小于角度阈值;所述从所述录制帧图片中确定所述起始帧图片,包括一六模块(未示出)以及一七模块。一六模块,用于确定所述录制帧图片的倾斜角度;一七模块,用于若所述录制帧图片的倾斜角度等于或小于角度阈值,用户设备确定该录制帧图片满足所述起始条件,并将该录制帧图片作为所述起始帧图片。In some embodiments, the initial condition includes that the inclination angle of the recorded frame picture is equal to or less than an angle threshold; the determining the initial frame picture from the recorded frame picture includes a six-module (not shown). out) and 17 modules. A six-module, for determining the inclination angle of the recorded frame picture; a seven-module, for if the inclination angle of the recorded frame picture is equal to or less than an angle threshold, the user equipment determines that the recorded frame picture satisfies the initial condition , and use the recording frame picture as the starting frame picture.

在此,所述一六模块以及一七模块对应的具体实施方式与所述步骤S16以及步骤S17的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Here, the specific implementation manners corresponding to the one six modules and the one seven modules are the same as or similar to the specific implementation implementations of the steps S16 and S17 , and thus are not repeated here, but are incorporated herein by reference.

在一些实施例中,所述一六模块用于确定所述录制帧图片的图片角度,并将所述图片角度作为所述录制帧图片的倾斜角度。In some embodiments, the one-six modules are configured to determine the picture angle of the recorded frame picture, and use the picture angle as the inclination angle of the recorded frame picture.

在此,所述一六模块对应的具体实施方式与所述步骤S16的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Herein, the specific implementation manner corresponding to the six modules is the same as or similar to the specific implementation manner of the step S16, and thus will not be repeated, but is included herein by reference.

在另一些实施例中,所述一六模块,用于确定所述录制帧图片的图片角度,并通过角度传感器所述用户设备的设备角度;用户设备根据所述图片角度以及所述设备角度计算所述录制帧图片的倾斜角度。In other embodiments, the one-six modules are configured to determine the picture angle of the recorded frame picture, and use the angle sensor to determine the device angle of the user equipment; the user equipment calculates the picture angle and the device angle according to the picture angle and the device angle. The tilt angle of the recorded frame picture.

在此,所述一六模块对应的具体实施方式与所述步骤S16的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Herein, the specific implementation manner corresponding to the six modules is the same as or similar to the specific implementation manner of the step S16, and thus will not be repeated, but is included herein by reference.

在一些实施例中,所述确定所述录制帧图片的图片角度,包括:用户设备基于图像识别技术识别所述录制帧图片的图像信息,其中,所述图像信息包括目标对象;用户设备确定所述目标对象的边缘与所述录制帧图片的边缘的夹角,并将所述夹角确定为所述录制帧图片的图片角度。例如,所述目标对象包括桌子、楼房等目标对象。所述用户设备基于图像识别技术识别所述目标对象。并将所述目标对象的边缘与所述录制帧图片的边缘之间的夹角确定为所述录制帧图片的图片角度。In some embodiments, the determining the picture angle of the recorded frame picture includes: the user equipment recognizes image information of the recorded frame picture based on an image recognition technology, wherein the image information includes a target object; the user equipment determines the image information of the recorded frame picture. The included angle between the edge of the target object and the edge of the recorded frame picture is determined, and the included angle is determined as the picture angle of the recorded frame picture. For example, the target objects include target objects such as tables and buildings. The user equipment recognizes the target object based on an image recognition technology. and the included angle between the edge of the target object and the edge of the recorded frame picture is determined as the picture angle of the recorded frame picture.

在一些实施例中,所述图片角度对应有第一权重信息;所述设备角度对应有第二权重信息;所述根据所述图片角度以及所述设备角度计算所述录制帧图片的倾斜角度,包括:根据所述设备角度、所述倾斜角度、所述第一权重信息、所述第二权重信息计算得到所述录制帧图片的倾斜角度。例如,对所述图片角度和所述设备角度分配不同的权重,基于不同的权重,以及获取的具体的图片角度以及设备角度,计算所述录制帧图片的倾斜角度。例如,所述图片角度更能反映出所述录制帧图片中图像信息的呈现状态。所述图片角度的第一权重信息为0.3;所述设备角度的第二权重信息为0.1。例如,所述图片角度为3度,所述设备角度为5度,3*0.3+5*0.1=1.4。In some embodiments, the picture angle corresponds to the first weight information; the device angle corresponds to the second weight information; the calculating the tilt angle of the recorded frame picture according to the picture angle and the device angle, The method includes: calculating and obtaining the inclination angle of the recorded frame picture according to the device angle, the inclination angle, the first weight information, and the second weight information. For example, different weights are assigned to the picture angle and the device angle, and the tilt angle of the recorded frame picture is calculated based on the different weights and the acquired specific picture angle and device angle. For example, the picture angle can better reflect the presentation state of the image information in the recorded frame picture. The first weight information of the picture angle is 0.3; the second weight information of the device angle is 0.1. For example, the picture angle is 3 degrees, the device angle is 5 degrees, 3*0.3+5*0.1=1.4.

在一些实施例中,所述设备还包括一八模块(未示出),一八模块,用于获取关于所述录制视频的防抖配置信息,其中,所述防抖配置信息包括所述目标防抖方向。In some embodiments, the device further includes an eighteen module (not shown), an eighteen module for acquiring anti-shake configuration information about the recorded video, wherein the anti-shake configuration information includes the target Anti-shake direction.

在此,所述一八模块对应的具体实施方式与所述步骤S18的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Here, the specific implementation manners corresponding to the eighth modules are the same as or similar to the specific implementation manners of the step S18 , and thus are not described again, but are incorporated herein by reference.

在一些实施例中,所述目标防抖方向包括以下至少一项:In some embodiments, the target anti-shake direction includes at least one of the following:

横向;例如,当用户坐观光电梯录制视频时,所述目标防抖方向包括横向。Horizontal direction; for example, when the user takes a sightseeing elevator to record a video, the target anti-shake direction includes horizontal direction.

纵向;例如,用户走路录制视频时,所述目标防抖方向包括纵向。Portrait orientation; for example, when a user walks to record a video, the target anti-shake direction includes portrait orientation.

横向和纵向;例如,用户静止录制一座房子的视频时,所述目标防抖方向包括横向和纵向。Landscape and portrait; for example, when the user is still recording a video of a house, the target anti-shake direction includes landscape and portrait.

在一些实施例中,所述偏移信息包括偏移方向以及偏移值;所述一三模块包括一三一模块(未示出)、一三二模块以及一三三模块。一三一模块,用于分别根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,以及所述前一帧图片的复制区域;一三二模块,用于复制所述前一帧图片的复制区域,并裁剪掉所述当前帧图片的裁剪区域;一三三模块,用于将所述复制区域拼接到裁剪后的所述当前帧图片的拼接位置,其中,所述拼接位置在所述当前帧图片所处的方位与所述裁剪区域在所述当前帧图片中所处的方位相对。In some embodiments, the offset information includes an offset direction and an offset value; the one-three modules include a one-three-one module (not shown), a one-three-two module, and a one-three-three module. The one-three-one module is used to determine the cropping area of the current frame picture and the copy area of the previous frame picture according to the offset direction and the offset value respectively; the one-three-two module is used to copy all the The copy area of the previous frame picture, and cut out the crop area of the current frame picture; a three-three module is used for splicing the copy area to the splicing position of the cropped current frame picture, wherein the The orientation of the splicing position in the picture of the current frame is opposite to the orientation of the cropped region in the picture of the current frame.

在此,所述一三一模块、一三二模块以及一三三模块对应的具体实施方式与所述步骤S131、步骤S132以及步骤S133的具体实施方式相同或相似,因而不再赘述,以引用的方式包含于此。Here, the specific implementations corresponding to the one-three-one modules, one-three-two modules, and one-three-three modules are the same as or similar to the specific implementations of the steps S131 , S132 and S133 , so they will not be repeated here, and will be cited for reference. way is included here.

在一些实施例中,所述根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,包括:根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,其中,所述裁剪区域在所述当前帧图片中所处的方位与所述偏移方向相反,所述裁剪区域的长度等于所述当前帧图片的长度或宽度,所述裁剪区域的宽度等于所述偏移值。例如,所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向左偏移了5mm,则需裁剪所述当前帧图片的右边区域,将所述偏移值确定为所述裁剪区域的宽度,所述裁剪区域的长度等于所述当前帧图片的宽度。再例如,所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向上偏移了5mm,则需裁剪所述当前帧图片的下边区域,将所述偏移值确定为所述裁剪区域的宽度,所述裁剪区域的长度等于所述当前帧图片的长度。In some embodiments, the determining the cropping region of the current frame picture according to the offset direction and the offset value includes: determining the current frame picture according to the offset direction and the offset value The cropping area, wherein the orientation of the cropping area in the current frame picture is opposite to the offset direction, the length of the cropping area is equal to the length or width of the current frame picture, the cropping area The width is equal to the offset value. For example, if the image information in the current frame picture is shifted to the left by 5mm relative to the image information in the previous frame picture, the right area of the current frame picture needs to be cropped, and the offset value is determined as the The width of the cropped area, where the length of the cropped area is equal to the width of the current frame picture. For another example, if the image information in the current frame picture is shifted upward by 5mm relative to the image information in the previous frame picture, the lower area of the current frame picture needs to be cropped, and the offset value is determined as the The width of the cropped area, where the length of the cropped area is equal to the length of the current frame picture.

在一些实施例中,所述根据所述偏移方向以及所述偏移值确定所述前一帧图片的复制区域,包括:根据所述偏移方向以及所述偏移值确定所述前一帧图片的复制区域,其中,所述复制区域在所述前一帧图片中所处的方位与所述偏移方向相同,所述复制区域的长度等于所述前一帧图片的长度或宽度,所述复制区域的宽度等于所述偏移值。例如,参考图2,图2(b)为当前帧图片,图2(a)为前一帧图片,图2(c)为裁剪、拼接后的所述当前帧图片。所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向上偏移了5mm,所述当前帧图片与所述前一帧图片的长度和宽度分别为5cm*5cm。则确定所述当前帧图片的裁剪区域为下方长为5cm,宽为5mm的区域。将所述前一帧图片中上方长5cm,宽5mm的区域确定为所述复制区域,复制所述复制区域,并将所述复制区域拼接到所述当前帧图片的上方。再例如,所述当前帧图片中的图像信息相对于前一帧图片中的图像信息向左偏移了5mm,所述当前帧图片与所述前一帧图片的长度和宽度分别为5cm*5cm。则确定所述当前帧图片的裁剪区域为右方长为5cm,宽为5mm的区域。将所述前一帧图片中左方长5cm,款5mm的区域确定为所述复制区域,复制所述复制区域,并将所述复制区域拼接到所述当前帧图片的左方。In some embodiments, the determining the copy area of the previous frame picture according to the offset direction and the offset value includes: determining the previous frame according to the offset direction and the offset value a copy area of a frame picture, wherein the orientation of the copy area in the previous frame picture is the same as the offset direction, and the length of the copy area is equal to the length or width of the previous frame picture, The width of the copied area is equal to the offset value. For example, referring to FIG. 2 , FIG. 2( b ) is the picture of the current frame, FIG. 2( a ) is the picture of the previous frame, and FIG. 2( c ) is the picture of the current frame after cropping and splicing. The image information in the current frame picture is shifted upward by 5mm relative to the image information in the previous frame picture, and the length and width of the current frame picture and the previous frame picture are respectively 5cm*5cm. Then, it is determined that the cropping area of the current frame picture is an area with a bottom length of 5 cm and a width of 5 mm. An area with a length of 5 cm and a width of 5 mm in the upper part of the picture of the previous frame is determined as the copy area, the copy area is copied, and the copied area is spliced above the picture of the current frame. For another example, the image information in the current frame picture is shifted to the left by 5mm relative to the image information in the previous frame picture, and the length and width of the current frame picture and the previous frame picture are respectively 5cm*5cm. . Then, it is determined that the cropped area of the current frame picture is an area with a right length of 5 cm and a width of 5 mm. Determine the area with a length of 5 cm and a length of 5 mm on the left side of the previous frame picture as the copy area, copy the copy area, and splicing the copy area to the left side of the current frame picture.

在一些实施例中,所述一四模块用于:将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合;在所述用户的录制过程中,重复执行上述操作,以生成录制视频。In some embodiments, the one-fourth module is used to: combine the processed current frame picture and the previous frame picture according to the video frame sequence; during the recording process of the user, repeat the above operations , to generate a recorded video.

除上述各实施例介绍的方法和设备外,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机代码,当所述计算机代码被执行时,如前任一项所述的方法被执行。In addition to the methods and devices described in the above-mentioned embodiments, the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores computer codes, when the computer codes are executed, as in any of the previous The described method is executed.

本申请还提供了一种计算机程序产品,当所述计算机程序产品被计算机设备执行时,如前任一项所述的方法被执行。The present application also provides a computer program product, when the computer program product is executed by a computer device, the method according to any one of the preceding items is executed.

本申请还提供了一种计算机设备,所述计算机设备包括:The present application also provides a computer device, the computer device comprising:

一个或多个处理器;one or more processors;

存储器,用于存储一个或多个计算机程序;memory for storing one or more computer programs;

当所述一个或多个计算机程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如前任一项所述的方法。The one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the method of any preceding item.

图4示出了可被用于实施本申请中所述的各个实施例的示例性系统;FIG. 4 illustrates an exemplary system that may be used to implement various embodiments described in this application;

如图4所示在一些实施例中,系统300能够作为各所述实施例中的任意一个设备。在一些实施例中,系统300可包括具有指令的一个或多个计算机可读介质(例如,系统存储器或NVM/存储设备320)以及与该一个或多个计算机可读介质耦合并被配置为执行指令以实现模块从而执行本申请中所述的动作的一个或多个处理器(例如,(一个或多个)处理器305)。In some embodiments, as shown in FIG. 4, system 300 can function as any of the devices in each of the described embodiments. In some embodiments, system 300 may include one or more computer-readable media (eg, system memory or NVM/storage device 320 ) having instructions and be coupled to the one or more computer-readable media and configured to execute Instructions to implement a module to perform one or more processors (eg, processor(s) 305 ) to perform the actions described herein.

对于一个实施例,系统控制模块310可包括任意适当的接口控制器,以向(一个或多个)处理器305中的至少一个和/或与系统控制模块310通信的任意适当的设备或组件提供任意适当的接口。For one embodiment, the system control module 310 may include any suitable interface controller to provide at least one of the processor(s) 305 and/or any suitable device or component in communication with the system control module 310 any appropriate interface.

系统控制模块310可包括存储器控制器模块330,以向系统存储器315提供接口。存储器控制器模块330可以是硬件模块、软件模块和/或固件模块。The system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315 . The memory controller module 330 may be a hardware module, a software module, and/or a firmware module.

系统存储器315可被用于例如为系统300加载和存储数据和/或指令。对于一个实施例,系统存储器315可包括任意适当的易失性存储器,例如,适当的DRAM。在一些实施例中,系统存储器315可包括双倍数据速率类型四同步动态随机存取存储器(DDR4SDRAM)。System memory 315 may be used, for example, to load and store data and/or instructions for system 300 . For one embodiment, system memory 315 may include any suitable volatile memory, eg, suitable DRAM. In some embodiments, system memory 315 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).

对于一个实施例,系统控制模块310可包括一个或多个输入/输出(I/O)控制器,以向NVM/存储设备320及(一个或多个)通信接口325提供接口。For one embodiment, system control module 310 may include one or more input/output (I/O) controllers to provide interfaces to NVM/storage device 320 and communication interface(s) 325 .

例如,NVM/存储设备320可被用于存储数据和/或指令。NVM/存储设备320可包括任意适当的非易失性存储器(例如,闪存)和/或可包括任意适当的(一个或多个)非易失性存储设备(例如,一个或多个硬盘驱动器(HDD)、一个或多个光盘(CD)驱动器和/或一个或多个数字通用光盘(DVD)驱动器)。For example, NVM/storage device 320 may be used to store data and/or instructions. NVM/storage device 320 may include any suitable non-volatile memory (eg, flash memory) and/or may include any suitable non-volatile storage device(s) (eg, one or more hard drives ( HDD), one or more compact disc (CD) drives and/or one or more digital versatile disc (DVD) drives).

NVM/存储设备320可包括在物理上作为系统300被安装在其上的设备的一部分的存储资源,或者其可被该设备访问而不必作为该设备的一部分。例如,NVM/存储设备320可通过网络经由(一个或多个)通信接口325进行访问。NVM/storage device 320 may include storage resources that are physically part of the device on which system 300 is installed, or it may be accessed by the device without necessarily being part of the device. For example, the NVM/storage device 320 is accessible via the communication interface(s) 325 over a network.

(一个或多个)通信接口325可为系统300提供接口以通过一个或多个网络和/或与任意其他适当的设备通信。系统300可根据一个或多个无线网络标准和/或协议中的任意标准和/或协议来与无线网络的一个或多个组件进行无线通信。Communication interface(s) 325 may provide an interface for system 300 to communicate over one or more networks and/or with any other suitable device. System 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and/or protocols.

对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器(例如,存储器控制器模块330)的逻辑封装在一起。对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器的逻辑封装在一起以形成系统级封装(SiP)。对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器的逻辑集成在同一模具上。对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器的逻辑集成在同一模具上以形成片上系统(SoC)。For one embodiment, at least one of the processor(s) 305 may be packaged with the logic of one or more controllers of the system control module 310 (eg, the memory controller module 330 ). For one embodiment, at least one of the processor(s) 305 may be packaged with logic of one or more controllers of the system control module 310 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with the logic of one or more controllers of the system control module 310 . For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with logic of one or more controllers of the system control module 310 to form a system on a chip (SoC).

在各个实施例中,系统300可以但不限于是:服务器、工作站、台式计算设备或移动计算设备(例如,膝上型计算设备、手持计算设备、平板电脑、上网本等)。在各个实施例中,系统300可具有更多或更少的组件和/或不同的架构。例如,在一些实施例中,系统300包括一个或多个摄像机、键盘、液晶显示器(LCD)屏幕(包括触屏显示器)、非易失性存储器端口、多个天线、图形芯片、专用集成电路(ASIC)和扬声器。In various embodiments, system 300 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (eg, laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 300 may have more or fewer components and/or different architectures. For example, in some embodiments, system 300 includes one or more cameras, keyboards, liquid crystal display (LCD) screens (including touchscreen displays), non-volatile memory ports, multiple antennas, graphics chips, application specific integrated circuits ( ASIC) and speakers.

需要注意的是,本申请可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一个实施例中,本申请的软件程序可以通过处理器执行以实现上文所述步骤或功能。同样地,本申请的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本申请的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。It should be noted that the present application may be implemented in software and/or a combination of software and hardware, eg, an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device. In one embodiment, the software program of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs of the present application (including associated data structures) may be stored on a computer-readable recording medium, such as RAM memory, magnetic or optical drives or floppy disks, and the like. In addition, some steps or functions of the present application may be implemented in hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.

另外,本申请的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本申请的方法和/或技术方案。本领域技术人员应能理解,计算机程序指令在计算机可读介质中的存在形式包括但不限于源文件、可执行文件、安装包文件等,相应地,计算机程序指令被计算机执行的方式包括但不限于:该计算机直接执行该指令,或者该计算机编译该指令后再执行对应的编译后程序,或者该计算机读取并执行该指令,或者该计算机读取并安装该指令后再执行对应的安装后程序。在此,计算机可读介质可以是可供计算机访问的任意可用的计算机可读存储介质或通信介质。In addition, a part of the present application can be applied as a computer program product, such as computer program instructions, which when executed by a computer, through the operation of the computer, can invoke or provide methods and/or technical solutions according to the present application. Those skilled in the art should understand that the existing forms of computer program instructions in computer-readable media include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include but are not limited to Limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding post-installation program. program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by a computer.

通信介质包括藉此包含例如计算机可读指令、数据结构、程序模块或其他数据的通信信号被从一个系统传送到另一系统的介质。通信介质可包括有导的传输介质(诸如电缆和线(例如,光纤、同轴等))和能传播能量波的无线(未有导的传输)介质,诸如声音、电磁、RF、微波和红外。计算机可读指令、数据结构、程序模块或其他数据可被体现为例如无线介质(诸如载波或诸如被体现为扩展频谱技术的一部分的类似机制)中的已调制数据信号。术语“已调制数据信号”指的是其一个或多个特征以在信号中编码信息的方式被更改或设定的信号。调制可以是模拟的、数字的或混合调制技术。Communication media includes media by which communication signals containing, for example, computer readable instructions, data structures, program modules or other data are transmitted from one system to another. Communication media may include conducted transmission media such as cables and wires (eg, fiber optic, coaxial, etc.) and wireless (unconducted transmission) media capable of propagating energy waves, such as acoustic, electromagnetic, RF, microwave, and infrared . Computer readable instructions, data structures, program modules or other data may be embodied, for example, as a modulated data signal in a wireless medium such as a carrier wave or similar mechanism such as embodied as part of spread spectrum technology. The term "modulated data signal" refers to a signal whose one or more characteristics are altered or set in a manner that encodes information in the signal. Modulation can be analog, digital or hybrid modulation techniques.

作为示例而非限制,计算机可读存储介质可包括以用于存储诸如计算机可读指令、数据结构、程序模块或其它数据的信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动的介质。例如,计算机可读存储介质包括,但不限于,易失性存储器,诸如随机存储器(RAM,DRAM,SRAM);以及非易失性存储器,诸如闪存、各种只读存储器(ROM,PROM,EPROM,EEPROM)、磁性和铁磁/铁电存储器(MRAM,FeRAM);以及磁性和光学存储设备(硬盘、磁带、CD、DVD);或其它现在已知的介质或今后开发的能够存储供计算机系统使用的计算机可读信息/数据。By way of example and not limitation, computer-readable storage media may include volatile and non-volatile, readable storage media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Removable and non-removable media. For example, computer-readable storage media include, but are not limited to, volatile memory, such as random access memory (RAM, DRAM, SRAM); and non-volatile memory, such as flash memory, various read-only memories (ROM, PROM, EPROM) , EEPROM), magnetic and ferromagnetic/ferroelectric memory (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, tapes, CDs, DVDs); or other media now known or later developed capable of storing data for computer systems Computer readable information/data used.

在此,根据本申请的一个实施例包括一个装置,该装置包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该装置运行基于前述根据本申请的多个实施例的方法和/或技术方案。Here, an embodiment according to the present application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, a trigger is The apparatus operates based on the aforementioned methods and/or technical solutions according to various embodiments of the present application.

对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。It will be apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, but that the present application may be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Accordingly, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the application is to be defined by the appended claims rather than the foregoing description, which is therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in this application. Any reference signs in the claims shall not be construed as limiting the involved claim. Furthermore, it is clear that the word "comprising" does not exclude other units or steps and the singular does not exclude the plural. Several units or means recited in the device claims can also be realized by one unit or means by means of software or hardware. The terms first, second, etc. are used to denote names and do not denote any particular order.

Claims (15)

1.一种视频防抖方法,应用于用户设备端,其中,该方法包括:1. A video anti-shake method, applied to a user equipment side, wherein the method comprises: 响应于用户的录制操作,获取待处理帧图片,其中,所述待处理帧图片包括起始帧图片、当前帧图片,以及所述当前帧图片的前一帧图片,所述起始帧图片满足起始条件,所述起始条件包括所述起始帧图片的图像信息呈自然摆放状态;In response to the user's recording operation, a to-be-processed frame picture is obtained, wherein the to-be-processed frame picture includes a start frame picture, a current frame picture, and a previous frame picture of the current frame picture, and the start frame picture satisfies a starting condition, the starting condition includes that the image information of the starting frame picture is in a natural arrangement state; 根据所述当前帧图片与所述前一帧图片中的图像信息,确定所述当前帧图片中的图像信息相对于所述前一帧图片中的图像信息在目标防抖方向上的偏移信息,其中,所述当前帧图片与所述前一帧图片的获取时间差值为毫秒级,所述当前帧图片与所述前一帧图片的获取时间差值用于确定所述偏移信息;Determine the offset information of the image information in the current frame picture relative to the image information in the previous frame picture in the target anti-shake direction according to the image information in the current frame picture and the previous frame picture , wherein the acquisition time difference between the current frame picture and the previous frame picture is in milliseconds, and the acquisition time difference between the current frame picture and the previous frame picture is used to determine the offset information; 根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片;Perform picture processing on the current frame picture according to the offset information to obtain the processed current frame picture; 将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频,其中,所述起始帧图片作为所述录制视频的第一帧图片。The processed picture of the current frame and the picture of the previous frame are combined according to the sequence of video frames to generate a recorded video, wherein the picture of the starting frame is used as the first picture of the recorded video. 2.根据权利要求1所述的方法,其中,所述方法还包括:2. The method of claim 1, wherein the method further comprises: 响应于所述用户的启动录制操作,获取录制帧图片;In response to the user's start-up recording operation, obtain a recording frame picture; 从所述录制帧图片中确定所述起始帧图片,其中,所述起始帧图片满足所述起始条件。The starting frame picture is determined from the recorded frame picture, wherein the starting frame picture satisfies the starting condition. 3.根据权利要求2所述的方法,其中,所述起始条件包括所述录制帧图片的倾斜角度等于或小于角度阈值;3. The method according to claim 2, wherein the initial condition comprises that the inclination angle of the recorded frame picture is equal to or less than an angle threshold; 所述从所述录制帧图片中确定所述起始帧图片,包括:The determining the starting frame picture from the recorded frame picture includes: 确定所述录制帧图片的倾斜角度;determining the inclination angle of the recorded frame picture; 若所述录制帧图片的倾斜角度等于或小于角度阈值,确定该录制帧图片满足所述起始条件,并将该录制帧图片作为所述起始帧图片。If the inclination angle of the recorded frame picture is equal to or smaller than the angle threshold, it is determined that the recorded frame picture satisfies the initial condition, and the recorded frame picture is used as the initial frame picture. 4.根据权利要求3所述的方法,其中,所述确定所述录制帧图片的倾斜角度,包括:4. The method according to claim 3, wherein the determining the inclination angle of the recorded frame picture comprises: 确定所述录制帧图片的图片角度,并将所述图片角度作为所述录制帧图片的倾斜角度。The picture angle of the recorded frame picture is determined, and the picture angle is used as the inclination angle of the recorded frame picture. 5.根据权利要求3所述的方法,其中,所述确定所述录制帧图片的倾斜角度,包括:5. The method according to claim 3, wherein the determining the inclination angle of the recorded frame picture comprises: 确定所述录制帧图片的图片角度,并通过角度传感器所述用户设备的设备角度;Determine the picture angle of the recorded frame picture, and use the angle sensor of the device angle of the user equipment; 根据所述图片角度以及所述设备角度计算所述录制帧图片的倾斜角度。The tilt angle of the recorded frame picture is calculated according to the picture angle and the device angle. 6.根据权利要求4或5所述的方法,其中,所述确定所述录制帧图片的图片角度,包括:6. The method according to claim 4 or 5, wherein the determining the picture angle of the recorded frame picture comprises: 基于图像识别技术识别所述录制帧图片的图像信息,其中,所述图像信息包括目标对象;Identify the image information of the recorded frame picture based on image recognition technology, wherein the image information includes a target object; 确定所述目标对象的边缘与所述录制帧图片的边缘的夹角,并将所述夹角确定为所述录制帧图片的图片角度。Determine the included angle between the edge of the target object and the edge of the recorded frame picture, and determine the included angle as the picture angle of the recorded frame picture. 7.根据权利要求5所述的方法,其中,所述图片角度对应有第一权重信息;所述设备角度对应有第二权重信息;7. The method according to claim 5, wherein the picture angle corresponds to the first weight information; the device angle corresponds to the second weight information; 所述根据所述图片角度以及所述设备角度计算所述录制帧图片的倾斜角度,包括:The calculating the tilt angle of the recorded frame picture according to the picture angle and the device angle includes: 根据所述设备角度、所述倾斜角度、所述第一权重信息、所述第二权重信息计算得到所述录制帧图片的倾斜角度。The inclination angle of the recorded frame picture is obtained by calculating according to the device angle, the inclination angle, the first weight information, and the second weight information. 8.根据权利要求1所述的方法,其中,所述方法还包括:8. The method of claim 1, wherein the method further comprises: 获取关于所述录制视频的防抖配置信息,其中,所述防抖配置信息包括所述目标防抖方向。Obtain anti-shake configuration information about the recorded video, where the anti-shake configuration information includes the target anti-shake direction. 9.根据权利要求1或8所述的方法,其中,所述目标防抖方向包括以下至少一项:9. The method according to claim 1 or 8, wherein the target anti-shake direction comprises at least one of the following: 横向;horizontal; 纵向;vertical; 横向和纵向。Landscape and portrait. 10.根据权利要求1所述的方法,其中,所述偏移信息包括偏移方向以及偏移值;10. The method of claim 1, wherein the offset information includes an offset direction and an offset value; 所述根据所述偏移信息对所述当前帧图片进行图片处理,得到处理后的当前帧图片,包括:Performing picture processing on the current frame picture according to the offset information to obtain the processed current frame picture, including: 分别根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,以及所述前一帧图片的复制区域;Determine the cropping area of the current frame picture and the copy area of the previous frame picture according to the offset direction and the offset value respectively; 复制所述前一帧图片的复制区域,并裁剪掉所述当前帧图片的裁剪区域;Copy the copying area of the picture of the previous frame, and cut out the cropping area of the picture of the current frame; 将所述复制区域拼接到裁剪后的所述当前帧图片的拼接位置,其中,所述拼接位置在所述当前帧图片所处的方位与所述裁剪区域在所述当前帧图片中所处的方位相对。The copy area is spliced to the splicing position of the cropped current frame picture, wherein the stitching position is at the orientation of the current frame picture and the position of the cropped area in the current frame picture. Relative orientation. 11.根据权利要求10所述的方法,其中,所述根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,包括:11. The method according to claim 10, wherein the determining the cropping region of the current frame picture according to the offset direction and the offset value comprises: 根据所述偏移方向以及所述偏移值确定所述当前帧图片的裁剪区域,其中,所述裁剪区域在所述当前帧图片中所处的方位与所述偏移方向相反,所述裁剪区域的长度等于所述当前帧图片的长度或宽度,所述裁剪区域的宽度等于所述偏移值。The cropping area of the current frame picture is determined according to the offset direction and the offset value, wherein the direction of the cropping area in the current frame picture is opposite to the offset direction, and the cropping area is opposite to the offset direction. The length of the region is equal to the length or width of the current frame picture, and the width of the cropped region is equal to the offset value. 12.根据权利要求11所述的方法,其中,所述根据所述偏移方向以及所述偏移值确定所述前一帧图片的复制区域,包括:12. The method according to claim 11, wherein the determining the copy area of the picture of the previous frame according to the offset direction and the offset value comprises: 根据所述偏移方向以及所述偏移值确定所述前一帧图片的复制区域,其中,所述复制区域在所述前一帧图片中所处的方位与所述偏移方向相同,所述复制区域的宽度等于所述前一帧图片的宽度,所述复制区域的高度等于所述偏移值。The copy area of the previous frame of picture is determined according to the offset direction and the offset value, wherein the position of the copy area in the previous frame of picture is the same as the offset direction, so The width of the copy area is equal to the width of the previous frame picture, and the height of the copy area is equal to the offset value. 13.根据权利要求1所述的方法,其中,所述将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合,以生成录制视频,包括:13. The method according to claim 1, wherein the combining the processed current frame picture and the previous frame picture according to the video frame sequence to generate a recorded video, comprising: 将所述处理后的当前帧图片与所述前一帧图片按照视频帧顺序进行组合;combining the processed current frame picture and the previous frame picture according to the video frame sequence; 在所述用户的录制过程中,重复执行上述操作,以生成录制视频。During the recording process of the user, the above operations are repeatedly performed to generate a recording video. 14.一种视频防抖设备,其中,该设备包括:14. A video anti-shake device, wherein the device comprises: 处理器;以及processor; and 被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如权利要求1至13中任一项所述方法的操作。a memory arranged to store computer-executable instructions which, when executed, cause the processor to perform the operations of the method of any of claims 1 to 13. 15.一种存储指令的计算机可读介质,所述指令在被执行时使得系统进行执行如权利要求1至13中任一项所述方法的操作。15. A computer readable medium storing instructions that, when executed, cause a system to perform operations of the method of any of claims 1 to 13.
CN202011147197.3A 2020-10-23 2020-10-23 Video anti-shake method and device Active CN112367460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011147197.3A CN112367460B (en) 2020-10-23 2020-10-23 Video anti-shake method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011147197.3A CN112367460B (en) 2020-10-23 2020-10-23 Video anti-shake method and device

Publications (2)

Publication Number Publication Date
CN112367460A CN112367460A (en) 2021-02-12
CN112367460B true CN112367460B (en) 2022-10-11

Family

ID=74511904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011147197.3A Active CN112367460B (en) 2020-10-23 2020-10-23 Video anti-shake method and device

Country Status (1)

Country Link
CN (1) CN112367460B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115103119B (en) * 2022-06-21 2025-03-18 维沃移动通信有限公司 Shooting method, device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234859A (en) * 2017-08-30 2018-06-29 珠海市魅族科技有限公司 Video stabilization control method, device, computer installation and readable storage medium storing program for executing
CN110213479A (en) * 2019-04-30 2019-09-06 北京迈格威科技有限公司 A kind of video capture anti-fluttering method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100421455C (en) * 2005-10-09 2008-09-24 北京中星微电子有限公司 A method for video electronic anti-shake
GB2492529B (en) * 2011-05-31 2018-01-10 Skype Video stabilisation
US9967461B2 (en) * 2015-10-14 2018-05-08 Google Inc. Stabilizing video using transformation matrices
CN105282400B (en) * 2015-11-20 2018-07-13 北京理工大学 A kind of efficient video antihunt means based on geometry interpolation
CN107454303A (en) * 2016-05-31 2017-12-08 宇龙计算机通信科技(深圳)有限公司 A kind of video anti-fluttering method and terminal device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234859A (en) * 2017-08-30 2018-06-29 珠海市魅族科技有限公司 Video stabilization control method, device, computer installation and readable storage medium storing program for executing
CN110213479A (en) * 2019-04-30 2019-09-06 北京迈格威科技有限公司 A kind of video capture anti-fluttering method and device

Also Published As

Publication number Publication date
CN112367460A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
WO2023035829A1 (en) Method for determining and presenting target mark information and apparatus
US20240323239A1 (en) Systems and methods for remote control in information technology infrastructure
US10593018B2 (en) Picture processing method and apparatus, and storage medium
CN110785996B (en) Dynamic control of camera resources in devices with multiple displays
WO2018099277A1 (en) Live video broadcast method, live broadcast device and storage medium
CN113438507B (en) A method, equipment and medium for determining video infringement
CN113705665A (en) Training method of image transformation network model and electronic equipment
WO2023125362A1 (en) Image display method and apparatus, and electronic device
CN112367460B (en) Video anti-shake method and device
WO2024250492A1 (en) Method for presenting augmented reality data, device and medium
US20140241697A1 (en) Recording apparatus, recording method, and program
CN111078654A (en) A method and device for sharing information
CN112057057B (en) Method and apparatus for adjusting pulse measurement device and measuring pulse signal
CN112822419A (en) Method and equipment for generating video information
WO2018129955A1 (en) Electronic device control method and electronic device
WO2024250493A1 (en) Method and device for presenting augmented reality data, and medium
US20150254043A1 (en) Display property determination
US11816241B1 (en) Systems and methods for protecting user privacy
CN116156208A (en) Method, device, medium and program product for sharing multimedia information
CN110413800B (en) A method and device for providing novel information
WO2022014369A1 (en) Image processing device, image processing method, and program
US10313625B2 (en) Method, apparatus, and storage medium for video file processing
WO2020114375A1 (en) Two-dimensional code generation and identification methods and devices
CN117499796A (en) Shooting method, equipment and medium
CN112822426B (en) Method and equipment for generating high dynamic range image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 80536, Shanghai

Patentee after: Shanghai Zongzhang Technology Group Co.,Ltd.

Country or region after: China

Address before: Room 80536, Shanghai

Patentee before: SHANGHAI ZHANGMEN SCIENCE AND TECHNOLOGY Co.,Ltd.

Country or region before: China