Depth mask assisted video stabilization
Systems ( 490 ), methods ( 340 ), and machine-readable and executable instructions ( 428 ) are provided for depth mask assisted video stabilization. Depth mask assisted video stabilization can include creating a first depth mask from a first frame ( 101, 201 ) and a second depth mask from a second frame ( 102, 202 ) to obtain depth information ( 342 ) and defining a first list of feature points ( 111 - 1 a, 111 - 2 a, 111 - 3 a, 111 - 4 a, 113 - 1 a, 113 - 2 a, 113 - 3 a, 113 - 4 a, 113 - 5 a ) from the first frame ( 101, 201 ) and a second list of feature points ( 111 - 1 b, 111 - 2 b, 111 - 3 b, 111 - 4 b, 113 - 1 b, 113 - 2 b, 113 - 3 b, 113 - 4 b, 113 - 5 b ) from the second frame ( 102, 202 ) ( 344 ). Depth mask assisted video stabilization can also include comparing feature points from the first list of feature points ( 111 - 1 a - 111 - 4 a, 113 - 1 a - 113 - 5 a ) with feature points from the second list of feature points ( 111 - 1 b - 111 - 4 b, 113 - 1 b - 113 - 5 b ) to find a number of common feature point pairs ( 111 - 1 a, 111 - 1 b ), ( 111 - 2 a, 111 - 2 b ), ( 111 - 3 a, 111 - 3 b ), ( 111 - 4 a, 111 - 4 b ), ( 113 - 1 a, 113 - 1 b ), ( 113 - 2 a, 113 - 2 b ), ( 113 - 3 a, 113 - 3 b ), ( 113 - 4 a, 113 - 4 b ), ( 113 - 5 a, 113 - 5 b )) ( 345 ) and creating a number of motion matrices from the common feature point pairs (( 111 - 1 a, 111 - 1 b ), ( 111 - 2 a, 111 - 2 b ), ( 111 - 3 a, 111 - 3 b ), ( 111 - 4 a, 111 - 4 b ), ( 113 - 1 a, 113 - 1 b ), ( 113 - 2 a, 113 - 2 b ), ( 113 - 3 a, 113 - 3 b ), ( 113 - 4 a, 113 - 4 b ), ( 113 - 5 a, 113 - 5 b )) ( 346 ). Depth mask assisted video stabilization can also include including the motion matrices in a correction matrix ( 348 ) and applying the inverse of the correction matrix to the second frame ( 102, 202 ) to perform video stabilization ( 350 ).
1. A method for depth mask assisted video stabilization comprising:
creating a first depth mask from a first frame and a second depth mask from a second frame to obtain depth information;
defining a first list of feature points from the first frame and a second list of feature points from the second frame;
comparing feature points from the first list of feature points with feature points from the second list of feature points to find a number of common feature point pairs;
creating a number of motion matrices from the common feature point pairs;
including the motion matrices in a correction matrix; and
applying the inverse of the correction matrix to the second frame to perform video stabilization.
2. The method of claim 1 , wherein defining the first list of feature points includes grouping pixels that are at a common depth and qualifying feature points based on contrast, uniqueness, and spatial location.
3. The method of claim 1 , wherein comparing feature points includes comparing feature points that are at a common depth.
4. The method of claim 1 , wherein including the motion matrices in a correction matrix includes including those motion matrices in the correction matrix that do not have subject motion where subject motion is determined by a particular motion matrix that differs from a majority of the motion matrices.
5. The method of claim 4 , wherein creating a number of motion matrices from the common feature point pairs includes performing the best fit operation on the common feature point pairs to create the motion matrices.
6. A system for depth mask assisted video stabilization, comprising:
a memory;
a processor coupled to the memory to:
create a first depth mask from a first frame and a second depth mask from a second frame to obtain depth information;
define a first list of depth objects from the first frame and a second list of depth objects from the second frame;
compare depth objects from the first list of depth objects with depth objects from the second list of depth objects to find a number of common depth object pairs;
perform a best fit operation on the common depth object pairs to create a number of motion matrices;
include the motion matrices in a correction matrix; and
apply the inverse of the correction matrix to the second frame to perform video stabilization.
7. The system of claim 6 , wherein pixels at a common depth are grouped together to define depth objects.
8. The system of claim 7 , wherein a pixel's depth is defined by reference to the corresponding depth mask.
9. The system of claim 6 , wherein depth objects from the first list of depth objects and depth objects from the second list of depth objects are compared if the depth objects are at a common depth.
10. The system of claim 6 , wherein the motion matrices that contain subject motion are removed from the correction matrix before the correction matrix is applied to the second frame where a motion matrix contains subject motion when the motion matrix differs from the majority of the motion matrices.
11. A non-transitory computer-readable medium storing instructions for depth mask assisted video stabilization executable by a computer to cause a computer to:
create a first depth mask from a first frame and a second depth mask from a second frame to obtain depth information;
define a first list of feature points from the pixels in the first frame and a second list of feature points from the pixels in the second frame;
compare feature points from the first list of feature points with feature points from the second list of feature points to find a number of common feature point pairs;
create a number of common depth objects from the common feature point pairs;
perform a best fit operation on the common depth objects to create a number of motion matrices;
include the motion matrices that do not contain subject motion in a correction matrix where a motion matrix contains subject motion when the motion matrix differs from the majority of the motion matrices; and
apply the inverse of the correction matrix to the second frame to perform video stabilization.
12. The medium of claim 11 , wherein the best fit operation that is performed on the common depth objects includes performing the best fit operation on the common feature point pairs that compose a common depth object.
13. The medium of claim 11 , wherein feature points from the first list of feature points and feature points from the second list of feature points are compared if the feature points are at a common depth.
14. The medium of claim 11 , wherein a common depth object is created by grouping a number of common feature point pairs.
15. The medium of claim 14 , wherein the common feature point pairs are grouped together based on depth and spatial location within the first and second frame.