Static video recognition

A method for mobile devices to identify static video through motion vector estimation and entropy scoring addresses the challenge of distinguishing static and moving images, optimizing storage and processing by identifying and deleting static footage.

JP7568597B2Active Publication Date: 2024-10-16GOOGLE LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2021150160
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-03-11
Filing Date
2021-09-15
Publication Date
2024-10-16
Estimated Expiration
2039-03-08

AI Technical Summary

Technical Problem

Mobile devices struggle to distinguish between static and moving images, leading to unnecessary storage of uninformative static video footage, which can be exacerbated by hand shake and other forms of motion.

Method used

A computer-implemented method involving downsampling, smoothing, and gradient calculations to estimate local and global motion vectors, followed by entropy scoring to identify static video frames, allowing for efficient storage management.

Benefits of technology

Effectively identifies static video, reducing storage needs and processor usage by distinguishing between static and moving footage, even in the presence of hand shake or localized motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007568597000001
    Figure 0007568597000001
  • Figure 0007568597000002
    Figure 0007568597000002
  • Figure 0007568597000003
    Figure 0007568597000003
Patent Text Reader

Abstract

To provide a computer-implemented method, a system, and a computer-readable medium for recognizing a static video.SOLUTION: A method includes obtaining an input video frame from among one or more video frames of an input video. The video frames are obtained prior to receiving a shutter press indication and following a receiving of the shutter press indication. The method further includes downsampling, smoothing, computing a temporal gradient, estimating local motion, estimating global motion, computing one or more subject motion vectors, converting the one or more subject motion vectors into a score map, computing an entropy score based on the score map, mapping the entropy score, identifying a number of static frames, and determining that the input video is a static video if a ratio of the number of static frames to a number of the video frames in the input video meets a static frame threshold.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] Some mobile devices may include the ability to capture video and still images. In some cases, video may be captured that records images occurring immediately before and after detecting a shutter press to capture a still image. Such video may be interesting and useful for capturing images of subjects that a single still image may not contain. However, video of static or generally static scenes such as buildings or landscapes may not be informative to the user and may not be worth storing in on-device memory or external storage. Technical difficulties exist for distinguishing between still and moving video. For example, when an image is captured using a mobile device, the user's hands may be shaking enough that the video appears as if it contains movement. Regarding moving images, US Patent Application Publication No. 2016 / 0267325 discloses a technique for detecting moving frames in a video stream. Therefore, it may be useful to recognize that the footage is static (eg, a recording of a relatively static scene or subject).

[0002] The background discussion provided herein is intended to generally present the context of the present disclosure. The inventors' currently identified work, to the extent described in this background section, and aspects of the discussion that may not otherwise qualify as prior art at the time of filing, are not expressly or implicitly admitted as prior art to the present disclosure. Summary of the Invention [Problem to be solved by the invention]

[0003] overview Certain embodiments relate generally to mobile device image capture, and more particularly, to methods and systems for static video recognition. [Means for solving the problem]

[0004] An embodiment may include a computer-implemented method. The method may include obtaining an input video frame from among one or more video frames of an input video, the video frames being obtained before receiving a shutter press instruction and after receiving a shutter press instruction. The method further includes downsampling the input video frame to generate a downsampled video frame. The method further includes smoothing the downsampled video frame to generate a smoothed video frame. The method further includes calculating temporal and spatial gradients of the smoothed video frame. The method further includes estimating local motion by calculating a local motion vector corresponding to each candidate pixel patch from among one or more candidate pixel patches in the smoothed video frame, the local motion vector being based on the spatial and temporal gradients. The method further includes estimating global motion by calculating a global motion vector corresponding to the smoothed video frame. The method further includes calculating one or more object motion vectors based on the corresponding local and global motion vectors. The method further includes converting the one or more object motion vectors to a score map. The method further includes calculating an entropy score based on the score map. The method further includes mapping the entropy score to a subject motion score corresponding to the smoothed video frame. The method further includes identifying a number of static frames based on the subject motion score. The method further includes determining that the input video is a static video if a ratio of a number of static frames to a number of video frames in the input video satisfies a static frame threshold, and determining that the input video is a motion video if the ratio does not satisfy the static frame threshold. The method further includes mapping the entropy score to a subject motion score corresponding to the smoothed video frame. performing a first action if the input image is recognized as a static image. The method further includes performing a second action if the input image is recognized as a motion image.

[0005] The method may also include converting the downsampled video frame from color to grayscale before smoothing. In an embodiment, calculating spatial and temporal gradients for the smoothed video frame includes marking underexposed pixels in the smoothed video frame and overexposed pixels in the smoothed video frame as invalid, and includes calculating temporal gradients, calculating spatial gradients in an x ​​direction, and calculating spatial gradients in a y direction for valid pixels in the smoothed video frame. In an embodiment, the one or more candidate pixel patches are determined by selecting one or more grid points as reference points in the smoothed video frame for motion estimation, selecting a pixel patch width and a pixel patch height for a pixel patch corresponding to each of the one or more grid points, calculating statistics for each pixel patch, determining whether the pixel patch has a texture that meets a threshold texture value, and identifying the pixel patch as a candidate pixel patch for motion estimation if the pixel patch has a texture that meets the threshold texture value. In an embodiment, calculating local motion vectors includes calculating local x motion values ​​and local y motion values ​​based on the spatial and temporal gradients for pixels in the candidate pixel patch. In one embodiment, calculating a global motion vector includes calculating a global motion vector based on an average of valid local motion vectors. In one embodiment, calculating one or more object motion vectors includes subtracting a global motion vector from each local motion vector. In one embodiment, converting one or more object motion vectors to a score map includes normalizing a magnitude of each object motion vector for pixels in the smoothed video frame. In one embodiment, calculating an object motion score that is anti-correlated to the entropy score on the score map includes assigning a higher score to the smoothed video frame if the motion is localized and assigning a lower score to the smoothed video frame if the motion is global within the smoothed video frame.In one embodiment, the first operation includes marking the input video as static, retaining in storage a shutter image corresponding to the input video, and deleting the input video from the storage. In one embodiment, the second operation includes retaining in storage the input video and the shutter image corresponding to the input video.

