Patent Description:
The present disclosure generally relates to image processing, and more specifically relates to methods and systems for video stabilization.

During capturing videos or images, image capture devices, such as a camera may inevitably shake, which affects the visual effect of the captured videos or images. Therefore, it is necessary to eliminate or reduce the effect of the camera's shake on the captured videos or images. The existing video stabilization methods usually include optical video stabilization and electronic video stabilization. The optical video stabilization achieves the video stabilization by moving the lens or photosensitive element in the camera. The electronic video stabilization includes video stabilization based on sensors and video stabilization based on algorithms. The optical video stabilization and the electronic video stabilization based on sensors incurs a higher cost and has less flexibility than the electronic video stabilization based on algorithms. The existing electronic video stabilization based on algorithms, however, is usually based on global motion parameters. The existing electronic video stabilization based on algorithms involves a larger operation amount and a lower processing speed, and is, thus, difficult to apply to real-time video stabilization. Therefore, it is desirable to provide systems and/or methods for video stabilization to perform real-time video stabilization with a lower cost, a higher flexibility, a less operation amount, and a faster processing speed.

<CIT> discloses to perform video stabilization by tracking only feature points that belong to the background.

The invention is defined by a method for video stabilization according to claim <NUM>, a system for video stabilization according to claim <NUM> and a non-transitory computer readable medium comprising at least one set of instructions for video stabilization according to claim <NUM>. Preferred embodiments are set-out in the dependent claims.

In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant disclosure. However, it should be apparent to those skilled in the art that the present disclosure may be practiced without such details. In other instances, well-known methods, procedures, module, systems, devices, and/or drivers have been described at a relatively high-level, without detail, in order to avoid unnecessarily obscuring aspects of the present disclosure.

It will be understood that the term "system," "engine," "module," and/or "unit" used herein are one method to distinguish different components, elements, parts, section or assembly of different level in ascending order. However, the terms may be displaced by other expressions if they may achieve the same purpose.

It will be understood that when a device, unit, or module is referred to as being "on," "connected to," or "coupled to" another device, unit, or module, it may be directly on, connected or coupled to, or communicate with the other device, unit, or module, or an intervening device, unit, or module may be present, unless the context clearly indicates otherwise.

These and other features, and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structure and the combination of parts and economies of manufacture, may become more apparent upon consideration of the following description with reference to the accompanying drawing(s), all of which form a part of this specification. It is to be expressly understood, however, that the drawing(s) are for the purpose of illustration and description only and are not intended to limit the scope of the present disclosure.

At present, existing electronic video stabilization based on algorithms usually adopts operations such as feature point detection, feature point tracking, motion estimation, motion planning or filtering, motion compensation, or the like. However, in the operation for motion estimation, at least one of the feature point pairs corresponding to a moving object is often used to determine a motion equation, which causes errors in motion estimation. Because the video stabilization is performed to a video frame-by-frame, the errors may accumulate, which affects the accuracy of the operations performed to subsequent frames.

In addition, for the electronic video stabilization that includes an operation for removing outliers in the detected feature points, since one or more of the detected feature points that are determined as the outliers are removed, in the process for video stabilization performed frame-by-frame, the number of the feature points to be tracked may become fewer and fewer. When a count of the feature points to be tracked reduces to a certain value, an operation for feature point detection may be performed to the current frame to be processed to determine a plurality of new feature points, which causes a sudden change in the number (or count) of feature points, resulting in video stuttering.

In order to solve the above problems, the present disclosure provides systems and/or methods for stabilizing a video in real-time. In the systems and/or methods for video stabilization provided in the present disclosure, a first frame of a video may be obtained. The video may include a plurality of consecutive frames. The first frame may be the first one of the plurality of consecutive frames. A plurality of first feature points may be determined in the first frame by performing feature point detection to the first frame. The plurality of feature points may be designated as the feature points to be tracked in the second frame of the video. One or more of the plurality of first feature points corresponding to a moving object may be removed. First parameter estimation may be performed based on the remaining first feature points. Path planning or filtering may be performed based on a result of the first parameter estimation. A motion compensation may be performed to the second frame based on a result of the path planning or filtering. One or more second feature points may be determined in the second frame. The one or more second feature points and the remaining first feature points may be designated as the feature points to be tracked in the third frame of the video. The one or more second feature points may be different from the remaining first feature points. Each of the frames in the video subsequent to the second frame (e.g., the third frame, the fourth frame, the fifth frame, etc.) may be processed based on operations similar to the above description.

The operation for removing the feature points that are determined as corresponding to the moving object may reduce the operation amount, and improve the probability that the remaining feature points are distributed on the background (which may be determined as being static) of the current frame, which is more advantageous for performing motion compensation on the current frame. In addition, one or more new feature points (e.g., the second feature points) are added after the one or more first feature points are removed. The new added feature points together with the remaining first feature points may be tracked in the next frame, so that the number (or count) of feature points to be tracked may be kept within a certain range, and the problem that motion compensation cannot be performed to the video caused by too few feature points may be avoided. It is also not necessary to re-detect feature points when the number (or count) of feature points is too small, so a sudden change in the number (or count) of feature points and video stuttering may not occur.

<FIG> is a schematic diagram illustrating an exemplary imaging system <NUM> according to some embodiments of the present disclosure. In some embodiments, at least part of the imaging system <NUM> may be implemented with an electronic device that needs to capture images or videos, for example, a digital camera, a video camera, a smartphone, a monitoring device, or the like. As illustrated in <FIG>, the imaging system <NUM> may include an image capture device <NUM>, a processing device <NUM>, a network <NUM>, and a storage device <NUM>.

The image capture device <NUM> may be configured to capture images or videos. The images or videos may be two-dimensional (2D) or three-dimensional (3D). In some embodiments, the image capture device <NUM> may include a digital camera. The digital camera may include a 2D camera, a 3D camera, a panoramic camera, a virtual reality (VR) camera, a web camera, an instant picture camera, a video camera, a surveillance camera, or the like, or any combination thereof. In some embodiments, the image capture device <NUM> may include a stereo camera. The stereo camera may include a binocular vision device or a multi-camera. In some embodiments, the image capture device <NUM> may be added to or be part of a medical imaging equipment, a night-vision equipment, a radar equipment, a sonar equipment, an electronic eye, a camcorder, a thermal imaging equipment, a smartphone, a tablet PC, a laptop, a wearable equipment (e.g., 3D glasses), an eye of a robot, a vehicle traveling data recorder, an unmanned device (e.g., a unmanned aerial vehcile (UAV), a driverless car, etc.), a video gaming console, or the like, or any combination thereof.

In some embodiments, the image capture device <NUM> may include one or more lenses, a sensor, an exposure-time controller, an amplifier, and an analog to digital (A/D) converter.

In some embodiments, the image capture device <NUM> may communicate with one or more components (e.g., the processing device <NUM>, or the storage device <NUM>) of the image capture device <NUM> via the network <NUM>. In some embodiments, the image capture device <NUM> may be directly connected to the one or more components (e.g., the processing device <NUM>, or the storage device <NUM>) of the image capture device <NUM>.

