GB2578354A - Video inpainting via confidence-weighted motion estimation - Google Patents
Video inpainting via confidence-weighted motion estimation Download PDFInfo
- Publication number
- GB2578354A GB2578354A GB1911506.2A GB201911506A GB2578354A GB 2578354 A GB2578354 A GB 2578354A GB 201911506 A GB201911506 A GB 201911506A GB 2578354 A GB2578354 A GB 2578354A
- Authority
- GB
- United Kingdom
- Prior art keywords
- motion
- boundary
- video
- pixel
- video frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000033001 locomotion Effects 0.000 title claims abstract description 234
- 238000000034 method Methods 0.000 claims abstract description 40
- 230000003287 optical effect Effects 0.000 claims description 39
- 238000012545 processing Methods 0.000 claims description 27
- 230000008569 process Effects 0.000 description 22
- 239000013598 vector Substances 0.000 description 16
- 241000282836 Camelus dromedarius Species 0.000 description 15
- 230000006870 function Effects 0.000 description 14
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 5
- 238000013459 approach Methods 0.000 description 3
- 238000004091 panning Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 239000000428 dust Substances 0.000 description 2
- 230000015654 memory Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 241000272168 Laridae Species 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001143 conditioned effect Effects 0.000 description 1
- 239000010813 municipal solid waste Substances 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
A method of accessing a video having a target region 306, updating the video content in the target region based on confidence-weighted motion estimation for the target region, and presenting the updated video content on a display device. In particular, the video has a scene comprising a first 112a and a second 112b frame, the scene having an annotation identifying a target region to be modified in one or more video frames. A boundary motion for a boundary of the target region in the scene is computed, the boundary including boundary pixels 404a, 405a neighbouring the target region. Confidence values are assigned to the boundary pixels, wherein a confidence value is based on: a difference between a forward and reverse motion with respect to a particular boundary pixel, and/or a texture in a region that includes the particular boundary pixel. A target motion 412 of a target pixel is interpolated from the boundary motion, wherein the confidence value of the boundary pixel controls a contribution of a motion of the boundary pixel to the target motion. The colour of the target pixel is updated to correspond to the interpolated target motion.
Description
VIDEO 1NPAINTING VIA CONFIDENCE-WEIGHTED MOTION ESTIMATION
Cross Reference to Related Applications
[0001] This disclosure claims priority to U.S. Provisional Application No. 62/745,260, filed on October 12, 2018, which is hereby incorporated in its entirety by this reference.
Technical Field
[0002] This disclosure relates generally to automated processing of video content for video playback systems. More specifically, but not by way of limitation, this disclosure relates to using confidence-weighted estimates of pixel motion within a target region of a set of video frames to perform video inpainting with respect to the target region.
Background
[0003] Certain video editing programs include features for replacing content in a target region with other desired content, such as user-provided content or content that is copied or derived from other regions in the video. As one example, video inpainting methods are used to fill user-specified, spatiotemporal holes in a video with content using remaining parts of the video. Video inpainting is used for different applications, such as, but not limited to, unwanted object removal, video stabilization, logo or watermark removal in broadcast videos, and restoration of damaged film content, etc. [0004] One example of video inpainting involves manually editing each video frame. For instance, a video editor is used to manually copy content from a "clean" version of a scene that lacks the object to be removed and edit a version of the scene with the object to replace the object with content from the "clean" scene. However, this technique relies on the availability of a "clean" version of a scene. If a "clean" version of a scene is unavailable, each frame must be edited manually using, for example, an image editing to& such as Adobe® Photoshopt. Manual edits of multiple video frames can be tedious and may lack uniformity, such as when a manual edit to a first frame and a separate manual edit to another frame differ based on errors by the user, subjective judgments by the user, etc. [0005] Another example of a video inpainting technique is plane tracking. A software tool that uses plane tracking will track a rectangle of source content and an area of content to be removed or modified. The software will place the source content over the object to be removed or modified. However, plane tracking requires that the background content (e.g., content behind a hole to be filled or object to be replaced) be planar. In the absence of such planar content, the resulting edited video may include artifacts of the removed object or otherwise lack the desired quality.
[0006] Therefore, existing solutions may involve disadvantages for reasons such as (but not limited to) those described above.
Summary
[0007] Certain aspects involve using confidence-weighted estimates of pixel motion within a target region of a set of video frames to perform inpainting with respect to the target region across the video frames. For instance, a video editor accesses video content having an annotation that identifies a target region to be modified in one or more video frames of a depicted scene. The video editor computes a motion for a boundary of the target region. The video editor also assigns confidence values to boundary pixels. A particular confidence value is computed based on a difference between forward and reverse motion with respect to a particular boundary pixel, a texture in a region that includes the particular boundary pixel, or a combination thereof The video editor interpolates, from the boundary motion, a target motion of a target pixel within the target region. In the interpolation, the assigned confidence values control the contributions, to the interpolated target motion, of different motions for different boundary pixels. The video editor modifies the target region in the video by updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.
Brief Description of the Drawings
[0008] Features, aspects, and advantages of the present disclosure are better understood when the following Detailed Description is read with reference to the accompanying drawings. The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
[0009] FIG. 1 depicts an example of a video processing environment for video inpainting via confidence-weighted motion estimation, according to certain aspects of this disclosure.
[0010] FIG. 2 depicts an example of modifying a video frame to be removed by the video processing environment of FIG. 1 using video inpainting, according to certain aspects of this disclosure.
[0011] FIG. 3 depicts an example of video frames having a target region and associated boundary pixels that can be edited with the video processing environment depicted in FIG. 1, according to certain aspects of this disclosure.
[0012] FIG. 4 depicts an example of motion fields that arc computed from the video frames in FIG. 3, according to certain aspects of this disclosure.
[0013] FIG. 5 depicts an example of interpolating motion from the motion fields of FIG. 4 and thereby updating a pixel of a target region in a video frame from FIG. 3, according to certain aspects of this disclosure.
[0014] FIG. 6 depicts an example of a process for using confidence-weighted estimates of pixel motion within a target region of a set of video frames to perform inpainting with respect to the target region across the video frames, according to certain aspects of this disclosure.
[0015] FIG. 7 depicts an example of a computing system for implementing one or more aspects of
this disclosure.
Detailed Description
[0016] Certain aspects involve using confidence-weighted estimates of pixel motion along a boundary of a target region in a set of video frames to perform video inpainting with respect to the target region. For instance, a video editor assists with modifying a target region of a video, which includes portions of video frames depicting an object to be removed or modified, by using the computed motion of a scene depicted in the video to identify content to be copied into the target region. Such a computation of scene motion includes estimating, prior to modifying the target region, what the motion of the scene would be within the target region based on the motion of other pixels in the scene, such as the motion of boundary pixels defining a boundary of the target region. The video editor, by implementing certain aspects described herein, improves the accuracy of this motion estimate by assigning confidence values to certain pixels, where a confidence value indicates a reliability of a motion computation with respect to these pixels. In a motion-estimation operation performed by the video editors, pixels with a more reliable motion computation have a larger impact in estimating motion within the target region, and vice versa.
[0017] The following non-limiting example is provided to introduce certain aspects. In this example, a video editor accesses a set of video frames, such as an input video being modified by a user with the video editor, that depict a scene. For instance, a depicted scene includes a football game in progress as well as a spectator that disrupts the view of the football game by walking in front of the camera. The set of video frames includes (or is otherwise associated with) an annotation identifying a target region to be modified in one or more video frames comprising the scene. For instance, the video editor could receive user inputs that identify the spectator object in one or more video frames. The video editor could use these inputs to annotate the spectator object in the set of video frames that comprise the scene.
[0018] Continuing with this example, the video editor computes a boundary motion for a boundary of the target region within the scene. For instance, the boundary includes boundary pixels neighboring the target region (e.g., the "spectator" object) in a set of video frames. The boundary motion indicates how video content along the boundary moves within the scene as the video frames progress. If the scene depicts the football game behind the spectator, the various objects that comprise the football game (e.g., the field, the players, etc.) could move within the scene due to the movement of the objects themselves when captured (e.g., a player running down the field), the movement of the camera (e.g., due to the camera panning from one end of the field to the other), changing the zoom on the camera, or some combination thereof The video editor also assigns confidence values to various boundary pixels. A particular confidence value could indicate whether a motion computed for a particular boundary pixel is sufficiently reliable to estimate motion within a target region. The video editor can compute the confidence based on, for example, a difference between fonvard and reverse motion with respect to a particular boundary pixel, a texture in a region that includes the particular boundary pixel, or both.
[0019] To remove the "spectator" object in this example, the video editor estimates the motion within the target region. Estimating the motion includes interpolating, from the boundary motion computed for the boundary pixels, target motion within the target region. Thus, the estimated motion within the target region is a function of the combined computations of motion for boundary pixels. A particular confidence value of a particular boundary pixel controls a contribution of that boundary pixel's motion to the interpolated target motion. For instance, if a boundary pixel's computed motion is unreliable, then a confidence value associated with that boundary pixel will decrease the impact of that boundary pixel's computed motion within the function of the combined computations of motion for boundary pixels.
[0020] The video editor uses the interpolated motion to update color data of target pixels within the target region. As a simplified example, if a particular "football player" object moves through the scene and is visible before and after the "spectator" object disrupts the scene, then the motion of a particular "football player" object follows a path between a first frame where the "football player" object is visible to a second frame where the "football player" object is occluded by the "spectator" object, where the first frame could occur before or after the second frame. The interpolated motion within the target region allows the video editor to estimate where the "football player" object would be within the target region, i.e., trace the pixels depicting the football player from the first frame to their expected position in the second frame. The video editor can therefore copy color data of the pixels depicting the football player from the first frame and update pixels of the target region in the second frame to include the copied color data. In this manner, the "football player" object replaces the disruptive "spectator" object in the video. [0021] Confidence values used to estimate motion within a target region can be computed in any suitable manner. In some aspects, the video editor computes confidence values, at least in part, by determining whether the motion of certain scene pixels is self-consistent. For instance, the computed motion of a boundary from timestamp ti to tn (i.e., forward in time) should have the same magnitude and opposite direction as the computed motion of the boundary from timestamp tr, to ti (i.e., back in time). Pairs of temporally adjacent frames should therefore exhibit consistency with respect to the fonvard and reverse motion. The video editor can increase or decrease the confidence of motion data from a boundary region based on how consistent the motion forward in time is with respect to the motion backward in time. In additional or alternative aspects, the video editor computes confidence values, at least in part, by evaluating the texture of video content around the target region. Low-texture areas may have motion data that is less reliable than high-texture areas. For instance, if a scene involved a camera panning across a clear blue sky, the computed motion for the "sky" portions of the scene may indicate very little motion (i.e., due to the absence in color variation from frame to frame) even though the panning camera did result in a moving scene. The video editor can therefore increase or decrease the confidence of motion data from a region based on how much texture (c.g., variation in grayscalc intensity) is present in the region.
[0022] Certain aspects provide improvements to computing systems used for editing video content.
For instance, as noted above, existing video inpainting techniques often entail manual, time-consuming processes to remove or modify target objects, and existing automated processes that are less cumbersome can introduce artifacts or other inaccuracies when replacing or otherwise modifying objects in a scene. These problems can be addressed by various features described herein. For instance, using confidence values to decrease or increase the impact of certain pixels on a motion-interpolation operation can increase the accuracy of the interpolated motion and, by extension, the quality of the inpainting operation by creating a modified video with few or no artifacts. In various examples, certain confidence-based inpainting techniques described herein do not rely on linear motion (i.e., motion constrained to a plane) or the identification of planes via user input. Thus, certain aspects described herein can automate video editing processes with a greater degree of accuracy than existing techniques.
[0023] Example of an operating environment for video inpainting via confidence-weighted motion estimation [0024] Referring now to the drawings, FIG. 1 depicts an example of a video editing environment 100 for motion-based video inpainting. The video editing environment 100 includes a set of communicatively coupled components. These components include a video editor 102 that can be executed on one or more computing devices, an input device 120 that can be used to provide commands to the video editor 102, and a presentation device 122 that displays video content to a user.
[0025] The video editor 102 includes program code for displaying and editing video content.
Examples of this program code include program code for rendering content for display, program code for creating one or more instances of event listeners or other suitable objects for receiving input from input devices (e.g., a mouse, a touchscreen, etc.), program code for modifying color information for pixels in one or more frames of video content, etc. [0026] In the example depicted in FIG. 1, the video editor includes a confidence engine 104, an interpolation engine 106, and a color update engine 108. The confidence engine 104 includes program code that, when executed by processing hardware, performs one or more operations for computing one or more measures of confidence in motion estimations performed by the video editor 102. The interpolation engine 106 includes program code that, when executed by processing hardware, performs one or more operations for estimating the motion of pixels bordering a user-specified area of interest across a set of video frames. The interpolation engine 106 includes program code that, when executed by processing hardware, performs one or more operations for estimating the motion of pixels within the user-specified area of interest across a set of video frames 112a-n. The color update engine 108 includes program code that, when executed by processing hardware, performs one or more operations for modifying color information within the user-specified area of interest based on the estimated motion.
[0027] While FIG. 1 depicts a video editor 102 that includes a confidence engine 104, an interpolation engine 106, and a color update engine 108, other implementations are possible. For instance, in various aspects, one or more of these engines can be omitted, the functionality of two or more of these engines can be combined into a single software engine, or one or more of these engines is included in software that is separate from and in communication with the video editor 102.
[0028] The video editor 102 is used to remove or modify one or more objects or other features in video content using confidence-weighted motion information. (An example of the object modification is discussed below with respect to FIG. 2, an example of using motion information is discussed below with respect to FIGS. 3-5, and an example of using confidence-weighted motion is discussed below with respect to FIG. 6.) Video content could include, for example, a sequence of video frames 112a through 112n. The sequence of video frames can collectively comprise a scene 110. Examples of removing or modify objects or other features include removing people or large objects (for color grading, or producing three-dimensional films), removing dark areas in the video resulting from dust on a lens of a camera, removing unwanted objects (trash, accidental sct element), removing logos (for stock video or commercialization), removing distractors (labels, reflecting lights, etc.), changing appearance of something in a video by modifying only one frame or a small set of frames, etc. [0029] hi an illustrative example, the video editor 102 fills a target region, such as a hole region, in a set of video frames. A hole region can be a contiguous collection of pixels in the image that are transparent or semi-transparent. In this example, the video editor 102 receives, from the input device 120, one or more user inputs that specify an area of interest in one or more of the video frames 112a-112n. One or more annotations 114 are data that is included in or associated with video content to identify' the area of interest in the set of video frames 112a-112n. In one example, the user inputs include drawing a rough mask or rotoscoping on one or more frames, where the one or more objects indicated by the mask are tracked over a sequence of frames (i.e., over time). The video editor 102 applies, responsive to one or more command inputs received via the input device 120, a motion-based video inpainting process to generate or otherwise identify target pixel data (e g color information). The target pixel data is used to modify the user-specified area of interest. In particular, the video editor 102 modifies color information of pixels in the area of interest to include the target pixel data. In this manner, the video editor 102 generates a modified scene 116 having one or more modified frames 118a-118n for display on the presentation device 122.
[0030] FIG. 2 depicts an example of using the video editing environment 100 to remove an object from a scene. In this example, the video editor 102 identifies, based on one or more inputs from the input device 120, an object to be removed from the scene. For instance, the video editor 102 or other suitable software could receive a drawing input that selects one or more portions of a camel depicted in the frame 202 from a video. The video editor 102 or other suitable software annotates the frame 202 to specify that the camel identified via the user input should be removed, as indicated by the camel-shaped hole region in the annotated frame 204. The annotation can be a mask or other data that segments a target object from other objects in a frame. In some aspects, the video editor can propagate the identification of an object in one frame of a scene 110 to other frames of the scene 110 (e.g., other frames where the camel to be removed is depicted).
[0031] In some aspects, the color update engine 108 performs a pixel-replacement operation or other color-modification operation with respect to the hole region indicated in the annotated frame 204. For instance, the color update engine 108 can identify one or more replacement objects in the scene that are depicted in one or more frames prior to the frame 202, depicted in one or more frames subsequent to the frame 202, or both. In this example, the color update engine 108 identifies pixels included in the fence object that is depicted in the scene, where frames before or after the frame 202 depict the fence without the removed camel standing in front of the fence. The interpolated motion computed with the interpolation engine 106 allows the color update engine 108 to modify the pixel color information in the hole region while maintaining a consistent appearance of the replacement objects between frames.
[0032] The color update engine 108 modifies pixels within the hole region to have the color information from the identified pixels included in the fence object. By doing so, the color update engine 108 generates a modified frame 206, where the removed camel no longer appears and the hole region 204 has been modified to depict other scene objects occluded by the camel in frame 202 (e.g., a portion of the fence, a portion of the ground, etc.). This approach is known as "dense tracking." In some aspects, if one or more objects behind the removed object arc not depicted in other frames of the scene, the video editor 102 can use a content-aware fill algorithm to guess what is missing.
[0033] As noted above, the motion-based video inpainting process involves using the apparent motion of color information from one pixel to another across the set of video frames 112a-112n to control how the area of interest is modified. For instance, the video editor 102 uses confidence-weighted determinations of the motion of pixels on the boundary of an area of interest to control which target pixel data is identified or generated for updating the area of interest.
[0034] &le of motion-based inpainting Oa target region ()fa video [0035] FIGS. 3-5 depict a simplified example of a video editor 102 being used to perform motion-based modification of a target region. In this example, the video editor 102 performs fast and robust motion estimation. The video editor 102 can estimate motion within a target region using the motion at the boundary of the target region (e.g., a user-specified hole). To do so, the video editor 102 can compute optical-flow motion for an entire frame. The video editor 102 can focus on the motion of the pixels along the boundary of the hole in each frame. This motion-based modification can be used in the example of FIG. 2 to remove the target camel by keeping track of the movement of a building or other structures depicted behind the camel in a scene, which facilitates updating the hole region with color information from suitable pixels (i.e., pixels depicting the building or other structures).
[0036] In the simplified example of FIGS. 3-5, a video editor 102 accesses a pair of video frames 112a and 112b, as depicted in FIG. 3. The video content that includes the video frames 112a and 112b is annotated to identify a target region. For instance, the target region 306a in the video frame 112a could indicate that a particular object (e.g., the camel of FIG. 2) is to be removed, and the target region 306b in the video frame 112a could indicate that the same object at a different location within the scene is to be removed. The target region is bounded by a set of boundary pixels.
[0037] In FIG. 3, the boundary includes the boundary pixels 302a and 304a on opposite sides of the target region 306a in video frame 112a. In one example, the boundary pixel 302a could be part of a tree depicted in the frames of FIG. 2, the target region 306a could be the target camel depicted in the frames of FIG. 2, and the boundary pixel 304a could be part of a fence depicted in the frames of FIG. 2. Similarly, in the video frame 112b, the boundary includes the boundary pixels 302b and 304b (e.g., pixels from the tree and the fence in FIG. 2 at different locations) on opposite sides of the target region 306b (e.g., the target camel in FIG. 2 at a different location).
[0038] FIG. 4 depicts a simplified example of interpolating motion within a target region based on boundary pixels. In this example, the video editor 102 computes a motion field 402 for the video frame 112a based on an analysis of the pair of video frames 112a and 112b. The motion of boundary pixel 302a is represented as a vector 404, which is graphically illustrated in FIG. 4 using an arrow in the direction of movement specified by the vector 404. Similarly, the motion of boundary pixel 304a is represented as a vector 406, which is graphically illustrated in FIG. 4 using an arrow in the direction of movement specified by the vector 406. Because the target reuion 306a corresponds to an object to be removed from the frames, the motion field 402 is depicted as including an "unknown" motion for a target pixel within the target region 306a. In this example, the "unknown" motion is an unknown desired motion, i.e., the motion that would have been computed in the target region if the video frames I 12a and 112b had been captured without the target object to be removed.
[0039] The interpolation engine 106 computes, based on the boundary motion, an estimated motion with respect the target region 306a. For instance, each boundary pixel is associated with a respective boundary motion represented by a vector, such as the vectors 404 and 406. The interpolation engine 106 uses the collection of vectors (including vectors 404 and 406) to compute an estimated motion for a target pixel within the target region 306a. The video editor 102 can also compute or obtain confidence values for motion values around the boundary of the target region. In some aspects, the video editor 102 can compute or obtain confidence values for motion values within the target region. The video editor 102 can use confidence values for motion around and/or within the target region to interpolate the motion within the target region. Examples of using confidence values to interpolate motion are described herein with respect to FIG. 6. The interpolation engine 106 generates a modified motion field 410 that includes a motion vector 412 for the estimated motion, along with the vectors 404' and 406', where the vectors 404' and 406' are the same as the vectors 404 and 406 for the boundary pixels 302a and 304a as in the motion field 402.
[0040] With the resulting estimated motion, the video editor 102 can trace, through time, paths of pixels (or, more specifically, objects comprised by the pixels) between locations outside the target region to locations inside the target region. Doing so allows the video editor 102 to identify or determine the appearance of these pixels using video frames in which the pixels are not in the target region. FIG. 5 depicts a simplified example of modifying color information of a target pixel within a target region based on an estimated motion computed by the interpolation engine 106. In this example, the color update engine 108 has used the motion vector 412 to add a target pixel 504 to a modified target region 502. To do so, the color update engine "traces" a pixel from a location outside the target region to a location within the target region.
[0041] Using the example of FIG. 2, a "traced" pixel could be a portion of a tree object that is occluded by the target camel object in the video frames 112a and 1126, but that is visible in one or more reference frames. A reference frame could be sequenced before one or more of the video frames 112a and 112b, sequenced after one or more of the video frames 112a and 112b, or both. In a simplified example, a pixel located at position (3,1) in a reference frame could have a brown color, i.e., be a part of the brown fence object. The motion vector 412 indicates the motion through the target region that would have been associated with the "fence" pixel if the fence object had not been occluded by target "camel" object in the frames 112a and 112b. For instance, the motion vector 412 for this "fence" pixel could indicate a motion of two pixels down and three pixels right. The color update engine 108 can therefore determine that, in the absence of the occlusion by the "camel" object, the "fence" pixel would have been located in the target region of the video frame 112a at position (1, 4) (i.e., two pixels down and three pixels right from the (3,1) location). The color update engine 108 therefore copies color information from the pixel located at position (3,1) in the reference frame (i.e., the "fence" pixel) to the target pixel 504 located at position (1,4) in the modified video frame 118a.
[0042] If a pixel does not have any observations outside of the hole, the video editor 102 can use content-aware fill for a single frame, and then propagate those color values through time. Sometimes multiple frames will be needed. In some embodiments, the frame with the largest "unseen region" will be chosen first. The unseen region is filled with content-aware-fill and propagated through time. if any unseen regions still exist, the largest region may again be chosen. This is repeated until all hole pixels have been filled.
[0043] In the example depicted in FIGS. 3-5, the video editor 102 can use one or more confidence measures to control the interpolation of motion, as described herein with respect to FIG. 6. In some aspects, the video editor 102 determines whether motion at the boundary of the target region is self-consistent. This determination involves comparing the boundary motion forward in time (e.g., from video frame 1 I 2a to 1 1 2b) to the boundary motion backward in time (e.g., from video frame 112b to 112a). If the forward motion and backward motion have the same magnitude in opposite directions (e.g., a forward motion of four pixels up and a reverse motion of four pixels down), the motion is consistent. Smaller differences in the forward motion and backward motion can indicate a higher degree of consistency, and vice versa. In a simplified example, the video editor 102 can disregard motion data for a particular section of the boundary if the motion is insufficiently consistent. Additionally or alternatively, the video editor 102 can improve interpolation of the motion by checking if the content around the target region contains sufficient texture. Low texture areas (like sky) lead to misleading motions and the video editor 102 can improve interpolation by disregarding them. Additionally or alternatively, the video editor 102 can use structure from motion ("SfM") to track 3D points with known motion as they pass through the hole. Motion from 3D objects within the hole are ignored, and background objects are used.
[0044] Example of a process for video inpainting via confidence-weighted motion estimation [0045] FIG. 6 depicts an example of a process 600 for performing motion-based video inpainting.
One or more operations described with respect to FIGS. 1-6 can be used to implement a step for updating video content in a target region based on confidence-weighted motion estimation for the target region. In some aspects, one or more computing devices implement operations depicted in FIG. 6 by executing suitable program code (e.g., the video editor 102, one or more of the engines depicted in FIG. 1, etc.). For illustrative purposes, the process 600 is described with reference to certain examples depicted in the figures. Other implementations, however, are possible.
[0046] At block 602, the process 600 involves accessing a scene that includes video frames. For instance, the video editor 102 can access video content from a data storage unit. The data storage unit can be located on one or more memory devices available over a data network, one or more memory devices connected to a data bus on a computing device that executes the video editor 102, or some combination thereof [0047] hi one example, the video editor 102 accesses video content having one or more annotated target regions 2. Examples of an annotated target region include a hole generated by one or more erasure inputs received via the input device 120, a particular target object to be replaced (e.g., the camel depicted in FIG. 2) that is identified by one or more selection inputs received via the input device 120 as a particular target object to be modified (e.g., modifying the appearance of a target object rather than removing it) that is identified by one or more selection inputs received via the input device 120, a dark area in the scene generated by dust on the lens of a camera used to capture the scene, or a shadow to be removed. The video editor 102 is used to modify sonic or all pixels in the hole with color values. For instance, if an object is to be removed or a hole to be filled, the video editor is used to modify target pixels in the target region to have color information that would have resulted from capturing the scene without the object.
[0048] At block 604, the process 600 involves computing a boundary motion for a boundary of a target region indicated by an annotation associated with the scene. The video editor 102 can compute an optical flow with respect to a set of video frames that collectively depict a scene. For instance, the video frames can be included in an input video / of height H, width W and number of frames L. The confidence engine 104 or another suitable engine of the video editor 102 computes a forward flow U and a backward flow V. To compute the motion between frame n and n + 1, the confidence engine 104 or another suitable engine of the video editor 102 computes the flow (motion) from time 72 to time rt + 1.
The forward flow at position (x, y, n) a pixel at position (x, y) on a frame at time n) is given by U (x, y, rt) = (dx, dy, +1), indicating a flow vector (dx, dy) from a point located at (x, y, n) to a point (x + dx, y + dy, 71 + 1) in the video I. The backward flow at position (x, y, n) (i.e., a pixel at position (x, y) on frame n) is given by V (x, y, f) = (dx, dy, -1).
[0049] in this example, a boundary motion is a motion with respect to one or more pixels that define a boundary of a target region. The boundary can be, for example, the set of pixels that neighbor the union of the hole in a video frame it and a video frame 71 + 1. This set of boundary pixels can include pixels having some commonality with one another that are adjacent to at least one other pixel not sharing the commonality (e.g., two pixels that share at least some color infomiation and that have no common color information with respect to an adjacent pixel in the target region).
[0050] At block 606, the process 600 involves assigning confidence values to boundary pixels. For instance, as discussed below with respect to block 608, the video editor 102 performs one or more operations that estimate or otherwise determine what pixel motion would have occurred in the target region if the target region had the desired appearance (e.g., if a hole was filled, if a target object was removed, if a target object's appearance was modified, etc.). This step involves computing the confidence of motion at the boundary of the hole. The confidence values computed at block 606 control the role played by various boundary pixel motions to the interpolated target motion. in one example, the confidence engine 104 assigns a first confidence value to a first boundary pixel and assigns a second, higher confidence value to a second boundary pixel. Since the second confidence value is greater than the first confidence value, the motion of the second boundary pixel having the second confidence value will have a larger impact on the estimation of motion within the target region as compared to the motion of the first boundary pixel having the first confidence value.
[0051] The confidence values can be used to control how the observed motion of certain pixels associated with a given object outside a target region (e.g., boundary pixels) is used to estimate unobserved motion within the target region. For instance, a moving scene could depict a target object, which is to be removed, occluding another object, which the user does not wish to remove. The movement of the occluded object through the target region can be considered un-observed because, in the frames depicting the target object moving in front of the second object, the movement of the occluded object is not depicted. Since the motion of the occluded object is un-observed, the interpolation engine 106 performs an operation that estimates the motion of the occluded object by interpolating the motion at the boundary B1 = (xi, yi) into the target region.
[0052] A naive approach to this interpolation could apply equal weights to the boundary pixels so that every flow value inside the target region is determined by the entire set of equally boundary pixels. That is, the motion of some pixel inside the hole] E.0 = (x1, yj) could be determined as U(xj, n) = f (U (BO..... U(Bk)) where k is the number of boundary pixels. But this naive approach may give an undesirable weight to pixels whose motion at the boundary is unreliable. Unreliable motion could occur due to, for example, the motion of shadows cast in the scene, the motion of regions with little or no texture, etc. The confidence engine 104 can compute a confidence(Bt) for each of the boundary pixels B1... Bk that accounts for such unreliability.
[0053] In some aspects, the confidence engine 104 computes a combined confidence value confidence(B1) for the ith boundary pixel (Br) from a combination of a consistency component and a texture component. One example of a formula for the combined confidence value is confidence(Bt) = consistency(i) * texture(i). In other aspects, the confidence engine 104 computes a confidence value confidence(B1) for the ith boundary pixel (B1) from a consistency component without a texture component. Examples of a formula for such a confidence value are confidence(B1) = consistency(i) and confidence(Bt) = ,g(consistency(0), where g is some function that uses the consistency component as an input. In other aspects, the confidence engine 104 computes a confidence value confidence(Bt) for the ith boundary pixel (BO from a texture component without a consistency component. Examples of a formula for such a confidence value are confidence(Bt) = texture(i) and confidence(B1) = g (texture(i)), where g is some function that uses the texture component as an input. [0054] hi some aspects, the confidence value is computed, at least in part, based on a consistency component. For a given pair of video frames from a set of video frames 112a-112n, the confidence engine 104 computes a forward optical flow and a backward optical flow of the particular boundary pixel with respect to the first video frame and the second video frame. An increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value. The confidence engine 104 applies a sigmoidal function to a difference between the forward optical flow and the backward optical flow. ;[0055] hi one example, the confidence engine 104 computes a consistency component from the agreement (or lack thereof) between the forward flow U at time n and backward flow V at time rt + 1. For instance, the confidence engine 104 computes the difference between the forward optical flow and the backward optical flow by computing a distance from an observed position of the pixel in the first video frame and an estimated position of pixel computed by (j) applying the forward optical flow from the first video frame to the second video frame and (ii) applying the backward optical flow from the second video frame to the first video frame. To do so, the confidence engine 104 can compute the forward flow U(xt, y1, n) = (dx, dy, 1). The confidence engine 104 indexes this forward flow into the backward flow V(x[ + dx, yi + dx,rt + 1) = (dx, dy, -1) . The confidence engine 108 can use this backward flow to compute a position in the frame at time it as = (xi + dx + dx, y1 + dy + dy) . if the flow is perfectly consistent, then dx = -dx and dy = -dy, i.e., the forward and backward flow are opposite. If the dx -dx and/or dy -dy, then the flow is less reliable. To compute a consistency component of a confidence value, the confidence engine 104 can apply a sigmoidal function = J(dx + + (dy + dy)2 consistency(i) = e(-4 In this example, the term ei is the distance (in pixels) between the starting pixel, and the round-trip location after following forward and backward flow, and a, controls the shape of the energy function. In ;one example, = 0.5. ;[0056] In some aspects, a particular confidence value for a boundary pixel includes the output of the sigmoidal function (e.g., if consistency alone is used to compute confidence). In additional or alternative aspects, a particular confidence value for a boundary pixel is derived from the output of the sigmoidal function (e.g., if a consistency component is combined with some other component to compute confidence). For instance, deriving the particular confidence value from the output of the sigmoidal function could include multiplying the output of the sigmoidal function by a texture-based confidence computed from the texture in a window region that includes a particular boundary pixel and certain surrounding pixels. ;100571 In additional or alternative aspects, the confidence value is computed, at least in part, based on a texture component. In one example, the confidence engine 104 determines the texture component based on a variance in the grayscale intensity values in a specified window region around each boundary pixel. An increase in the texture corresponds to an increase in the particular confidence value. For instance, if a block of pixels all has the same color, then there is no texture and no variance in appearance. A lack of texture or low amount of texture (i.e., little or no variance in grayscale intensity values) indicates that the flow is unreliable. ;[0058] In one example, the variance of intensity values in the region comprises a summation of intensity differences, where each intensity difference is a difference between a grayscale intensity of a respective pixel in the region and an average grayscale intensity of the region. For instance, for a given window region having radius w, the confidence engine 104 can compute the variance of the intensity values around a given pixel boundary pixel i: Ef_w G ((xi + u, yi + v n)) -lA In this example, pi is the average grayscale intensity in the window, G (x, y, n) is the grayscale intensity at position (x, y) and time n, and at controls the shape of the energy function. In one example, at = 0.125 (grayscale values are between 0.0 and 1.0) and w = 4, leading to an 9 x 9 pixel window. ;variance 2 * w + 1 texture(i) = edvarianceicun [0059] The example provided above involves a fonvard texture component for computing confidence values, where the motion field for a given frame rt is computed using confidence values that are generated, at least in part, by analyzing the texture in the frame n. In additional or alternative aspects, a backward texture component is used for computing confidence values. In these aspects, the confidence engine 104 can compute the backward texture component by using grayscale intensity values in frame n + 1. Thus, the motion field for a given frame n is computed using confidence values that are generated, at least in part, by a backward texture component corresponding to the texture in the frame n + 1.
[0060] In some aspects, one or more operations from block 606 are performed after block 604, as illustrated in FIG. 6. In additional or alternative aspects, the process 600 can be modified by performing one or more operations from block 606 in parallel with block 604 or prior to block 604. For instance, operations involving a texture analysis can be performed in parallel with or prior to computing a boundary motion.
[0061] At block 608, the process 600 involves interpolating, using the confidence values, a target motion of a target pixel within the target region from the boundary motion. For instance, the interpolation engine 106 generates a modified motion field for a specific video frame (i.c., estimates the motion of a pixel in the target region of a specific frame) as a function of (i) the motion of the boundary pixels at the boundary of the target region (ii) the confidence values assigned at block 606. For instance, the interpolation engine 106 computes the motion of a pixel using the following formula: U(xj, yi, = (U (B), confidence(B)). In this formula, U(B) is used as a shorthand for U(B1),U(Bz), U(Bk), and confidence(B) is used as shorthand for confidence (131), confidence (B2),... confidence(Bk).
[0062] In some aspects, the video editor 102 also computes the interpolated target motion using tracked 3D points. For instance, the video editor 102 can use structure from motion ("SfM") to track 3D points with known motion as they pass through the hole. Motion from 3D objects within the hole are ignored, and background objects are used. In some aspects, for points that have been tracked through the hole using SfM, the video editor 102 assigns full confidence to the corresponding pixels (e.g., k=1). In additional or alternative aspects, pixels corresponding to tracked 3D points may be assigned confidence values that are higher than the confidence values for boundary pixels, as information is inside the target region may be more reliable. This may be determined, for example, by the number of cameras (frames) in which that point was visible in the video volume.
[0063] Any suitable motion-interpolation process may be used. In some aspects, the interpolation engine 106 interpolates position differences (i.e., motion) along a boundary between corresponding pixels of a next video frame in a sequence (e.g., frame it + 1) and a current video frame in the sequence (e.g., frame n). The position difference can be interpolated from the boundary throughout other portions of the target region (e.g., a hole), such as from the boundary to the inner portion of the target region. hi. other words, the position differences (i.e., motion) determined for pixels along the boundary arc used to propagate position changes (i.e., motion) through the target region (e.g., inward).
[0064] For instance, the interpolation engine 106 recursively down samples or collapses the target region by a sampling factor (e.g., 2) to produce a plurality of down sampled portions. Initially, the set of motion data associated with the pixels of the target region can be designated as motion data associated with level 0. As described, the set of motion data for a pixel may include position difference (i.e. motion) components and a direction indicator. For instance, an example set of initial motion data for a pixel position may be dy, or {dx, dy, -1}, where dx represents a difference in the x coordinate value, dy represents a difference in the y coordinate value, 1 represents forward flow, and 0 represents the absence of motion. The function for the original or level 0 target region with position difference (i.e. motion) components and a direction indicator can be described as follows: pyramid _level[0 i (m.border) c x Czni Sinit -11 else (0, 0, 0) In this example, the position differences are computed based on the boundary pixel position in the next video frame color minus the boundary pixel position in the current video frame (e.g., y,').
[0065] The original target region, as represented by position difference (i.e. motion) components and a direction indicator, can be down sampled by a factor, such as two, to produce a first down sampled image that is a portion (e.g., half) of the resolution of the original target region. As can be appreciated, in down sampling, direction indicators are generated for pixels of the first down sampled image. By way of example only, assume that a set of four pixels is being reduced to one pixel. Further assume that three of the four pixels do not correspond with a boundary and, as such, include a zero-value direction indicator and that one of the four pixels does correspond with a boundary and, as such, includes a one-value direction indicator. in such a case, the direction indicators are aggregated or averaged to derive a direction indicator of 0.25 for the pixel in the down sampled image. The computed direction indicator of 0.25 indicates the number of pixels with position difference (i.e., motion) information that were used to compute the value (e.g., 25% of pixels used to compute results include some position difference (i.e., motion) information).
[0066] In accordance with generating each of the new direction indicators for the various pixel positions of the first down sampled image, the greatest or largest direction indicator value can be identified. in this manner, the value associated with the largest amount of position difference (i.e., motion) information available on the particular down sampled level (e.g., the first down sampled image) is identified. For each pixel of the first down sampled image, the position difference (i.e., motion) values (e.g., x and y coordinate values) and the direction indicators can then be divided by the greatest direction indicator value. Such a process renormalizes the data in accordance with the maximum indication of position difference (i.e., motion) information.
[0067] At block 610, the process 600 involves updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion. For instance, the video editor 102 uses motion fields that have been modified with interpolated target motion of various pixels to trace paths of the pixels from location within the target region to one or more locations outside the target region. For each pixel inside the target region in a given video frame, the video editor 102 copies the pixel data (e.g., color information) from a corresponding pixel that has been traced to another video frame, as described above with respect to FIG. 5.
[0068] Updating color data can include any process in which video content, after being edited using the process 600, displays one or more modifications to the target region after playback. In some aspects, updating color data involves modifying an image layer that includes the target object in one or more video frames. In additional or alternative aspects, updating color data involves overlaying one or more image layers with the modified target region and one or more image layers that include the unmodified target object in one or more video frames. in one example, the video editor 102 could create a set of video frames having a mask in the shape of the target region, where pixels outside the target region are set to be transparent and pixels within the target region arc set to be opaque. The video editor 102 can update the opaque pixels of this image layer at block 610. The video editor can create a multi-layered set of francs in which the layer having opaque pixels depicting the modified target region and transparent pixels elsewhere is overlaid on a source layer that includes the video content with the unmodified target region. Any number of layers, with different configurations of masks, can be used to generate an output video having the modified target region.
[0069] Example of a computing system for implementing certain aspects.
[0070] Any suitable computing system or group of computing systems can be used for performing the operations described herein. For example, FIG. 7 depicts an example of a computing system 700. in some aspects, the computing system 700 includes processing hardware 702 that executes program code 705 (e.g., the video editor 102, the confidence engine 104, the interpolation engine 106, the color update engine 108), a memory device 704 that stores one or more sets of program data 707 computed or used by operations in the program code 705 (e.g., a set of input video frames, annotations identifying target regions, motion fields, a set of edited video frames, etc.), one or more input devices 120, and one or more presentation devices 122 for displaying graphical content generated by executing the program code 705. For illustrative purposes, FIG. 7 depicts a single computing system on which the program code 705 is executed, the program data 707 is stored, and the input devices 120 and presentation device 714 are present. But various applications, datasets, and devices described can be stored or included across different computing systems having devices similar to the devices depicted in FIG. 7.
[0071] The depicted example of a computing system 700 includes processing hardware 702 communicatively coupled to one or more memory devices 704. The processing hardware 702 executes computer-executable program code stored in a memory device 704, accesses information stored in the memory device 704, or both. Examples of the processing hardware 702 include a microprocessor, an application-specific integrated circuit ("ASIC"), a field-programmable gate array ("FPGA"), or any other suitable processing device. The processing hardware 702 can include any number of processing devices, including a single processing device.
100721 The memory device 704 includes any suitable non-transitory computer-readable medium for storing data, program code, or both. A computer-readable medium can include any electronic, optical, magnetic, or other storage device capable of providing a processor with computer-readable instructions or other program code 705. Non-limiting examples of a computer-readable medium include a magnetic disk, a memory chip, a ROM, a RAM, an ASIC, optical storage, magnetic tape or other magnetic storage, or any other medium from which a processing device can read instructions. The program code 705 may include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, including, for example, C, C++, C#, Visual Basic, Java, Python, Perl, JavaScript, and ActionScript. Additionally or alternatively, the computer-readable medium can include transient media such as carrier signals and transmission media.
[0073] The computing system 700 may also include a number of external or internal devices, such as an input device 120, a presentation device 714, or other input or output devices. For example, the computing system 700 is shown with one or more input/output ("1/0") interfaces 708. An T/O interface 708 can receive input from input devices or provide output to output devices. One or more buses 706 are also included in the computing system 700. The bus 706 communicatively couples one or more components of a respective one of the computing system 700.
[0074] The computing system 700 executes program code 705 that configures the processing hardware 702 to perform one or more of the operations described herein. The program code 705 includes, for example, the video editor 102, the confidence engine 104, the interpolation engine 106, the color update engine 108, or other suitable program code that performs one or more operations described herein. The program code 705 may be resident in the memory device 704 or any suitable computer-readable medium and may be executed by the processing hardware 702 or any other suitable processor. The program code 705 uses or generates program data 707. Examples of the program data 707 include one or more of the memory frames, ground truth frames, feature-classification data, feature-selection data key or value maps, etc. described herein with respect to FIGS. 1-7.
[0075] In some aspects, the computing system 700 also includes a network interface device 710.
The network interface device 710 includes any device or group of devices suitable for establishing a wired or wireless data connection to one or more data networks. Non-limiting examples of the network interface device 710 include an Ethernet network adapter, a modem, and/or the like. The computing system 700 is able to communicate with one or more other computing devices via a data network using the network interface device 710.
[0076] An input device 120 can include any device or group of devices suitable for receiving visual, auditory, or other suitable input that controls or affects the operations of the processing hardware 702. Non-limiting examples of the input device 120 include a recording device, a touchscreen, a mouse, a keyboard, a microphone, a video camera, a separate mobile computing device, etc. A presentation device 714 can include any device or group of devices suitable for providing visual, auditory, or other suitable sensory output. Non-limiting examples of the presentation device 714 include a touchscreen, a monitor, a separate mobile computing device, etc. [0077] Although FIG. 7 depicts the input device 120 and the presentation device 714 as being local to the computing device that executes the program code 705, other implementations are possible. For instance, in some aspects, one or more of the input device 120 and the presentation device 714 can include a remote client-computing device that communicates with the computing system 700 via the network interface device 710 using one or more data networks described herein.
[0078] Thus, from one perspective, there have now been described certain aspects involving video inpainting via confidence-weighted motion estimation. For instance, a video editor accesses video content having a target region to be modified in one or more video frames. The video editor computes a motion for a boundary of the target region. The video editor interpolates, from the boundary motion, a target motion of a target pixel within the target region. In the interpolation, confidence values assigned to boundary pixels control how the motion of these pixels contributes to the interpolated target motion. A confidence value is computed based on a difference between forward and reverse motion with respect to a particular boundary pixel, a texture in a region that includes the particular boundary pixel, or a combination thereof The video editor modifies the target region in the video by updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.
[0079] General Considerations [0080] While the present subject matter has been described in detail with respect to specific aspects thereof, it will be appreciated that those skilled in the art, upon attaining an understanding of the foregoing, may readily produce alterations to, variations of, and equivalents to such aspects. Numerous specific details arc set forth herein to provide a thorough understanding of the claimed subject matter. However, those skilled in the art will understand Thal the claimed subject matter may be practiced without these specific details. in other instances, methods, apparatuses, or systems that would be known by one of ordinary skill have not been described in detail so as not to obscure claimed subject matter. Accordingly, the present disclosure has been presented for purposes of example rather than limitation, and does not preclude the inclusion of such modifications, variations, and/or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art [0081] Unless specifically stated otherwise, it is appreciated that throughout this specification discussions utilizing terns such as "processing," "computing," "calculating," "determining," and "identifying" or the like refer to actions or processes of a computing device, such as one or more computers or a similar electronic computing device or devices, that manipulate or transform data represented as physical electronic or magnetic quantities within memories, registers, or other information storage devices, transmission devices, or display devices of the computing platform. The use of "adapted to" or "configured to" herein is meant as open and inclusive language that does not foreclose devices adapted to or configured to perfonn additional tasks or steps. Additionally, the use of "based on" is meant to be open and inclusive, in that a process, step, calculation, or other action "based on" one or more recited conditions or values may, in practice, be based on additional conditions or values beyond those recited. Headings, lists, and numbering included herein are for ease of explanation only and are not meant to be limiting [0082] Aspects of the methods disclosed herein may be performed in the operation of such computing devices. The system or systems discussed herein are not limited to any particular hardware architecture or configuration. A computing device can include any suitable arrangement of components that provide a result conditioned on one or more inputs. Suitable computing devices include multipurpose microprocessor-based computer systems accessing stored software that programs or configures the computing system from a general purpose computing apparatus to a specialized computing apparatus implementing one or more aspects of the present subject matter. Any suitable programming, scripting, or other type of language or combinations of languages may be used to implement the teachings contained herein in software to be used in programming or configuring a computing device. The order of the blocks presented in the examples above can be varied-for example, blocks can be re-ordered, combined, and/or broken into sub-blocks. Certain blocks or processes can be performed in parallel.
Claims (20)
- Claims 1. A method in which one or more processing devices performs operations comprising: accessing a scene comprising a first video frame and a second video frame, the accessed scene having an annotation identifying a target region to be modified in one or more video frames comprising the scene; computing a boundary motion for a boundary of the target region within the scene, wherein the boundary includes boundary pixels neighboring the target region in the first video frame and the second video frame; assigning confidence values to the boundary pixels, respectively, wherein a particular confidence value is at least partially based on one or more of 0) a difference between forward and reverse motion with respect to a particular boundary pixel and (ii) a texture in a region that includes the particular boundary pixel; interpolating a target motion of a target pixel within the target region from the boundary motion, wherein the particular confidence value of the particular boundary pixel controls a contribution of a particular motion of the particular boundary pixel to the target motion as interpolated from the boundary motion; and updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.
- 2. The method of claim 1, the operations further comprising assigning the particular confidence value by performing additional operations that comprise: computing a forward optical flow and a backward optical flow of the particular boundary pixel with respect to the first video frame and the second video frame; and applying a sigmoidal function to a difference between the forward optical flow and the backward optical flow, wherein the particular confidence value includes or is derived from an output of the sigmoidal function, wherein an increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value.
- 3. The method of claim 2, the operations further comprising computing the difference between the forward optical flow and the backward optical flow by performing additional operations comprising: identifying an observed position of the particular boundary pixel in the first video frame; computing an estimated position of the particular boundary pixel by (i) applying the forward optical flow from the first video frame to the second video frame and (ii) applying the backward optical flow from the second video frame to the first video frame; and computing a distance from the observed position to the estimated position.
- 4. The method of claim 2 or claim 3, wherein the operations further comprise deriving the particular confidence value from the output of the sigmoidal function, wherein deriving the particular confidence value from the output of the sigmoidal function comprises multiplying the output of the sigmoidal function by a texture component that is computed from the texture in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel, wherein an increase in the texture corresponds to an increase in the particular confidence value.
- The method of claim 4, the operations further comprising computing the texture component by computing, in the first video frame or the second video frame, a variance of intensity values in the window region.
- 6 The method of claim 5, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.
- 7. The method of any preceding claim, the operations further comprising assigning the particular confidence value by performing additional operations that comprise computing, in the first video frame or the second video frame, a variance of intensity values in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel, wherein a decrease in the variance of intensity values corresponds to a decrease in the particular confidence value.
- 8. The method of claim 7, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.
- 9. The method of any preceding claim, wherein the target region comprises an object to he removed or modified.
- 10. A computer-readable medium having program code stored thereon that, when executed by one or more processing devices, causes the one or more processing devices to perform operations comprising: accessing a video having a target region; a step for updating video content in the target region based on confidence-weighted motion estimation for the target region; and presenting the updated video content on a display device.
- I I. The computer-readable medium of claim 10, wherein the step for updating video content in the target region based on the confidence-weighted motion estimation for the target region comprises: computing a forward optical flow and a backward optical flow of a particular boundary pixel with respect to a first video frame in the video and a second video frame in the video; and applying a sigmoidal function to a difference between the forward optical flow and the backward optical flow, wherein a particular confidence value of the particular boundary pixel includes or is derived from an output of the sigmoidal function, wherein an increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value.
- 12. The computer-readable medium of claim 10 or claim 11, wherein the step for updating video content in the target region based on the confidence-weighted motion estimation for the target region comprises: computing, in one or more video frames of the video content that depict the target region, a variance of intensity values in a window region that includes (i) a particular boundary pixel from a boundary around the target region and (ii) a set of pixels in a window around the particular boundary pixel, wherein a decrease in the variance of intensity values corresponds to a decrease in a particular confidence value of the particular boundary pixel.
- 13. A system comprising: a processing device; and a computer-readable medium communicatively coupled to the processing device, wherein the processing device is configured to execute program code stored on the computer-readable medium and thereby perform operations comprising: accessing a scene comprising a first video frame and a second video frame, the accessed scene having an annotation identifying a target region to be modified in one or more video frames comprising the scene, computing a boundary motion for a boundary of the target region within the scene, wherein the boundary includes boundary pixels neighboring the target region in the first video frame and the second video frame, assigning confidence values to the boundary pixels, respectively, wherein a particular confidence value is at least partially based on one or more of (i) a difference between forward and reverse motion with respect to a particular boundary pixel and (ii) a texture in a region that includes the particular boundary pixel, interpolating a target motion of a target pixel within the target region from the boundary motion, wherein the particular confidence value of the particular boundary pixel controls a contribution of a particular motion of the particular boundary pixel to the target motion as interpolated from the boundary motion, and updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.
- 14. The system of claim 13, the operations further comprising assigning the particular confidence value by performing additional operations that comprise: computing a forward optical flow and a backward optical flow of the particular boundary pixel with respect to the first video frame and the second video frame; and applying a sigmoidal function to a difference between the forward optical flow and the backward optical flow, wherein the particular confidence value includes or is derived from an output of the sigmoidal function, wherein an increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value.
- 15. The system of claim 14, the operations further comprising computing the difference between the forward optical flow and the backward optical flow by performing additional operations comprising: identifying an observed position of the particular boundary pixel in the first video frame; computing an estimated position of the particular boundary pixel by (i) applying the forward optical flow from the first video frame to the second video frame and (ii) applying the backward optical flow from the second video frame to the first video frame; and computing a distance from the observed position to the estimated position.
- 16. The system of claim 14 or claim 15, wherein the operations further comprise deriving the particular confidence value from the output of the sigmoidal function, wherein deriving the particular confidence value from the output of the sigmoidal function comprises multiplying the output of the sigmoidal function by a texture component that is computed from the texture in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel, wherein an increase in the texture corresponds to an increase in the particular confidence value.
- 17. The system of claim 16, the operations further comprising computing the texture component by computing, in the first video frame or the second video frame, a variance of intensity values in the window region.
- 18. The system of claim 17, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.
- 19. The system of any of claims 13 to 18, the operations further comprising assigning the particular confidence value by performing additional operations that comprise computing, in the first video frame or the second video frame, a variance of intensity values in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel, wherein a decrease in the variance of intensity values corresponds to a decrease in the particular confidence value.
- 20. The system of claim 19, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201862745260P | 2018-10-12 | 2018-10-12 | |
US16/378,906 US11081139B2 (en) | 2018-10-12 | 2019-04-09 | Video inpainting via confidence-weighted motion estimation |
Publications (3)
Publication Number | Publication Date |
---|---|
GB201911506D0 GB201911506D0 (en) | 2019-09-25 |
GB2578354A true GB2578354A (en) | 2020-05-06 |
GB2578354B GB2578354B (en) | 2021-12-29 |
Family
ID=67991014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
GB1911506.2A Active GB2578354B (en) | 2018-10-12 | 2019-08-12 | Video inpainting via confidence-weighted motion estimation |
Country Status (1)
Country | Link |
---|---|
GB (1) | GB2578354B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113259712B (en) * | 2020-02-13 | 2023-07-14 | 腾讯科技(深圳)有限公司 | Video processing method and related device |
CN112767444B (en) * | 2021-01-19 | 2024-05-14 | 杭州萤石软件有限公司 | Moving object detection method, readable storage medium, and electronic device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060257042A1 (en) * | 2005-05-13 | 2006-11-16 | Microsoft Corporation | Video enhancement |
US20080112642A1 (en) * | 2006-11-14 | 2008-05-15 | Microsoft Corporation | Video Completion By Motion Field Transfer |
EP2608148A2 (en) * | 2011-12-23 | 2013-06-26 | Samsung Electronics Co., Ltd. | Method and apparatus for generating multi-view |
-
2019
- 2019-08-12 GB GB1911506.2A patent/GB2578354B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060257042A1 (en) * | 2005-05-13 | 2006-11-16 | Microsoft Corporation | Video enhancement |
US20080112642A1 (en) * | 2006-11-14 | 2008-05-15 | Microsoft Corporation | Video Completion By Motion Field Transfer |
EP2608148A2 (en) * | 2011-12-23 | 2013-06-26 | Samsung Electronics Co., Ltd. | Method and apparatus for generating multi-view |
Also Published As
Publication number | Publication date |
---|---|
GB201911506D0 (en) | 2019-09-25 |
GB2578354B (en) | 2021-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2019216594B2 (en) | Fast motion-based video inpainting | |
US10600157B2 (en) | Motion blur simulation | |
KR101923845B1 (en) | Image processing method and apparatus | |
KR101370718B1 (en) | Method and apparatus for 2d to 3d conversion using panorama image | |
Patwardhan et al. | Video inpainting under constrained camera motion | |
US6665450B1 (en) | Interpolation of a sequence of images using motion analysis | |
CA2636858C (en) | Methods and systems for digitally re-mastering of 2d and 3d motion pictures for exhibition with enhanced visual quality | |
Liao et al. | Dvi: Depth guided video inpainting for autonomous driving | |
KR100931311B1 (en) | Depth estimation device and its method for maintaining depth continuity between frames | |
EP3469788A1 (en) | Multi-view scene segmentation and propagation | |
US11227428B2 (en) | Modification of a live-action video recording using volumetric scene reconstruction to replace a designated region | |
US11823357B2 (en) | Corrective lighting for video inpainting | |
US11676252B2 (en) | Image processing for reducing artifacts caused by removal of scene elements from images | |
US11756210B2 (en) | Video inpainting via machine-learning models with motion constraints | |
GB2578354A (en) | Video inpainting via confidence-weighted motion estimation | |
KR101086274B1 (en) | Apparatus and method for extracting depth information | |
CN115546027B (en) | Image suture line determination method, device and storage medium | |
CN114494445A (en) | Video synthesis method and device and electronic equipment | |
Lin et al. | Fast intra-frame video splicing for occlusion removal in diminished reality | |
Pohl et al. | Semi-Automatic 2D to 3D Video Conversion | |
CN116030340A (en) | Robot, positioning information determining method, device and storage medium | |
Croci et al. | Robust calibration of broadcast cameras based on ellipse and line contours |