[0006] An embodiment may include a system that may include one or more processors and a memory storing instructions that, when executed by the one or more processors, cause the one or more processors to perform a number of operations including obtaining an input video frame from among one or more video frames of an input video, the video frames being obtained before receiving a shutter press instruction and after receiving a shutter press instruction, the number of operations further including downsampling the input video frame to generate a downsampled video frame, smoothing the downsampled video frame to generate a smoothed video frame, calculating temporal and spatial gradients of the smoothed video frame, and calculating a time gradient and a spatial gradient of the smoothed video frame within the smoothed video frame. estimating local motion by calculating a local motion vector corresponding to each candidate pixel patch from among the one or more candidate pixel patches, the local motion vectors being based on spatial and temporal gradients, the operations further including estimating global motion by calculating a global motion vector corresponding to the smoothed video frame; calculating one or more subject motion vectors based on the corresponding local and global motion vectors; converting the one or more subject motion vectors into a score map; calculating an entropy score based on the score map; and mapping the entropy score to a subject motion score corresponding to the smoothed video frame. identifying a number of static frames based on the subject motion score; determining that the input video is a static video if a ratio of the number of static frames to the number of video frames in the input video satisfies a static frame threshold, and determining that the input video is a motion video if the ratio does not satisfy the static frame threshold; performing a first operation if the input video is recognized as a static video; and performing a second operation if the input video is recognized as a motion video.

[0007] In one embodiment, the instructions further cause the one or more processors to perform a number of operations including converting the downsampled video frame from color to grayscale before smoothing. In one embodiment, calculating spatial and temporal gradients for the smoothed video frame includes marking underexposed pixels in the smoothed video frame and overexposed pixels in the smoothed video frame as invalid, and for valid pixels in the smoothed video frame, calculating temporal gradients, calculating spatial gradients in an x-direction, and calculating spatial gradients in a y-direction. In one embodiment, the one or more candidate pixel patches include selecting one or more grid points as reference points in the smoothed video frame for motion estimation, selecting a pixel patch width and a pixel patch height for a pixel patch corresponding to each of the one or more grid points, calculating statistics for each pixel patch, determining whether the pixel patch has a texture that meets a threshold texture value, and identifying the pixel patch as a candidate pixel patch for motion estimation if the pixel patch has a texture that meets the threshold texture value.

[0008] An embodiment may include a non-transitory computer readable medium having instructions that, when executed by one or more computers, cause the one or more computers to perform a plurality of operations including obtaining an input video frame from among one or more video frames of an input video, the video frames being obtained before receiving a shutter press instruction and after receiving a shutter press instruction, the plurality of operations further including downsampling the input video frame to generate a downsampled video frame, smoothing the downsampled video frame to generate a smoothed video frame, calculating temporal and spatial gradients of the smoothed video frame, and estimating local motion by calculating a local motion vector corresponding to each candidate pixel patch from among one or more candidate pixel patches in the smoothed video frame, the local motion vector being based on the spatial and temporal gradients, The method further includes estimating overall motion by calculating a global motion vector corresponding to the smoothed video frame, calculating one or more subject motion vectors based on corresponding local and global motion vectors, converting the one or more subject motion vectors into a score map, calculating an entropy score based on the score map, mapping the entropy score to a subject motion score corresponding to the smoothed video frame, identifying a number of static frames based on the subject motion score, determining that the input video is a static video if a ratio of the number of static frames to the number of video frames in the input video satisfies a static frame threshold, and determining that the input video is a motion video if the ratio does not satisfy the static frame threshold, performing a first operation if the input video is recognized as a static video, and performing a second operation if the input video is recognized as a motion video.

[0009] In one embodiment, the operations further include converting the downsampled video frame from color to grayscale before smoothing. In one embodiment, calculating spatial and temporal gradients for the smoothed video frame includes marking underexposed pixels in the smoothed video frame and overexposed pixels in the smoothed video frame as invalid, calculating temporal gradients for valid pixels in the smoothed video frame, and calculating a gradient in the x-direction. The method includes calculating a spatial gradient in the y direction and calculating a spatial gradient in the y direction. In one embodiment, the one or more candidate pixel patches include selecting one or more grid points as reference points in the smoothed video frame for motion estimation, selecting a pixel patch width and a pixel patch height for a pixel patch corresponding to each of the one or more grid points, calculating statistics for each pixel patch, determining whether the pixel patch has a texture that meets a threshold texture value, and identifying the pixel patch as a candidate pixel patch for motion estimation if the pixel patch has a texture that meets the threshold texture value. In one embodiment, calculating the local motion vector includes calculating a local x motion value and a local y motion value based on the spatial gradient and the temporal gradient for pixels in the candidate pixel patch. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a block diagram of an example system and network environment that may be used for one or more embodiments described herein. [Diagram 2] 1 is a flow diagram illustrating an example method for static video recognition according to an embodiment. [Diagram 3] FIG. 2 is an example video and shutter press timeline diagram according to an embodiment. [Figure 4] 1 is a flow diagram illustrating an example method for static video recognition according to an embodiment. [Diagram 5] FIG. 1 is a block diagram of an example device that may be used for one or more embodiments described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] The systems and methods provided herein may overcome one or more shortcomings of some conventional imaging systems and methods. For example, imaging devices (e.g., smartphones, etc.) allow users to capture video and still images with a single shutter press event. Certain embodiments of the systems and methods provided herein may recognize static video (e.g., video of a static scene or static subject) and may take action (e.g., delete or remove static video from storage) based on the recognition of static video, which may help reduce memory usage, communication bandwidth usage, and / or processor cycle usage. In particular, certain embodiments may help compensate for global motion in image capture (e.g., camera shake in a smartphone or other device during image capture), and may help reduce detection of motion when the motion is widespread across a frame by using an entropy calculation-based scoring system to highlight localized subject motion (e.g., a child playing) and help attenuate widespread general motion (e.g., leaves moving in the wind). Some conventional imaging systems may not provide an efficient and effective way to recognize static video, and efficiently and effectively recognizing static video may be useful to users.