The processing device <NUM> may process information and/or data to perform one or more functions described in the present disclosure. For example, the processing device <NUM> may obtain a video captured by the image capture device <NUM> and perform video stabilization to the video.

In some embodiments, the processing device <NUM> may be a single server or a server group. The server group may be centralized, or distributed (e.g., the processing device <NUM> may be a distributed system). In some embodiments, the processing device <NUM> may be local or remote. For example, the processing device <NUM> may access/transmit information and/or data in/to the image capture device <NUM>, or the storage device <NUM> via the network <NUM>. As another example, the processing device <NUM> may be directly connected to the image capture device <NUM>, or the storage device <NUM> to access/transmit information and/or data. In some embodiments, the processing device <NUM> may be implemented on a cloud platform. Merely by way of example, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, a multi-cloud, or the like, or any combination thereof. In some embodiments, the processing device <NUM> may be implemented on a computing device <NUM> having one or more components illustrated in <FIG> in the present disclosure.

In some embodiments, the processing device <NUM> may be implemented on a mobile device, a tablet computer, a laptop computer, a built-in device in a motor vehicle, or the like, or any combination thereof. In some embodiments, the mobile device may include a smart home device, a wearable device, a smart mobile device, a virtual reality device, an augmented reality device, or the like, or any combination thereof. In some embodiments, the smart home device may include a smart lighting device, a control device of an intelligent electrical apparatus, a smart monitoring device, a smart television, a smart video camera, an interphone, or the like, or combination thereof. In some embodiments, the wearable device may include a smart bracelet, a smart footgear, a smart glass, a smart helmet, a smart watch, a smart clothing, a smart backpack, a smart accessory, or the like, or any combination thereof. In some embodiments, the smart mobile device may include a smartphone, a personal digital assistance (PDA), a gaming device, a navigation device, a point of sale (POS) device, or the like, or any combination. In some embodiments, the virtual reality device and/or the augmented reality device may include a virtual reality helmet, a virtual reality glass, a virtual reality patch, an augmented reality helmet, an augmented reality glass, an augmented reality patch, or the like, or any combination thereof. For example, the virtual reality device and/or the augmented reality device may include a Google GlassTM, a RiftConTM, a FragmentsTM, a Gear VRTM, etc. In some embodiments, the built-in device in the motor vehicle may include an onboard computer, an onboard television, a traveling data recorder, etc. In some embodiments, the processing device <NUM> may be implemented on a mobile device <NUM> having one or more components illustrated in <FIG> in the present disclosure.

In some embodiments, the processing device <NUM> may include one or more processing engines (e.g., single-core processing engine(s) or multi-core processor(s)). Merely by way of example, the processing device <NUM> may include one or more hardware processors, such as a central processing unit (CPU), an application-specific integrated circuit (ASIC), an application-specific instruction-set processor (ASIP), a graphics processing unit (GPU), a physics processing unit (PPU), a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction-set computer (RISC), a microprocessor, or the like, or any combination thereof. In some embodiments, at least a part of the processing device <NUM> may be included in the image capture device <NUM>.

The network <NUM> may be configured to facilitate communications among the components (e.g., the image capture device <NUM>, the processing device <NUM>, and the storage device <NUM>) of the imaging system <NUM>. For example, the network <NUM> may transmit digital signals from the image capture device <NUM> to the processing device <NUM>. As another example, the network <NUM> may transmit images generated by the image capture device <NUM> to the storage device <NUM>.

In some embodiments, the network <NUM> may include a wired network, a wireless network, or any connection capable of transmitting and receiving data. In some embodiments, the wired network may include a connection using a metal cable, an optical cable, a hybrid cable, or the like, or any combination thereof. In some embodiments, the wireless network may include a near field communication (NFC), a body area network (BAN), a personal area network (PAN, e.g., a Bluetooth, a Z-Wave, a Zigbee, a wireless USB), a near-me area network (NAN), a local wireless network, a backbone, a metropolitan area network (MAN), a wide area network (WAN), an internet area network (IAN, or cloud), or the like, or any combination thereof.