[0012] 1 illustrates a block diagram of an exemplary network environment 100 that may be used in certain embodiments described herein. In certain embodiments, the network environment 100 includes one or more server systems, e.g., server system 102 in the illustration of FIG. 1. The server system 102 may be in communication with a network 130, for example. The server system 102 may include a server device 104 and a database 106 or other storage device. The network environment 100 may also include one or more client devices, e.g., client devices 120, 122, 124, and 126, that may communicate with each other and / or with the server system 102 over the network 130. The network 130 may include any of a variety of networks, including the Internet, a local area network, a public network, a public data center ... The network 130 may be any type of communications network, including one or more of a LAN, a wireless network, a switched or hub connection, etc. In an embodiment, the network 130 may include peer-to-peer communications 132 between devices, for example, using a peer-to-peer wireless protocol.

[0013] For ease of explanation, FIG. 1 shows one block for server system 102, server device 104, and database 106, and four blocks for client devices 120, 122, 124, and 126. The blocks representing server systems 102, 104, and 106 may represent multiple systems, server devices, and network databases, and the blocks may be provided in configurations different than those shown. For example, server system 102 may represent multiple server systems that may communicate with other server systems over network 130. In some examples, database 106 and / or other storage devices are provided in a server system block separate from server device 104 and may communicate with server device 104 and other server systems over network 130. Also, there may be any number of client devices.

[0014] Each client device can be any type of electronic device, such as a desktop computer, a laptop computer, a portable or mobile device, a camera, a mobile phone, a smartphone, a tablet computer, a television, a television set-top box or entertainment device, a wearable device (e.g., display glasses or goggles, a head mounted display (HMD), a watch, a headset, an armband, jewelry, etc.), a virtual reality (VR) and / or augmented reality (AR) enabled device, a personal digital assistant (PDA), a media player, a gaming device, etc. Some client devices may also have a local database similar to database 106 or other storage. In other embodiments, network environment 100 may not have all of the components shown and / or may have other components, including other types of components, instead of or in addition to the components described herein.

[0015] In various embodiments, end users U1, U2, U3, and U4 may include one or more participants in a conversation and can communicate with server system 102 and / or with each other using their respective client devices 120, 122, 124, and 126. In some examples, users U1, U2, U3, and U4 can interact with each other via applications executing on their respective client devices and / or server system 102 and / or via network services implemented on server system 102, such as image sharing services, messaging services, social networking services, or other types of network services. For example, each client device 120, 122, 124, and 126 can communicate data to or from one or more server systems (e.g., server system 102).

[0016] In some embodiments, the server system 102 can provide appropriate data to the client devices so that each client device can receive communication or shared content uploaded to the server system 102 and / or the network service. In some examples, users can interact via audio or video conferencing, audio, video, or text chat, or other communication methods or applications. In some examples, the network service allows users to perform various communications, form links and associations, and share images, image compositions (e.g., albums including one or more images, image collages, videos, etc.), audio data, and other information. A network service may include any system that enables a user to upload and post shared content, such as video and other types of content, receive various forms of data, and / or perform socially related functions. For example, a network service may enable a user to send messages to a specific or multiple other users, form social links in the form of associations to other users in the network service, group other users into user lists, friend lists, or other user groups, post or transmit content including text, images, image compositions, audio sequences, or recordings, or other types of content for access by a designated set of users of the network service, participate in live video, audio, and / or text video conferences, or chat with other users of the service. In some embodiments, a "user" may include one or more programs or virtual entities as well as a person that interfaces with a system or network.

[0017] The user interface may enable images, image compositions, data, and other content, as well as communications, privacy settings, notifications, and other data to be displayed on the client devices 120, 122, 124, and 126 (or alternatively on the server system 102). Such interfaces may be displayed using software on the client devices, software on the server device, and / or a combination of client and server software executing on the server device 104, e.g., application software or client software in communication with the server system 102. The user interface may be displayed by a display device of the client device or server device, e.g., a display screen, projector, etc. In an embodiment, an application program executing on the server system may communicate with the client devices to receive user input at the client devices and output data, such as visual data, audio data, etc., at the client devices.

[0018] Various embodiments of the features described herein can be used in any type of system and / or service. For example, a social networking service, an image collection and sharing service, an assisted messaging service, or other network service (e.g., connected to the Internet) can include one or more of the described features accessed by a client device and a server device. Any type of electronic device can utilize the features described herein. An embodiment can provide one or more of the features described herein on a client device or a server device that is disconnected or intermittently connected to a computer network. In some examples, a client device that includes or is connected to a display device can inspect and display images stored in a storage device local to the client device (e.g., not connected via a communication network) and provide user-viewable features and results as described herein.

[0019] FIG. 2 is a flow diagram illustrating an example method 200 (e.g., a computer-implemented method) for recognizing static video, according to an embodiment. Static video may include video in which a given percentage of frames of the video are determined to be static as described herein. Static video may also include video in which the video is static for a certain portion of time, and motion may occur in other portions of time (e.g., the video is stationary from the beginning to near the end of the video, such as when a subject moves or when a device capturing an image is lowered or moved). Alternatively, video in which motion occurs in a certain portion of the video (e.g., at the beginning, middle, or end) may be recognized as motion video or static video, depending on the particular implementation. In general, parameters for recognizing static video may be determined according to the parameters disclosed herein. Parameters may be added, adjusted, configured, or removed based on the intended application or implementation of the subject matter. Such parameters may include a threshold for local motion estimation, a threshold for a subject motion score, a threshold for the ratio of frames having a subject motion score that meets a threshold relative to other frames of a video, etc. Thresholds are described in more detail below with reference to FIG.

[0020] In an embodiment, method 200 (and method 400) may be implemented, for example, on server system 102, as shown in FIG. 1. In other embodiments, some or all of method 200 may be implemented on one or more client devices 120, 122, 124, or 126, on one or more server devices, and / or on both server and client devices, as shown in FIG. 1. In the illustrated example, the implementation system includes one or more digital hardware processors or processing circuits ("processors") and one or more storage devices (e.g., database 106 or other storage devices). In an embodiment, different components of one or more servers and / or clients may perform different blocks or other portions of method 200.

[0021] An embodiment may initiate method 200 based on user input and / or device context (obtained with user permission). A user may, for example, select to initiate method 200 from a displayed user interface. In an embodiment, method 200, or portions thereof, may be performed with user guidance via user input. For example, an embodiment may include presenting the user with an option to enable or disable static video recognition. The system may not use, process, or store user information, such as video and image information, without explicit permission from the user.

[0022] In some embodiments, method 200 may be invoked automatically (or may be invoked automatically with user permission). For example, recognition of static footage may be performed automatically when a user is taking a photo and may be used to determine whether to present the user with footage associated with the photo (e.g., if the footage is recognized as static, the footage may not be presented or stored; if the footage is determined to be motion footage, the footage may be stored and presented to the user, e.g., when the user views the photo with which the footage is associated).

[0023] In an embodiment, method 200 or a portion of the method may be automatically initiated by the device. For example, the method (or a portion thereof) may be performed periodically or based on the occurrence of one or more particular events or conditions. For example, such events or conditions may include a given number of photos acquired by a user and received, uploaded, or otherwise accessible by the device (e.g., a user device), a predetermined amount of time that has elapsed since the last execution of method 200, and / or the occurrence of one or more other events or conditions that may be specified in the settings of the device performing method 200. In an embodiment, such conditions may be specified in advance by the user in the user's stored custom preferences (accessible by the device or method with the user's consent). In some examples, a device (server or client) may perform method 200 with access to one or more applications that receive electronic conversation messages (if user consent is received). In another example, a camera, cell phone, tablet computer, wearable device, or other client device may acquire video and still images and perform method 200. Additionally or alternatively, a client device may transmit one or more videos over a network to a server, which processes the videos using method 200. The above description of method 200 also applies to method 400.

[0024] At 202, input video including frames is received. For example, the video may be captured by a client device, such as a mobile device, associated with a user. The video may be captured in response to a shutter press of a camera or other imaging device to capture a frame. For example, a user may open a camera application on a smartphone or other mobile device. The camera application may begin acquiring video images before a shutter press instruction is received and continue to capture video after the shutter press instruction is received. Thus, the video captures the moments immediately before and after the shutter press within the camera application running on the smartphone. Processing proceeds to 204.

[0025] 3, video 302 may include frames (304, 306) captured before a shutter press indication 310 and a frame (308) captured after the shutter press indication 310. Video may also be captured in a similar manner within a camera or other image capture device. Pre-processing may include downsampling, conversion to grayscale, and / or smoothing.

[0026] At 204, frames of the input video are pre-processed. Exemplary pre-processing details are described below in conjunction with 404-408 of FIG.

[0027] At 206, local motion is estimated. Local motion includes motion that is part of a subset of a frame of video, such as motion associated with fluttering leaves. For example, local motion vectors may be calculated that represent an estimate of local motion within one or more pixel patches (i.e., sections or groups of pixels) of a video frame. Exemplary local motion estimation details are described below in FIG. 4 at 410-424. Processing continues at 208.

[0028] At 208, global motion is compensated for. Global motion may include motion occurring in all or most of the frames of the video. Global motion may result from hand motion. For example, a user taking a picture with a smartphone may have some hand motion before, during, and / or after capturing the image due to camera shake, accidental dropping of the smartphone, etc. The user's hand motion may appear as global motion in the video covering the period from before the shutter press to after the shutter press. Global motion compensation reduces or eliminates the effects of global motion, allowing the system to recognize static video more accurately than if the global motion artifacts were not compensated for. Exemplary global motion compensation details are described below at 426-428 of FIG. 4. Processing continues at 210.

[0029] At block 210, an object motion score is calculated based on the entropy of the local motion estimates adjusted by global motion compensation. Details of the entropy-based object motion score calculation are described below in FIG. 4 at 430-432. The process proceeds to 212. nothing.

[0030] At 212, the object motion scores are normalized. The process proceeds to 214. At step 214, it is determined whether the input video is a static video. The determination may include using a system or method described herein to recognize static scene or object video and provide a display of the static scene or object video (or of motion video in the absence of static video recognition). Processing proceeds to 216 or 218 based on the determination.

[0031] If the input video is not a static video, then both the input video and the frames are provided to the user at 216. In some embodiments, both the input video and the frames are included in the storage. If the input video is a static video, then the frames are provided to the user, rather than the input video, at 218. In some embodiments, the frames are kept in the storage, rather than the input video.

[0032] In Figures 2 and 4, various blocks (e.g., blocks 202-218 and 402-440, respectively) are shown as being executed sequentially. However, it should be understood that one or more of these blocks may be conveniently rearranged to suit a particular implementation, and that these blocks, or portions thereof, may be executed simultaneously in some implementations. It should also be understood that in some examples, various blocks may be eliminated, split into additional blocks, and / or combined with other blocks. The table may then be used to determine a threshold value based on the values ​​in the table.

[0033] 4 is a flow diagram illustrating an exemplary method for recognizing static video, according to one embodiment. In FIG. 4, 402 and 412 are data or data storage, and are shown with dashed lines to help illustrate the method.

[0034] During operation, a video frame 402 is obtained. An input video frame may be obtained from among one or more video frames of a video, the video frames obtained before and after receiving a shutter press indication. For example, a video frame may be captured a predetermined amount of time before and after the shutter press indication, such as 2 seconds before and after the shutter press indication.