The storage device <NUM> may be configured to store data and/or instructions. In some embodiments, the storage device <NUM> may store data obtained from the processing device <NUM> and/or the image capture device <NUM>. For example, the storage device <NUM> may store images generated by the processing device <NUM> and/or the image capture device <NUM>. In some embodiments, the storage device <NUM> may store data and/or instructions that the processing device <NUM> may execute or use to perform exemplary methods described in the present disclosure. For example, the storage device <NUM> may store instructions that the processing device <NUM> may execute to perform video stabilization to a video captured by the image capture device <NUM>. In some embodiments, the storage device <NUM> may include a mass storage, a removable storage, a volatile read-and-write memory, a read-only memory (ROM), or the like, or any combination thereof. Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state drive, etc. Exemplary removable storage may include a flash drive, a floppy disk, an optical disk, a memory card, a zip disk, a magnetic tape, etc. Exemplary volatile read-and-write memory may include a random access memory (RAM). Exemplary RAM may include a dynamic RAM (DRAM), a double date rate synchronous dynamic RAM (DDR SDRAM), a static RAM (SRAM), a thyrisor RAM (T-RAM), and a zero-capacitor RAM (Z-RAM), etc. Exemplary ROM may include a mask ROM (MROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically-erasable programmable ROM (EEPROM), a compact disk ROM (CD-ROM), and a digital versatile disk ROM, etc. In some embodiments, the storage device <NUM> may be implemented on a cloud platform. Merely by way of example, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, a multi-cloud, or the like, or any combination thereof.

In some embodiments, the storage device <NUM> may be connected to the network <NUM> to communicate with one or more components in the imaging system <NUM> (e.g., the image capture device <NUM> and the processing device <NUM>). One or more components in the imaging system <NUM> may access the data or instructions stored in the storage device <NUM> via the network <NUM>. In some embodiments, the storage device <NUM> may be directly connected to or communicate with one or more components in the imaging system <NUM> (e.g., the image capture device <NUM> and the processing device <NUM>). In some embodiments, the storage device <NUM> may be part of the image capture device <NUM> and/or the processing device <NUM>.

In some embodiments, two or more components of the imaging system <NUM> may be integrated in one device. For example, the image capture device <NUM>, the processing device <NUM>, and the storage device <NUM> may be integrated in one device (e.g., a camera, a smartphone, a laptop, a workstation, a server, etc.). In some embodiments, one or more components of the imaging system <NUM> may be located remote from other components. For example, the image capture device <NUM> may be installed at a location away from the processing device <NUM>, which may be implemented in a single device with the storage device <NUM>.

It should be noted that the component of the imaging system <NUM> illustrated in <FIG> may be implemented via various ways. For example, the components may be implemented through hardware, software, or a combination thereof. Herein, the hardware may be implemented by a dedicated logic; the software may be stored in the storage, the system may be executed by proper instructions, for example, by a microprocessor or a dedicated design hardware. Those skilled in the art can understand that, the methods and systems described in this disclosure may be implemented by the executable instructions of a computer and/or by control code in the processor, for example, the code supplied in a carrier medium such as a disk, a CD, a DVD-ROM, in a programmable storage such as a read-only memory, or in a data carrier such as optical signal carrier or electric signal carrier. The systems and the methods in the present application may be implemented by a hardware circuit in a programmable hardware device in a ultra large scale integrated circuit, a gate array chip, a semiconductor such as a transistor, a field programmable gate array, a programmable logic device, a software performed by various processors, or a combination thereof (e.g., firmware).

<FIG> is a schematic diagram illustrating exemplary hardware and/or software components of a computing device on which the image capture device <NUM> or the processing device <NUM> may be implemented according to some embodiments of the present disclosure. As illustrated in <FIG>, the computing device <NUM> may include a processor <NUM>, a storage <NUM>, an input/output (I/O) <NUM>, and a communication port <NUM>.

The processor <NUM> may execute computer instructions (program code) and perform functions of the processing device in accordance with techniques described herein. The computer instructions may include routines, programs, objects, components, signals, data structures, procedures, modules, and functions, which perform particular functions described herein. For example, the processing device <NUM> may be implemented on the computing device <NUM> and the processor <NUM> may obtain a video captured by the image capture device <NUM> and perform video stabilization to the video. In some embodiments, the processor <NUM> may include a microcontroller, a microprocessor, a reduced instruction preset computer (RISC), an application specific integrated circuits (ASICs), an application-specific instruction-preset processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physics processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit or processor capable of executing one or more functions, or the like, or any combinations thereof.

Merely for illustration purposes, only one processor is described in the computing device <NUM>. However, it should be note that the computing device <NUM> in the present disclosure may also include multiple processors, thus operations and/or method steps that are performed by one processor as described in the present disclosure may also be jointly or separately performed by the multiple processors. For example, if in the present disclosure the processor of the computing device <NUM> executes both step A and step B, it should be understood that step A and step B may also be performed by two different processors jointly or separately in the computing device <NUM> (e.g., a first processor executes step A and a second processor executes step B, or the first and second processors jointly execute steps A and B).

The storage <NUM> may store data/information obtained from any other component of the computing device <NUM> (e.g., the processor <NUM>). In some embodiments, the storage <NUM> may include a mass storage device, a removable storage device, a volatile read-and-write memory, a read-only memory (ROM), or the like, or any combination thereof. For example, the mass storage device may include a magnetic disk, an optical disk, a solid-state drive, etc. The removable storage device may include a flash drive, a floppy disk, an optical disk, a memory card, a zip disk, a magnetic tape, etc. The volatile read-and-write memory may include a random-access memory (RAM). The RAM may include a dynamic RAM (DRAM), a double date rate synchronous dynamic RAM (DDR SDRAM), a static RAM (SRAM), a thyristor RAM (T-RAM), and a zero-capacitor RAM (Z-RAM), etc. The ROM may include a mask ROM (MROM), a programmable ROM (PROM), an erasable programmable ROM (PEROM), an electrically erasable programmable ROM (EEPROM), a compact disk ROM (CD-ROM), and a digital versatile disk ROM, etc. In some embodiments, the storage <NUM> may store one or more programs and/or instructions to perform exemplary methods described in the present disclosure. For example, the storage <NUM> may store a program for performing video stabilization to a video. As another example, the storage <NUM> may store images captured by the image capture device <NUM>.

The I/O <NUM> may input or output signals, data, or information. In some embodiments, the I/O <NUM> may enable a user interaction with the processing device. For example, a captured image may be displayed through the I/O <NUM>. In some embodiments, the I/O <NUM> may include an input device and an output device. Exemplary input devices may include a keyboard, a mouse, a touch screen, a microphone, or the like, or a combination thereof. Exemplary output devices may include a display device, a loudspeaker, a printer, a projector, or the like, or a combination thereof. Exemplary display devices may include a liquid crystal display (LCD), a light-emitting diode (LED)-based display, a flat panel display, a curved screen, a television device, a cathode ray tube (CRT), or the like, or a combination thereof.

The communication port <NUM> may be connected to a network to facilitate data communications. The communication port <NUM> may establish connections between the computing device <NUM> (e.g., the capture device <NUM>) and an external device (e.g., a smart phone). The connection may be a wired connection, a wireless connection, or combination of both that enables data transmission and reception. The wired connection may include an electrical cable, an optical cable, a telephone wire, or the like, or any combination thereof. The wireless connection may include Bluetooth, Wi-Fi, WiMax, WLAN, ZigBee, mobile network (e.g., <NUM>, <NUM>, <NUM>, etc.), or the like, or a combination thereof. In some embodiments, the communication port <NUM> may be a standardized communication port, such as RS232, RS485, etc..

<FIG> is a schematic diagram illustrating exemplary hardware and/or software components of a mobile device on which the image capture device <NUM> or the processing device <NUM> may be implemented according to some embodiments of the present disclosure. As illustrated in <FIG>, the mobile device <NUM> may include a communication platform <NUM>, a display <NUM>, a graphic processing unit (GPU) <NUM>, a central processing unit (CPU) <NUM>, an I/O <NUM>, a memory <NUM>, and a storage <NUM>. In some embodiments, any other suitable component, including but not limited to a system bus or a controller (not shown), may also be included in the mobile device <NUM>. In some embodiments, a mobile operating system <NUM> (e.g., iOS™, Android™, Windows Phone™, etc.) and one or more applications <NUM> may be loaded into the memory <NUM> from the storage <NUM> in order to be executed by the CPU <NUM>. The applications <NUM> (e.g., a taxi-hailing application) may include a browser or any other suitable mobile apps for receiving and rendering information relating to transportation services or other information from the processing device <NUM>. User interactions with the information stream may be achieved via the I/O <NUM> and provided to the processing device <NUM> and/or other components of the speed prediction system <NUM> via the network <NUM>. Merely by way of example, a road feature transmit to a service requester may be displayed in the user terminal <NUM> through the display <NUM>. As another example, a service provider may input an image related to a road segment through the I/O <NUM>.

Hence, aspects of the methods of the image processing and/or other processes, as described herein, may be embodied in programming. Program aspects of the technology may be thought of as "products" or "articles of manufacture" typically in the form of executable code and/or associated data that is carried on or embodied in a type of machine readable medium. Tangible non-transitory "storage" type media include any or all of the memory or other storage for the computers, processors, or the like, or associated modules thereof, such as various semiconductor memories, tape drives, disk drives and the like, which may provide storage at any time for the software programming.

All or portions of the software may at times be communicated through a network such as the Internet or various other telecommunication networks. Such communications, for example, may enable loading of the software from one computer or processor into another, for example, from a management server or host computer of a scheduling system into the hardware platform(s) of a computing environment or other system implementing a computing environment or similar functionalities in connection with image processing. Thus, another type of media that may bear the software elements includes optical, electrical and electromagnetic waves, such as used across physical interfaces between local devices, through wired and optical landline networks and over various air-links. The physical elements that carry such waves, such as wired or wireless links, optical links or the like, also may be considered as media bearing the software. As used herein, unless restricted to tangible "storage" media, terms such as computer or machine "readable medium" refer to any medium that participates in providing instructions to a processor for execution.

A machine-readable medium may take many forms, including but not limited to, a tangible storage medium, a carrier wave medium or physical transmission medium. Non-volatile storage media include, for example, optical or magnetic disks, such as any of the storage devices in any computer(s), or the like, which may be used to implement the system or any of its components shown in the drawings. Volatile storage media may include dynamic memory, such as main memory of such a computer platform. Tangible transmission media may include coaxial cables; copper wire and fiber optics, including the wires that form a bus within a computer system. Carrier-wave transmission media may take the form of electric or electromagnetic signals, or acoustic or light waves such as those generated during radio frequency (RF) and infrared (IR) data communications. Common forms of computer-readable media may include, for example: a floppy disk, a flexible disk, hard disk, magnetic tape, any other magnetic medium, a CD-ROM, DVD or DVD-ROM, any other optical medium, punch cards paper tape, any other physical storage medium with patterns of holes, a RAM, a PROM and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave transporting data or instructions, cables or links transporting such a carrier wave, or any other medium from which a computer may read programming code and/or data. Many of these forms of computer readable media may be involved in carrying one or more sequences of one or more instructions to a physical processor for execution.

Those skilled in the art will recognize that the present teachings are amenable to a variety of modifications and/or enhancements. For example, although the implementation of various components described herein may be embodied in a hardware device, it may also be implemented as a software only solution (e.g., an installation on an existing server). In addition, image processing as disclosed herein may be implemented as firmware, a firmware/software combination, a firmware/hardware combination, or a hardware/firmware/software combination.

<FIG> is a schematic diagram illustrating an exemplary processing device according to some embodiments of the present disclosure. The processing device <NUM> may include an obtaining module <NUM>, a feature point tracking module <NUM>, and a processing module <NUM>.

The obtaining module <NUM> may obtain a target frame of a video. The video may include a plurality of consecutive frames. The target frame may be one of the plurality of consecutive frames and may be different from a first frame of the video. For example, for a process in real-time stabilizing a video that is being captured by the image capture device <NUM>, the target frame (e.g., the current frame) may be the latest frame in the current video and may be different from the first frame of the video. As another example, for a process for stabilizing a video that has been completed, the target frame may be any one frame other than the first frame.

The feature point tracking module <NUM> may obtain a plurality of first feature points associated with the target frame. In some embodiments, the plurality of first feature points associated with the target frame may be the feature points used to perform video stabilization (e.g., motion compensation and/or correction) to the target frame, also referred to as the feature points to be tracked in the target frame. As used in the present disclosure, the feature point may be a pixel in a frame.

In some embodiments, the plurality of first feature points may be detected in one or more frames of the video prior to the target frame.

In some embodiments, if the target frame is the second frame of the video, the feature point tracking module <NUM> may determine a plurality of third feature points in the first frame by performing feature point detection to the first frame and designate the plurality of third feature points as the plurality of first feature points.

In some embodiments, the feature point tracking module <NUM> may perform the feature point detection based on a point detection algorithm of features from accelerated segment test (FAST), a feature point detection algorithm of Good Feature To Track, or the like, or any combination thereof. Specifically, the feature point tracking module <NUM> may perform the feature point detection to the first frame using the FAST algorithm to determine a specified number (or count) of feature points in the first frame. The present disclosure does not limit the feature point detection algorithm to determine the plurality of third feature points.

In some embodiments, the feature point tracking module <NUM> may determine a plurality of candidate feature points in the first frame. The feature point tracking module <NUM> may select a portion of the plurality of candidate feature points as the plurality of first feature points. In some embodiments, the feature point tracking module <NUM> may set that the selected portion of the plurality of candidate feature points may include a preset number (or count) of feature points, such as, <NUM>, <NUM>, etc. In some embodiments, the feature point tracking module <NUM> may set that the selected portion of the plurality of candidate feature points may be a preset percentage of the plurality of candidate feature points. For example, if the feature point tracking module <NUM> detects <NUM> candidate feature points in the first frame <NUM> in <FIG>, the feature point tracking module <NUM> may select <NUM>% (the preset percentage) of the <NUM> first feature points, that is, <NUM> first feature points may be used as the feature points to be tracked in the second frame <NUM> in <FIG>. The preset number (or count) and/or the preset percentage may be set according to actual needs, and the present disclosure does not limit this.

In some embodiments, if the target frame is different from the second frame, the plurality of first feature points may include the feature points used to perform video stabilization to the frame of the video immediately prior to the target frame (also referred to as a previous frame). In some embodiments, the plurality of first feature points may further include one or more supplement feature points determined in the previous frame. Details related to the source of the plurality of first feature points may be found elsewhere in the present disclosure (e.g., description in connection with operation <NUM> and/or operation <NUM>).

The processing module <NUM> may determine whether the plurality of first feature points include at least one feature point relating to a moving object in the video.

In some embodiments, the processing module <NUM> may identify the feature point related to the moving object in the plurality of first feature points by performing operations A1-A6 using the random sample consensus (RANSAC) algorithm.

In operation A1, the processing module <NUM> may determine current coordinates of each of the plurality of first feature points.

In operation A2, the processing module <NUM> may determine historical coordinates of each of the plurality of first feature points.

In operation A3, the processing module <NUM> may estimate one or more second motion parameters according to the current coordinates of the plurality of first feature points and the historical coordinates of the plurality of first feature points.

In operation A4, the processing module <NUM> may transform the current coordinates of the plurality of first feature points using the one or more second motion parameters.

In operation A5, for each of the plurality of first feature points, the processing module <NUM> may determine a difference between the historical coordinates and the transformed current coordinates of the first feature point.

In operation A6, for each of the plurality of first feature points, the processing module <NUM> may determine whether the difference is greater than a preset threshold. In response to a determination that the difference is greater than the preset threshold, the processing module <NUM> may designate the first feature point as the feature point relating to the moving object.

The processing module <NUM> may also remove the at least one feature point relating to the moving object.

The processing module <NUM> may also perform video stabilization (e.g., the final video stabilization) to the target frame based on remaining first feature points of the plurality of first feature points.

In some embodiments, the processing module <NUM> may estimate one or more first motion parameters based on the remaining first feature points. The processing module <NUM> may perform path planning or filtering to the target frame based on the one or more first motion parameters. The processing module <NUM> may perform video stabilization (e.g., correction) to the target frame by performing motion compensation to the target frame based on a result of the path planning or the filtering.

The processing module <NUM> may also determine, in the target frame, at least one supplement feature point that is different from the remaining first feature points.

The processing module <NUM> may also designate the at least one supplement feature point and the remaining first feature points as second feature points associated with a frame immediately following the target frame in the video.

The processing module <NUM> may also stabilize the target frame based on the plurality of first feature points.

The processing module <NUM> may also designate the plurality of first feature points as the second feature points associated with the frame immediately following the target frame in the video.

The modules in the processing device <NUM> may be connected to or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, or the like, or any combination thereof. The wireless connection may include a Local Area Network (LAN), a Wide Area Network (WAN), a Bluetooth, a ZigBee, a Near Field Communication (NFC), or the like, or any combination thereof. Two or more of the modules may be combined into a single module, and any one of the modules may be divided into two or more units. For example, the processing module <NUM> may be divided into three units. A first unit may determine and remove the feature points relating to the moving object. A second unit may perform video stabilization to the target frame. A third unit may determine the one or more supplement feature points in the target frame.

It should be noted that the above description is merely provided for the purposes of illustration, and not intended to limit the scope of the present disclosure. For persons having ordinary skills in the art, multiple variations and modifications may be made under the teachings of the present disclosure. However, those variations and modifications do not depart from the scope of the present disclosure. For example, the processing device <NUM> may further include a storage module (not shown in <FIG>). The storage module may be configured to store data generated during any process performed by any component of in the processing device <NUM>. As another example, each of components of the processing device <NUM> may correspond to a storage module, respectively. Additionally or alternatively, the components of the processing device <NUM> may share a common storage module.

<FIG> is a flowchart illustrating an exemplary process for video stabilization according to some embodiments of the present disclosure. In some embodiments, the process <NUM> may be implemented in the imaging system <NUM> illustrated in <FIG>. For example, the process <NUM> may be stored in a storage medium (e.g., the storage device <NUM>, the storage <NUM>, the memory <NUM>, or the storage <NUM>) as a form of instructions, and can be invoked and/or executed by the processing device <NUM> (e.g., the processor <NUM>, the CPU <NUM>, or one or more modules in the processing device <NUM> illustrated in <FIG>). The operations of the illustrated process <NUM> presented below are intended to be illustrative. In some embodiments, the process <NUM> may be accomplished with one or more additional operations not described, and/or without one or more of the operations discussed. Additionally, the order in which the operations of the process <NUM> as illustrated in <FIG> and described below is not intended to be limiting.

In some embodiments, the process <NUM> may be used to stabilize in real time a video that is being captured. For example, when the image capture device <NUM> is capturing a scene to generate a plurality of consecutive frames to form a video, from the second frame of the video, every time a new frame is generated, the processing device <NUM> may stabilize in real-time the new frame via the process <NUM>.

In some embodiments, the process <NUM> may be used to stabilize a video that has been completed. For example, the processing device <NUM> may stabilize the video frame-by-frame from the second frame of the video by repeating the process <NUM>.

In some embodiments, the process <NUM> may include the following operations: obtaining a target frame of a video, the target frame being different from a first frame of the video (operation <NUM>); obtaining a plurality of first feature points associated with the target frame (operation <NUM>); determining whether the plurality of first feature points include at least one feature point relating to a moving object in the video (operation <NUM>); in response to a determination that the plurality of first feature points include at least one feature point relating to the moving object in the video, removing the at least one feature point relating to the moving object (operation <NUM>); stabilize the target frame based on remaining first feature points of the plurality of first feature points (operation <NUM>); determining, in the target frame, at least one supplement feature point that is different from the remaining first feature points (operation <NUM>); and designating the at least one supplement feature point and the remaining first feature points as second feature points associated with a frame immediately following the target frame in the video (operation <NUM>).

In <NUM>, the processing device <NUM> (e.g., the obtaining module <NUM>) may obtain a target frame of a video. The video may include a plurality of consecutive frames. The target frame may be one of the plurality of consecutive frames and may be different from a first frame of the video. For example, for a process in real-time stabilizing a video that is being captured by the image capture device <NUM>, the target frame (e.g., the current frame) may be the latest frame in the current video and may be different from the first frame of the video. As another example, for a process for stabilizing a video that has been completed, the target frame may be any one frame other than the first frame.

In <NUM>, the processing device <NUM> (e.g., the feature point tracking module <NUM>) may obtain a plurality of first feature points associated with the target frame. In some embodiments, the plurality of first feature points associated with the target frame may be the feature points used to perform video stabilization (e.g., motion compensation and/or correction) to the target frame, also referred to as the feature points to be tracked in the target frame. As used in the present disclosure, the feature point may be a pixel in a frame.

In some embodiments, if the target frame is the second frame of the video, the processing device <NUM> may determine a plurality of third feature points in the first frame by performing feature point detection to the first frame and designate the plurality of third feature points as the plurality of first feature points.

In some embodiments, the processing device <NUM> may perform the feature point detection based on a point detection algorithm of features from accelerated segment test (FAST), a feature point detection algorithm of Good Feature To Track, or the like, or any combination thereof. Specifically, the processing device <NUM> may perform the feature point detection to the first frame using the FAST algorithm to determine a specified number (or count) of feature points in the first frame. The present disclosure does not limit the feature point detection algorithm to determine the plurality of third feature points.

In some embodiments, the processing device <NUM> may determine a plurality of candidate feature points in the first frame. The processing device <NUM> may select a portion of the plurality of candidate feature points as the plurality of first feature points. In some embodiments, the processing device <NUM> may set that the selected portion of the plurality of candidate feature points may include a preset number (or count) of feature points, such as, <NUM>, <NUM>, etc. In some embodiments, the processing device <NUM> may set that the selected portion of the plurality of candidate feature points may be a preset percentage of the plurality of candidate feature points. For example, if the processing device <NUM> detects <NUM> candidate feature points in the first frame <NUM> in <FIG>, the processing device <NUM> may select <NUM>% (the preset percentage) of the <NUM> first feature points, that is, <NUM> first feature points may be used as the feature points to be tracked in the second frame <NUM> in <FIG>. The preset number (or count) and/or the preset percentage may be set according to actual needs, and the present disclosure does not limit this.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may determine whether the plurality of first feature points include at least one feature point relating to a moving object in the video. In response to a determination that the plurality of first feature points include at least one feature point relating to a moving object in the video, the processing device <NUM> may perform operations <NUM>-<NUM>. In response to a determination that the plurality of first feature points include no feature point relating to a moving object in the video, the processing device <NUM> may perform operations <NUM>-<NUM>.

In some embodiments, the processing device <NUM> may identify the feature point related to the moving object in the plurality of first feature points by performing operations A1-A6 using the random sample consensus (RANSAC) algorithm.

In operation A1, the processing device <NUM> may determine current coordinates of each of the plurality of first feature points. The current coordinates of the first feature points may refer to the coordinates of the first feature point's corresponding feature point in the target frame. The first feature point and its corresponding feature point in the target frame may correspond to the same feature of the same object in the video.

In some embodiments, a frame may include pixels arranged in rows and columns. As used in the present disclosure, the coordinates of a feature point (e.g., a pixel) in a frame may include a first coordinate along the row direction of the frame (also referred to as the x coordinate) and a second coordinate along the column direction of the frame (also referred to as the y coordinate).

In operation A2, the processing device <NUM> may obtain historical coordinates of each of the plurality of first feature points. The historical coordinates of the first feature point may refer to the coordinates of the first feature point in a source frame that has been transformed based on first motion parameters or second motion parameters corresponding to the source frame. Each of the plurality of first feature points may correspond to a source frame. The first feature point may be determined in its corresponding source frame.

For example, if the target frame is the second frame of the video, the plurality of first feature points may be determined in the first frame of the video, and the first frame may be the source frame of the plurality of first feature points. As another example, if the target frame is the third frame of the video, and the plurality of first feature points include a first set of feature points determined in the first frame and a second set of feature points determined in the second frame, the first frame may be the source frame of the first set of feature points and the second frame may be source frame of the second set of feature points.

In operation A3, the processing device <NUM> may estimate one or more second motion parameters according to the current coordinates of the plurality of first feature points and the historical coordinates of the plurality of first feature points.

In operation A4, the processing device <NUM> may transform the current coordinates of the plurality of first feature points using the one or more second motion parameters.

In operation A5, for each of the plurality of first feature points, the processing device <NUM> may determine a difference between the historical coordinates and the transformed current coordinates of the first feature point.

In operation A6, for each of the plurality of first feature points, the processing device <NUM> may determine whether the difference is greater than a preset threshold. In response to a determination that the difference is greater than the preset threshold, the processing device <NUM> may designate the first feature point as the feature point relating to the moving object.

In some embodiments, if the current coordinates of the plurality of first feature points are compared with the coordinates of the corresponding feature points in the previous frame, it may be difficult for the processing device <NUM> to determine whether the first feature point relates to a moving object because the displacement of the moving object during a period of time between the previous frame and the target frame may be small. Therefore, in operations A1-A6, the processing device <NUM> may compare the current coordinates and the historical coordinates of the plurality of first feature points, which may improve the accuracy of identifying the feature point relating to the moving object.

In some embodiments, when the processing device <NUM> identifies one or more feature points related to the moving object in the plurality of first feature points, the target frame has not been corrected by video stabilization. The current coordinates of the plurality of first feature points may be affected by the camera's shake. If the processing device <NUM> directly uses the current coordinates of the plurality of first feature points to identify the feature point related to the moving object, the identification result may be inaccurate. Therefore, the processing device <NUM> may estimate one or more second motion parameters based on the current coordinates and the historical coordinates of the plurality of first feature points. The processing device <NUM> may transform the current coordinates of the plurality of first feature points using the one or more second motion parameters. The processing device <NUM> may identify the feature point related to the moving object by comparing the historical coordinates and the transformed current coordinates of the plurality of first feature points.

In some embodiments, the one or more second motion parameters may include a homography matrix. The operation for transforming the current coordinates of the plurality of first feature points using the one or more second motion parameters may be regarded as an operation for performing preliminary video stabilization (e.g., correction) to the current coordinates of the plurality of first feature points.

Merely by way of example, the one or more estimated second motion parameters may include a homography matrix that may be represented by Equation (<NUM>) below: <MAT>.

The current coordinates of the first feature point X may be X<NUM>=(x<NUM>, y<NUM>), and the historical coordinates of the first feature point X may be X<NUM>=(x<NUM>, y<NUM>).

The processing device <NUM> may transform the current coordinates of the first feature point X according to Equation (<NUM>) and Equations (<NUM>)-(<NUM>): <MAT> <MAT> <MAT> and <MAT> wherein X<NUM>'=(x<NUM>', y<NUM>') refers to the transformed current coordinates of the first feature point X.

The processing device <NUM> may determine the distance between the transformed current coordinates and the historical coordinates of the first feature point X based on Equation (<NUM>) below: <MAT> wherein D refers to the difference between the transformed current coordinates and the historical coordinates of the first feature point X.

In some embodiments, the processing device <NUM> may identify the feature point related to the moving object based on an iteration process including a plurality of iterations. Each of the plurality of iterations may include operations A4-A6. For example, in each of the plurality of iterations, the processing device <NUM> may remove the first feature point that is determined relating to the moving object, and the processing device <NUM> may perform, using the one or more second motion parameters, transformation to the transformed current coordinates of the remaining first feature points that are determined in the previous iteration.

In some embodiments, the preset threshold may be set as needed, for example, may be set to <NUM>, <NUM>, or the like. In some embodiments, by performing operations A1-A6, the distance exceeding the preset threshold may be determined as being caused by the movement of the object corresponding to the first feature point, rather than the camera's shake. Therefore, if the distance exceeds the preset threshold, the first feature point may be determined as the feature point related to the moving object. The process including operations A1-A6 may remove the feature points related to the moving object, and may lead to a result that the remaining first feature points are the feature points that distribute on the background of the target frame, which may be beneficial to perform video stabilization and/or motion compensation to the target frame.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may remove the at least one feature point relating to the moving object.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may perform video stabilization (e.g., the final video stabilization) to the target frame based on remaining first feature points of the plurality of first feature points.

In some embodiments, the processing device <NUM> may estimate one or more first motion parameters based on the remaining first feature points. The processing device <NUM> may perform path planning or filtering to the target frame based on the one or more first motion parameters. The processing device <NUM> may perform video stabilization (e.g., correction) to the target frame by performing motion compensation to the target frame based on a result of the path planning or the filtering.

In some embodiments, the path planning may include an optimization process. The filtering may include path Gaussian filtering. The process for path planning and filtering is not limited in the present disclosure.

In some embodiments, the processing device <NUM> may obtain the current coordinates of the remaining first feature points. The processing device <NUM> may obtain correction coordinates of the remaining first feature points. In some embodiments, if the target frame is the second frame of the video, the correction coordinates of the remaining first feature points may refer to the coordinates of the remaining first feature points' corresponding feature points in the first frame of the video. In some embodiments, if the target frame is different from the second frame of the video, the correction coordinates of the remaining first feature points may refer to the coordinates of the remaining first feature points' corresponding feature points in the previous frame that has been corrected by video stabilization. The processing device <NUM> may estimate the one or more first motion parameters based on the current coordinates and the correction coordinates of the remaining first feature points. In some embodiments, the one or more first motion parameters may include a homography matrix. That is, the processing device <NUM> may estimate a homography matrix based on the current coordinates and the correction coordinates of the remaining first feature points.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may determine, in the target frame, at least one supplement feature point that is different from the remaining first feature points.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may designate the at least one supplement feature point and the remaining first feature points as second feature points associated with a frame immediately following the target frame in the video.

In some embodiments, in order to keep the number (or count) of the feature points to be tracked in each frame of the video within a certain range, the processing device <NUM> may determine one or more supplement feature points. For example, the number (or count) of the feature points to be tracked in each frame of the video may be kept consistent. As another example, for the frames of the video, a difference between the maximum number (or count) of the feature points to be tracked and the minimum number (or count) of the feature points to be tracked may be less than a difference threshold.

In some embodiments, the processing device <NUM> may determine a plurality of candidate feature points in the corrected target frame by performing feature point detection to the corrected target frame that is processed based on the one or more first motion parameters or the one or more second motion parameters. The processing device <NUM> randomly selects at least one of the plurality of candidate feature points. The count of the at least one selected candidate feature point is equal to the count of the one or more removed first feature points. The processing device <NUM> designates the at least one selected candidate feature point as the at least one supplement feature point.

In some embodiments, the processing device <NUM> may randomly determine at least one feature point with the same count as the count of the one or more removed first feature points in the corrected target frame that is processed based on the one or more first motion parameters or the one or more second motion parameters. The processing device <NUM> may designate the at least one feature point as the at least one supplement feature point.

In some embodiments, the number (or count) of the at least one supplement feature points may be the same as the number (or count) of the one or more removed first feature points, so that the number (or count) of the feature points used to perform video stabilization to each frame of the video may be consistent, which may avoids a sudden change of the feature points caused by feature point re-detection due to the reduction of the feature points, thereby avoiding video stuttering.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may stabilize the video in the target frame based on the plurality of first feature points. In some embodiments, the processing device <NUM> may stabilize the target frame based on the plurality of first feature points by performing an operation similar to the description in operation <NUM>.

In <NUM>, the processing device <NUM> (e.g., the processing module <NUM>) may designate the plurality of first feature points as the second feature points associated with the frame immediately following the target frame in the video.

In one embodiment, the processing device <NUM> may create a data group configured to store the historical coordinates of feature points to be tracked in the target frame. In some embodiments, when the processing device <NUM> removes the one or more first feature points relating to the moving object, the processing device <NUM> may remove the one or more first feature points relating to the moving object from the data group. In some embodiments, after correcting the target frame, the processing device <NUM> may determine one or more supplement feature points in the correct target frame and add the coordinates of the one or more supplement feature points in the correct target frame to the data group. Alternatively, the processing device <NUM> may transform the coordinates of the one or more supplement feature points in the correct target frame (or the target frame before correction) using the one or more second motion parameters and add the transformed coordinates of the one or more supplement feature points to the data group. In some embodiments, the historical coordinates may be the coordinates of the feature points stored in the data group.

For example, the processing device <NUM> may determine <NUM> first feature points such as a<NUM>-a<NUM> in the first frame as the feature points to be tracked in the second frame. The processing device <NUM> may store the historical coordinates of a<NUM>-a<NUM> in the data group. The historical coordinates of a<NUM>-a<NUM> may be the coordiants of a<NUM>-a<NUM> in the first frame. The processing device <NUM> may remove a<NUM>-a<NUM>. The processing device <NUM> may determine the one or more first motion parameters based on a<NUM>-a<NUM>. The processing device <NUM> may correct the second frame based on the one or more first motion parameters. The processing device <NUM> may determine supplement feature points a<NUM>-a<NUM> in the second frame. The processing device <NUM> may add the historical coordinates of a<NUM>-a<NUM> to the data group. The historical coordinates of a<NUM>-a<NUM> may be the coordinates of a<NUM>-a<NUM> in the corrected second frame, or the transformed coordinates of a<NUM>-a<NUM> processed using the one or more second motion parameters. The processing device <NUM> may designate a<NUM>-a<NUM> and a<NUM>-a<NUM> as the feature points to be tracked in the third frame.

When the third frame is determined as the target frame, for the third frame, the historical coordinates of a<NUM>-a<NUM> may be the coordinates of a<NUM>-a<NUM> in the first frame, and the historical coordinates of a<NUM>-a<NUM> may be the coordinates of a<NUM>-a<NUM> in the corrected second frame, or the transformed coordinates of a<NUM>-a<NUM> processed using the one or more second motion parameters. When the supplement feature point corresponds to the removed feature point, the historical coordinates of the supplement feature point may be re-determined based on the target frame, instead of using the coordinates of the removed feature point. For example, if the supplement feature points a<NUM>-a<NUM> correspond to the removed feature points a<NUM>-a<NUM>, the historical coordinates of a<NUM>-a<NUM> may be the coordinates of a<NUM>-a<NUM> transformed by the one or more first motion parameters or the one or more second motion parameters, instead of the coordinates of a<NUM>-a<NUM> in the first frame.

In the embodiment of the process <NUM>, the feature points related to the moving object may be removed. The motion compensation may not be needed to be performed to the target frame using the global feature points (e.g., all detected feature points), which may reduce the operation amount. The feature points to be tracked may be distributed on the background, which is more conducive to motion compensation of the video. In addition, since one or more new feature points are added after one or more feature points re removed, the number (or count) of the feature points to be tracked may be kept within a certain range and may not continue to decrease. Therefore, there is no need to re-detect feature points when the number (or count) of the feature points to be tracked is reduced to a certain threshold, and video stuttering may be avoided.

<FIG> are schematic diagrams illustrating examples of a first frame <NUM> and a second frame <NUM> of a video, respectively, according to some embodiments of the present disclosure. The first frame <NUM> and/or the second frame <NUM> may be processed based on the process <NUM> for video stabilization.

Merely by way of example, the second frame <NUM> may be the target frame. The processing device <NUM> may obtain the first frame <NUM>. The processing device <NUM> may perform feature point detection to the first frame <NUM> to determine <NUM> first feature points (e.g., including the feature points marked by star signs in <FIG>) to be tracked in the second frame <NUM>.

The processing device <NUM> may remove the first feature points relating to a moving object in the video (e.g., the <NUM> first feature points corresponding to the vehicle in the video) from the <NUM> first feature points. The processing device <NUM> may estimate the one or more first motion parameters based on the remaining <NUM> first feature points. The processing device <NUM> may perform the path planning or filtering to the second frame <NUM> according to the one or more first motion parameters. The processing device <NUM> may perform video stabilization to the second frame <NUM> by performing motion compensation to the second frame <NUM>.

The processing device <NUM> may determine <NUM> supplement feature points (e.g., the feature points marked with solid circles in <FIG>) in the second frame <NUM>. The processing device <NUM> may designate the <NUM> supplement feature points and the remaining <NUM> first feature points as feature points to be tracked in the third frame of the video. The <NUM> supplement feature points in the second frame <NUM> may be different from the remaining <NUM> first feature points.

In some embodiments, if the processing device <NUM> determines that the <NUM> first feature points include no feature point relating to the moving object, the processing device <NUM> may perform video stabilization to the second frame <NUM> based on the <NUM> first feature points. The processing device <NUM> may designate the <NUM> first feature points as the feature points to be tracked in the third frame of the video.

When the processing device <NUM> does not remove any one of the feature points to be tracked in the target frame, the feature points to be tracked in the target frame may still be used as the feature points to be tracked in the frame immediately following the target frame, which may ensure that the number (or count) of feature points to be tracked does not change, thereby avoiding the increase of the operation amount and the video stuttering.

<FIG> are schematic diagrams illustrating examples of a first frame <NUM>, a second frame <NUM>, and a third frame <NUM> of a video, respectively, according to some embodiments of the present disclosure. The first frame <NUM>, the second frame <NUM>, and/or the third frame <NUM> may be processed based on the process <NUM> for video stabilization.

Merely by way of example, the processing device <NUM> may perform feature point detection to the first frame <NUM> using the feature point detection algorithm of FAST, and determine <NUM> candidate feature points in the first frame <NUM>. The processing device <NUM> may select <NUM> of the <NUM> candidate feature points as the first feature points (e.g., the feature points marked with star signs in <FIG>) to be tracked in the second frame <NUM>. The processing device <NUM> may track the <NUM> first feature points using the KLT optical flow tracking algorithm.

The second frame <NUM> may be determined as the target frame. Since the displacement of the vehicle may be relatively small during a period of time between the first frame <NUM> and the second frame <NUM>, none of the12 first feature points corresponding to the vehicle maybe identified as the feature point relating to the moving object. The processing device <NUM> thus may not remove any one of the <NUM> first feature points. The processing device <NUM> may stablize the video in the second frame <NUM> based on these <NUM> first feature points, and may determine these <NUM> first feature points as the feature points to be tracked in the third frame <NUM>.

Then, the third frame <NUM> may be determined as the target frame. The four feature points corresponding to the vehicle may be determined as the feature points relating to the moving object. The processing device <NUM> may remove the <NUM> first feature points corresponding to the vehicle from the <NUM> first feature points. The processing device <NUM> may estimate the one or more first motion parameters based on the remaining <NUM> first feature points. The processing device <NUM> may perform the Gaussian filtering to the third frame <NUM> according to the one or more first motion parameters. The processing device <NUM> may stabilize the third frame <NUM> by performing motion compensation to the third frame <NUM>. The processing device <NUM> randomly determines four supplement feature points (e.g., the feature points marked with solid circles in <FIG>) in the third frame <NUM>. The processing device <NUM> designates the four supplement feature points and the remaining <NUM> first feature points are randomly selected, a total of <NUM> feature points, as the feature points to be tracked in the fourth frame of the video.

In some embodiments, the systems and/or the methods for video stabilization provided by the present disclosure may improve the probability that the feature points used to perform video stabilization are distributed on the background of the target frame, which may be more advantageous for performing motion compensation to the target frame.

Suppose that the probability that a feature point is not removed is p. The processing device <NUM> may perform feature point detection to the first frame to determine and track the first feature points. For the second frame, in the first feature points, the number (or count) of outliers (e.g., the feature points relating to the moving object) is a<NUM>, and the number (or count) of the feature points that are not related to the moving object is b<NUM>. From the nth frame, in the feature points to be tracked in the nth frame, the ratio of the outliers to the feature points to be tracked in the nth frame is an, and the ratio of the feature points that are not related to the moving object to the feature points to be tracked in the nth frame is bn. The feature points to be tracked in the nth frame may include the feature points to be tracked in the (n-<NUM>)th frame excluding the feature points relating to the moving object and the supplement feature points determined in the (n-<NUM>)th frame. an may be determined based on Equation (<NUM>) below: <MAT> wherein an-<NUM>(<NUM>-p) indicates the probability that the feature point related to the moving object in the (n-<NUM>)th frame is removed; an-<NUM>*p*<NUM> indicates the probability that the feature point removed in the nth frame is re-selected as the feature point to be tracked; bn-<NUM>*(<NUM>-p)*<NUM> indicates that the probability that the removed feature point is not related to the moving object and the supplement feature point is the outlier.

In the (n-<NUM>)th frame, an-<NUM>+bn-<NUM>=<NUM> , so Equation (<NUM>) may be transformed as Equation (<NUM>) below: <MAT>.

Equation (<NUM>) below may be obtained by transforming Equation (<NUM>): <MAT>.

Equation (<NUM>) below may be obtained by determining the limit of Equation (<NUM>): <MAT>.

That is to say, after several frames, the ratio of the outliers to the feature points to be tracked in the target frame may converge to <NUM>-p. The simulation test results show that the rate of convergence of Equation (<NUM>) is very fast, usually after <NUM> frames, p=<NUM>. At this time, the ratio of the outliers to the feature points to be tracked in the target frame is <NUM>. That is, the feature points to be tracked in the target frame may be converted to the background after about <NUM> frames. If the background of the video is unchanged, the feature points to be tracked in the target frame may be almost converged and does not change, which may improve the accuracy of estimating the one or more first motion parameters.

By using the methods and/or the systems for video stabilization provided in the present disclosure, in the target frame, the feature points determined as relating to the moving object may be removed. The target frame may be corrected based on the remaining feature points. After the correction, at least one supplement feature point may be determined in the target frame. The remaining feature points and the at least one supplement feature point may be designated as the feature points to be tracked in the frame immediately following the target frame. The methods and/or the systems for video stabilization provided in the present disclosure may make the feature points to be tracked gradually distribute on the background of the video, which may facilitate motion compensation for the video. Since the number (or count) of the feature points to be tracked does not change, video stuttering may be avoided.

It should be noted that the above description is merely provided for the purposes of illustration, and not intended to limit the scope of the present disclosure. For persons having ordinary skills in the art, multiple variations and modifications may be made under the teachings of the present disclosure. However, those variations and modifications do not depart from the scope of the present disclosure.

Having thus described the basic concepts, it may be rather apparent to those skilled in the art after reading this detailed disclosure that the foregoing detailed disclosure is intended to be presented by way of example only and is not limiting. Various alterations, improvements, and modifications may occur and are intended to those skilled in the art, though not expressly stated herein.

Furthermore, the recited order of processing elements or sequences, or the use of numbers, letters, or other designations therefore, is not intended to limit the claimed processes and methods to any order except as may be specified in the claims. For example, although the implementation of various components described above may be embodied in a hardware device, it may also be implemented as a software only solution, e.g., an installation on an existing server or mobile device.

Claim 1:
A method for video stabilization implemented on a machine (<NUM>) having one or more storage devices (<NUM>, <NUM>, <NUM>, <NUM>) and one or more processors (<NUM>, <NUM>, <NUM>), the method comprising:
obtaining a target frame (<NUM>, <NUM>) of a video, the target frame being different from a first frame (<NUM>, <NUM>) of the video;
obtaining a plurality of first feature points associated with the target frame (<NUM>, <NUM>);
determining whether the plurality of first feature points include at least one feature point relating to a moving object in the video;
in response to a determination that the plurality of first feature points include at least one feature point relating to the moving object in the video, removing the at least one feature point relating to the moving object;
performing video stabilization to the target frame (<NUM>, <NUM>) based on remaining first feature points of the plurality of first feature points;
determining a plurality of candidate feature points in the target frame (<NUM>, <NUM>);
randomly selecting at least one of the plurality of candidate feature points as at least one supplement feature point, a count of the at least one supplement feature point being equal to a count of the at least one removed first feature point; and
designating the at least one supplement feature point and the remaining first feature points as second feature points associated with a frame (<NUM>) immediately following the target frame (<NUM>, <NUM>) in the video, the second feature points being feature points to be tracked of the frame (<NUM>) immediately following the target frame (<NUM>, <NUM>).