[0035] At 404, the video frames are downsampled. Downsampling may include reducing the size (file size, frame size, video resolution, etc.) of the video frames to improve processing time, reduce memory usage, etc. Processing continues to 406.

[0036] At 406, the video frames are converted to grayscale. Converting to grayscale can help speed up processing time and reduce memory usage, since color may not be necessary to recognize static video. Processing continues to 408.

[0037] At 408, the downsampled grayscale image is smoothed as described below.

[0038] 404-408 may include pre-processing. For example, the input video frame 402 may be high resolution, e.g., 4032x3024. To reduce computation, the input video frame 402 is first downsampled to a much smaller frame I, e.g., 64x48. The input video frame may be in Bayer Red Green Blue (RGB) format or YUV format, as the case may be. The color video frame may be converted to a grayscale frame, since the grayscale frame may be used to detect whether there is motion. For example, a 64x48 Bayer frame is acquired and downsampled. The Bayer frame may be converted to a grayscale image by averaging the R, Gr, Gb, B channels. To quickly convert the 12 / 14 / 16-bit Bayer data to 8-bit and preserve the dynamic range, the mean value of the Bayer frame is calculated and the pixels are scaled by the desired mean / average value, where the desired mean value is a manually selected value, e.g., desired mean=128.

[0039] To improve the robustness of the technique to image noise, the input frame I is filtered using a Gaussian filter. The resulting frame can be denoted as I_smoothed. The previous frame, which has been Gaussian smoothed, is denoted as I_smoothed_previous.

[0040] After pre-processing, local motion is estimated, for example, in blocks 410-424.

[0041] At 410, temporal gradients are calculated using the previous frame from a frame buffer 412 and the current video frame 402. At 414, spatial gradients are calculated using the current video frame.

[0042] In one embodiment, to accelerate local motion estimation, the spatial and temporal gradients of the input frames can be pre-computed. For example, the spatial and temporal gradients can be calculated as follows:

[0043] All overexposed pixels (eg, pixels with intensity above a threshold, eg, over_expose_threshold) and underexposed pixels (eg, pixels with intensity below a threshold, eg, under_expose_threshold) are marked as invalid pixels.

[0044] under_expose_threshold≦I_smoothed(x,y)≦over_expose_threshold, under_expose_threshold <I_smooothed_previous(x,y)<over_expose_thresholdで can be, under_expose_threshold <I_smoothed(x+1,y)<over_expose_thresholdであり、 under_expose_threshold <I_smoothed(x-1,y)<over_expose_thresholdであり、 under_expose_threshold <I_smoothed(x,y+1)<over_expose_thresholdであり、 under_expose_threshold <I_smoothed(x,y-1)<over_exposed_thresholdであるな Then, Valid(x,y) = 1.

[0045] In other cases, Valid(x,y)=0. For a valid pixel with Valid(x,y)=1, the three gradients I_t(x,y), I_x( x,y), I_y(x,y) are calculated as follows:

[0046] The time gradient, i.e., the pixel difference between I_smoothed and I_smoothed_previous, is expressed as I_t(x,y)=I_smoothed(x,y)-I_smoothed_previous(x,y).

[0047] The spatial gradient of I_smooothed along the x direction is I_x(x,y)=(I_smoothed(x+1,y )-I_smoothed(x-1,y) / 2.

[0048] The spatial gradient of I_smoothed along the y direction is I_y(x,y)=(I_smoothed(x,y+1 )-I_smoothed(x,y-1) / 2.

[0049] For invalid pixels where Valid(x,y)=0, set the set I_t(x,y)=I_x(x,y)=I_y(x,y)=0.

[0050] Processing proceeds to 416. At 416, a grid of points is generated and at 418, a patch of pixels is determined for each grid point.

[0051] For example, i in a frame is between 1 and gridWidth, and j is between 1 and gridHeight. A grid of points p(ij) is computed to perform local motion estimation. When computing the grid, a certain percentage margin on each side can be left out, for example 6.25%. The grid points may be equally spaced, for example 4 pixels apart along the x direction and 4 pixels apart along the y direction. For example, if the frame size is 64x48, then the grid points may be 64x6.2 pixels apart on all four sides. Remove 5%=4 pixels, leaving a grid with gridWidth=15 by gridHeight=11.

[0052] Processing proceeds to 420. At 420, statistics are calculated for each patch of pixels. For example, For each point p(i,j) in the grid, subtract patchWidth×patchHeight( For example, we get patchWidth = patchHeight = 7).

[0053] First, we collect a set of statistics for this patch. Ixx is the average of I_x(x,y)×I_x(x,y) for all pixels in the patch.

[0054] Iyy is the average of I_y(x,y)×I_y(x,y) for all pixels in the patch.

[0055] Ixy is the average of I_x(x,y)×I_y(x,y) for all pixels in the patch.

[0056] Ixt is the average of I_x(x,y)×I_t(x,y) for all pixels in the patch.

[0057] Iyt is the average of I_y(x,y)×I_t(x,y) for all pixels in the patch.

[0058] The computation of the statistics can be optimized by using integral images. Processing proceeds to 422.

[0059] At 422, it is determined whether each patch has a texture that meets the texture threshold. Since it is not useful to detect motion using textureless patches, it may be useful to check the texture of the patch. Also, patches on edges may not be useful to use since the motion may be arbitrary along the edge detection. As a result, if the texture does not meet the texture threshold, in one embodiment, the method 400 starts at step 402 until the texture meets the texture threshold. Checking for a suitable texture may include the following:

[0060] The Hessian of the above patch is a 2x2 matrix. {Ixx Ixy Ixy Iyy} The determinant of this matrix is ​​denoted as det. This matrix has two eigenvalues, the larger one is called max_eigenvalue and the smaller one is called min_eigenvalue.

[0061] A patch must meet the following conditions to be considered to have sufficient texture: det>0, and min_eigenvalue>EigenvalueThreshold×frameWidth×frameHeight, and max_eigenvalue <EigenvalueRatioThreshold×min_eigenvalue EigenvalueThreshold can be manually adjusted, a typical value is 0.0025.

[0062] EigenvalueRatioThreshold can also be manually adjusted, with a typical value of 5. If a patch fails the above condition checks, the motion vectors of that patch are set as unavailable and this patch will be excluded in the following steps. motion_x=not available. motion_y=not available.

[0063] For patches having a texture that satisfies the texture threshold, processing proceeds to 424 . At 424, a local motion vector is calculated to estimate the local motion of the corresponding patch. The local motion vector can correspond to each candidate pixel patch from among one or more candidate pixel patches in the smoothed video frame, and the local motion vector is based on spatial and temporal gradients. For example, motion_x=(-Ixt×Iyy-Iyt×Ixy) / det motion_y=(Ixt×Ixy-Iyt×Ixx) / det Processing proceeds to 426.

[0064] At 426, a global motion vector is calculated to estimate the global motion. In one embodiment, the global motion vector corresponds to the smoothed video frame. When a user captures a photo or video on a mobile device, there is often small hand motion, so an estimate of the global camera motion between the current frame and the previous frame is useful to compensate for the global motion. The camera motion may be modeled as a translation vector [global_motion_x, global_motion_y] and estimated by averaging the valid motion vectors from the previous step. Alternatively, if more computation is available, an affine model or homography model may be used with random sample consensus (RAN SAC) to estimate the global motion more accurately. The process proceeds to 428.

[0065] At 428, the object motion vector is calculated by subtracting the global motion vector from the local motion vector. For example, The global motion is subtracted from the motion vector to obtain the object motion vector. Get [subject_motion_x,subject_motion_y]=[motion_x-global_motion_x,motion_y-global_motion_y].

[0066] Processing proceeds to 430. At 430, a score for each patch is calculated and put into a score map. For example, For each patch, we convert the magnitude of the motion vector into a score between 0 and 1, and create a score map as follows: score(ij)=1-exp(-(subject_motion_x(i,j)×subject_motion_x(i,j)+subject_motion_y(i,j)×subject_motion_y(i,j)) / motion_param) motion_param can be determined manually, and in one embodiment a typical value is 3.

[0067] Processing proceeds to 432. At 432, an entropy-based object motion score is calculated for the video frame. The object motion score can be based on corresponding local and global motion vectors. For example, First, calculate the entropy score of the score map as follows:

[0068] For all k and l, total_score = sum(score(k,l) + Epsilon). p(k,l)=(score(k,l)+Epsilon) / total_score. entropy=-sum(Log[p(k,l)]×p(k,l)) Epsilon can be a fraction to avoid problems caused by 0.

[0069] The entropy is then mapped to a subject_motion_score corresponding to the smoothed video frames where the subject_motion_score is between 0 and 1 using a non-linear mapping function.

[0070] subject_motion_score=1-exp(entropy×subject_motion_param1)×subject_motion_param2 subject_motion_param1 and subject_motion_param2 are two parameters that are manually adjusted.

[0071] This subject_motion_score will be large when there is a lot of subject motion in the scene. When the scene is stationary, it will be very close to 0.

[0072] Processing proceeds to 434. At 434, the object motion scores for one or more frames are normalized. For example, For each video, every frame (with frame number i) processed for static video recognition received an object motion score (i). The maximum object motion score is expressed as:

[0073] For all i, subject_motion_score_max = max(subject_motion_score(i)) If subject_motion_score_i is not too small, normalize subject_motion_score_i by subject_motion_score_max. For example, normalized_subject_motion_score_i=subject_motion_score_i / subject_motion_score_max when subject_motion_score_i>subject_motion_min_threshold Otherwise, normalized_subject_motion_score_i = subject_motion_score_i Processing proceeds to 436.

[0074] At 436, the normalized object motion score is thresholded. For example, Count the number of frames that have a low normalized object motion score.

[0075] number_of_static_frames=count(normalized_subject_motion_score_i <normalized_subject_motion_score_threshold) Processing proceeds to 438.

[0076] At 438, the ratio of video frames identified as static to all frames in the video is compared to a static frame ratio threshold. For example, with number_of_static_frames / number_of_all_frames>static_frame_ratio_threshold If yes, mark the video as a static video, otherwise do not mark the video as a static video.

[0077] Processing proceeds to 440. At 440, an action is taken based on whether the footage is recognized as static footage. For example, one action is taken if the footage is recognized as static, and another action is taken if the footage is recognized as not static. In some examples, when the footage is recognized as static, the footage may be marked as static, a shutter image (or still image) corresponding to the footage may be retained in storage, and the footage may be deleted from storage. When the footage is recognized as not static, both the shutter image (or still image) and the footage may be retained in storage (e.g., memory), and in some examples, the footage may be presented to a user, e.g., on a display device of a user device or other device. The images may be displayed as successive frames on the screen.

[0078] 5 is a block diagram of an example device 500 that may be used to implement one or more features described herein. In one example, the device 500 may be used to implement a computing device, e.g., a server device (e.g., the server device 104 of FIG. 1), and perform implementations of suitable methods described herein. The device 500 may be any suitable computing system, server, or other electronic or hardware device. For example, the device 500 may be a mainframe computer, a desktop computer, a workstation, a portable computer, or an electronic device (handheld device, mobile device, mobile phone, smartphone, tablet computer, television, television set-top box, personal digital assistant (PDA), media player, gaming device, wearable device, etc.). In an embodiment, the device 500 includes a processor 502, a memory 504, and an I / O interface 506.

[0079] The processor 502 may be one or more processors and / or processing circuits that execute program code and control the basic operation of the device 500. A "processor" includes any suitable hardware and / or software system, mechanism, or component that processes data, signals, or other information. A processor may include a system having a general-purpose central processing unit (CPU), multiple processing units, dedicated circuits to accomplish functions, or other systems. Processing need not be limited to a particular geographic location or have time limitations. For example, a processor may perform its functions in "real-time," "offline," "batch mode," etc. Portions of processing may be performed at different times and in different locations by different (or the same) processing systems. A computer may be any processor in communication with a memory.

[0080] Memory 504 is typically provided within device 500 for access by processor 502 and may be any suitable processor-readable storage medium suitable for storing instructions for execution by the processor, such as random access memory (RAM), read only memory (ROM), electrically erasable read only memory (EEPROM), flash memory, etc., and may be located separately from and / or integral with processor 502. Memory 504 may store software operated by processor 502 on server device 500, including an operating system 508, one or more applications 510, e.g., a static video recognition application 512, other applications 514, and application data 520. In an embodiment, application 510 may include instructions that enable processor 502 to perform some or all of the functions described herein, e.g., the methods of FIG. 2 and / or FIG. 4.

[0081] Other applications 514 (or engines) may also or alternatively be included in the applications 510, for example, a camera application, an email application, SMS and other telephony applications, a web browser application, a media display application, a communication application, a web hosting engine or application, a social networking engine or application, and the like. Alternatively, any software in the memory 504 may be stored in any other suitable storage location or computer-readable medium. Additionally, the memory 504 (and / or other connected storage devices) may store application data, such as electronic conversation messages, groups of electronic conversation messages, conversation framing elements, user data and preferences, and other instructions and data used in the features described herein. The memory 504 and any other type of storage (magnetic disk, optical disk, etc.) may be connected to the application 510, such as a USB flash drive, ... , magnetic tape, or other tangible media) may be considered “storage” or a “storage device.” For example, application data 520 may include images 522 and videos 524.

[0082] The I / O interface 506 can provide functionality that allows the device 500 to interface with other systems and devices. For example, network communication devices, storage devices (e.g., memory and / or database 106), and input / output devices can communicate through the I / O interface 506. In an embodiment, the I / O interface can connect to interface devices including input devices (keyboards, pointing devices, touch screens, microphones, cameras, scanners, etc.) and / or output devices (display devices, speaker devices, printers, motors, haptic output devices, etc.). The audio input / output device 530 is an example of an input and output device that can be used to receive audio input and provide audio output (e.g., voice interface output) as described herein. The audio input / output device 530 can be connected to the device 500 via a local connection (e.g., wired bus, wireless interface) and / or via a network connection, and can be any suitable device, some examples of which are provided below.

[0083] For ease of explanation, FIG. 5 illustrates one block for each of the processor 502, memory 504, I / O interface 506, and software blocks 508 and 510. These blocks may represent one or more processors or processing circuits, operating systems, memory, I / O interfaces, applications, and / or software modules. In other embodiments, the device 500 need not have all of the components illustrated and / or may have other components, including other types of components, instead of or in addition to the components illustrated herein. Although the server system 102 is described as performing the operations described in some embodiments herein, any suitable component or combination of components of the server system 102 or a similar system, or any suitable processor or processors associated with such a system, may perform the operations described.

[0084] The client device may also implement and / or be used with features described herein, e.g., client devices 120-126 shown in FIG. 1. An exemplary client device may be a computing device including several similar components as device 500, e.g., processor 502, memory 504, and I / O interface 506. Operating systems, software, and applications suitable for the client device, e.g., image management software, client group communication application software, etc., may be provided in the memory and used by the processor. The I / O interface for the client device may be connected to a network communication device, as well as input and output devices, e.g., a camera for capturing images or video, an audio speaker device for outputting sound, a display device for outputting images or video, or other output devices.

[0085] One or more of the methods described herein (e.g., methods 200 and 400) may be implemented by computer program instructions or code that may be executed on a computer. For example, the code may be implemented by one or more digital processors (e.g., microprocessors or other processing circuits) and may be stored in a computer program product that includes a non-transitory computer-readable medium (e.g., a storage medium), such as a magnetic, The program instructions may be stored in and on a semiconductor storage medium, including optical, electromagnetic, or semiconductor or solid-state memory, magnetic tape, removable computer diskettes, random access memory (RAM), read-only memory (ROM), flash memory, rigid magnetic disk, optical disk, solid-state memory drive, and the like. The program instructions may also be contained in and provided as electronic signals, for example in the form of software as a service (SaaS) delivered from a server (e.g., distributed systems and / or cloud computing systems). Alternatively, the method(s) may be implemented in hardware (e.g., logic gates) or a combination of hardware and software. Examples of hardware may be programmable processors (e.g., field programmable gate arrays (FPGAs), complex programmable logic devices), general-purpose processors, graphics processors, application specific integrated circuits (ASICs), and the like. The method(s) may be implemented as part or component of an application executing on the system, or as an application or software executing with other applications and the operating system.

[0086] One or more methods described herein may be performed as a stand-alone program that may run on any type of computing device, a program running on a web browser, a mobile application ("app") running on a mobile computing device (e.g., a mobile phone, a smart phone, a tablet computer, a wearable device (watch, armband, jewelry, headwear, goggles, glasses, etc.), a laptop computer, etc.). In one example, a client / server architecture may be used, e.g., the mobile computing device (as a client device) sends user input data to a server device and receives final output data from the server for output (e.g., for display). In another example, all computations may be performed within the mobile app (and / or other apps) on the mobile computing device. In another example, computations may be split between the mobile computing device and one or more server devices.

[0087] Alternatively, any software in the memory may be stored in any other suitable storage location or computer readable medium. Additionally, the memory (and / or other connected storage devices) may store one or more messages, one or more classifications, an electronic encyclopedia, a dictionary, a thesaurus, a knowledge base, message data, grammars, user preferences, and / or other instructions and data used in the features described herein. Memory and any other type of storage (such as magnetic disk, optical disk, magnetic tape, or other tangible medium) may be considered "storage" or "storage device."

[0088] The I / O interface can provide functionality that allows the server device to interface with other systems and devices. The interfaced devices can be included as part of the device or can be separate and communicate with the device. For example, network communication devices, storage devices (e.g., memory and / or database 106), and input / output devices can communicate through the I / O interface. In an embodiment, the I / O interface can connect to interface devices such as input devices (keyboards, pointing devices, touch screens, microphones, cameras, scanners, sensors, etc.) and / or output devices (display devices, speaker devices, printers, motors, etc.).

[0089] Some examples of interfaced devices that can be connected to the I / O interface may include one or more display devices that can be used to display content, e.g., images, videos, and / or user interfaces of output applications described herein. The display devices may be connected to the device via a local connection (e.g., a display bus) and / or via a network connection and may be any suitable display device. The display devices may include any suitable display device, such as an LCD, LED, or plasma display screen, a CRT, a television, a monitor, a touch screen, a 3D display screen, or other visual display device. For example, the display devices may be a flat display screen provided on a mobile device, multiple display screens provided in a goggle or headset device, or a monitor screen for a computing device.

[0090] The I / O interface can interface with other input and output devices. Some examples include one or more cameras or other imaging devices that can capture images. Some embodiments can provide microphones for capturing sound (e.g., as part of a captured image, voice commands, etc.), audio speaker devices for outputting sound, or other input and output devices.

[0091] Although the description has been given with respect to certain embodiments thereof, these specific embodiments are merely exemplary and not limiting, and the concepts illustrated in the embodiments may be applied to other examples and embodiments.

[0092] In situations where certain embodiments described herein may collect or use personal information about a user (e.g., user data, information about the user's social network, the user's location and time at the location, the user's biometric information, the user's activity and demographic information), the user is provided with one or more opportunities to control whether information is collected, whether the personal information is stored, whether the personal information is used, and how the information is collected, stored, and used about the user. That is, the systems and methods described herein collect, store, and / or use user personal information, particularly with explicit permission to do so from the associated user. For example, a user is provided with control over whether a program or feature collects user information about that particular user or other users associated with that program or feature. Each user for whom personal information is to be collected is presented with one or more options to enable control of the information collection related to that user and to provide permission or authorization regarding whether information is collected and what portions of the information should be collected. For example, a user may be provided with one or more such control options over a communications network. Additionally, certain data may be processed in one or more ways before being stored or used, such that personally identifiable information is removed. As one example, a user's identity may be treated such that personally identifiable information cannot be determined. As another example, a user's geographic location may be generalized to a larger region such that a user's specific location cannot be determined.

[0093] It should be noted that the functional blocks, operations, features, methods, devices, and systems described in this disclosure may be combined or divided into different combinations of systems, devices, and functional blocks, as known to those skilled in the art. Any suitable programming language and programming techniques may be used to implement the routines of particular embodiments. Different programming techniques, e.g., procedural or object-oriented techniques, may be employed. The routines may be executed on a single processing unit or multiple processors. Although the steps, operations, or computations may be presented in a particular order, the order may be changed in different particular ways. In some embodiments, multiple steps or actions shown in this specification as sequential may be performed simultaneously.

Claims

1. 1. A computer-implemented method comprising: Receiving an input video from a user, the input video comprising a plurality of frames; pre-processing the frames of the input video; estimating local motion in a portion of the plurality of frames of the input video; compensating for global motion occurring in at least some of the frames of the input video; calculating a subject motion score based on an entropy of the local motion estimate adjusted by global motion compensation; normalizing the subject motion score; determining whether the input video is a static video based on the input video including a static scene or object as indicated by the object motion score; in response to the input video being the static video, providing a portion of the plurality of frames to the user instead of the input video; Determining whether the input video is a static video includes: Counting the number of frames having a normalized subject motion score that is low compared to a threshold; Identifying a ratio of static frames to a total number of frames; determining that the input video is a static video in response to the frame ratio exceeding a static frame ratio threshold; The method, wherein the static frames are frames having a normalized subject motion score that is low compared to the threshold.

2. The method of claim 1 , further comprising, in response to the input video not being the static video, providing the frame and the input video to the user.

3. Calculating the subject motion score based on an entropy of the local motion estimate adjusted by global motion compensation includes: calculating a subject motion vector by subtracting a global motion vector representing an estimate of global motion from a local motion vector representing an estimate of local motion; converting the object motion vector into a score map; calculating an entropy score of the score map; and mapping the entropy score to the subject motion score.

4. The method according to any one of claims 1 to 3, wherein the input video includes video captured immediately before receiving a shutter press instruction and video captured immediately after receiving the shutter press instruction.

5. 1. A system comprising: one or more processors; and a memory storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, the operations including: Receiving an input video from a user, the input video comprising a plurality of frames; pre-processing the frames of the input video; estimating local motion occurring in at least some of the frames of the input video; Compensating for global motion occurring within a portion of the frames of the input video; and calculating a subject motion score based on an entropy of the local motion estimate adjusted by global motion compensation; normalizing the subject motion score; determining whether the input video is a static video based on the input video including a static scene or object as indicated by the object motion score; and in response to the input video being a static video, providing a portion of the plurality of frames to the user instead of the input video; Determining whether the input video is a static video includes: Counting the number of frames having a normalized subject motion score that is low compared to a threshold; Identifying a ratio of static frames to a total number of frames; determining that the input video is a static video in response to the frame ratio exceeding a static frame ratio threshold; The static frames are frames having a normalized subject motion score that is low compared to the threshold.

6. The system of claim 5 , wherein the actions further comprise: in response to the input video being not a static video, providing the frames and the input video to the user.

7. Calculating the subject motion score based on an entropy of the local motion estimate adjusted by global motion compensation includes: calculating a subject motion vector by subtracting a global motion vector representing an estimate of global motion from a local motion vector representing an estimate of local motion; converting the object motion vector into a score map; calculating an entropy score of the score map; and mapping the entropy score to the subject motion score.

8. 8. The system according to claim 5, wherein the input video includes a video captured immediately before receiving a shutter press instruction and a video captured immediately after receiving the shutter press instruction.

9. A program for causing one or more computers to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Digital camera

    JP2004120576A

  • Detection of action frames of a video stream

    US20150364158A1