Professional Documents
Culture Documents
Pi19404
February 27, 2013
Contents
Contents
Feature Detection - Harris Corner 3D Detector 3
0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 0.2 Spatio-Temporal Features . . . . . . . . . . . . . . . 0.2.1 Model of Spatio-termporal Image Sequence . 0.3 Computation of matrix parameters . . . . . . . . . . 0.3.1 Matrix Paramter A,B,C . . . . . . . . . . . . . . . 0.3.2 Matrix parameters D,E,F . . . . . . . . . . . . 0.3.3 Implementation Details . . . . . . . . . . . . . . 0.4 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.5 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . 0.6 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
3 3 4 6 6 7 8 8 9 9 10
2 | 10
3 | 10
Feature Detection - Harris Corner 3D Detector Potential candidates for Spatial interest points are edge pixels,points with significant changes in the neighborhood and junction of corners. Potential candidates for Spatio-Temporal interest points are points which exhibit large variation in spatial as well as temporal dimensions.
The point being considered is I (u; v; t) .x,t, are spatio-temporal shifts.Thus we accumulate frames at different time instants.We compute average change in intensity of frame at instant t with shifted windows at time instants t 1; t + 1.
E (x; y; ) =
jI (x + u; y + v; t + ) I (u; v; t)j
(1)
4 | 10
I (x + u; y + v; t + )
@I @I I (x + u; y + v; t + ) = I (u; v; t) + x @x + y @y + @I @t
W W W
@I @I jx @x + y @y + @I j @t
jxX + yY + T j
x2 X 2 + y2 Y 2 + T 2 + 2xyXY
W
+2
yY T + 2xXT
Y2+
2 T 2 + 2xy
XY
(2)
E (x; y; ) = Ax2 + By2 + 2Cxy + 2yD + 2xE + 2 F x A C E E (x; y; ) = x y RC B DS Ry S E D F The shifts considered are (0; 1; 0); (1; 1; 0); (0; 1; 0); (1; 1; 0); (0; 1; 1); (1; 1; 1) (0; 1; 1); (1; 1; 1); (0; 1; 1); (1; 1; 1); (0; 1; 1); (1; 1; 1).
These shifts correspond to spatial derivatives in x and y direction , spatial derivatives wrt termporal windows . In Harris 2D detector we used a 2D window ,similarily in 3D harris detector we use a 3D window. The block size represented the size of 2D window in harris corner detector. For 3D harris corner detector we would have to store the image frames corresponding to block size.Large the block size in temporal dimension longer is observation interval for which change in spatial interest points are observed. Again the eigen values of matrix are analysed and points which provide all three large eigen values indicates a corner points. A similar measure to 2D harris corner detector can be used.
QP Q
5 | 10
Thus we take maximal value of k and compute the response function for each point .If the response function is above a certian threshold we can classify it as a spatio-temporal corner.
bst + 2
A= B= C=
w w w
1 1
@I W @x
j j
@I W @y
j j
(4)
@I @I W @y @x
6 | 10
Feature Detection - Harris Corner 3D Detector y directions about a image patch. For 3D harris corner detector we compute this in a similar way where the average is performed for image frames in temporal direction as well. Thus for a stack of frames we compute the spatical derivatives along the x and y for each accumulated frame and take the average of all the frames.
A= B= C=
W T W T W T
1 1
@IT W @x
j j
@IT W @y
j j
(5)
@IT @IT W @x @y
= @t
j @I j
D= E=
@I @I @t @y @I @I @t @x
(6)
The first order temporal derivate is given by temporal kernel 12 1 and expressed as Dt (u; v; t) = I (u; v; t 1) + 2I (u; v; t) I (u; v; t + 1). The above expression gives the termporal derivative about the point (u; v; t). This is computed as average for all points in the window and over all the frames of block
= W T
jDt(u; v; t)j
We already compute spatial derivatives for each image frame and as shown earlier we can compute temporal derivative about each point in the frame.
7 | 10
D=
W T
@I @I W @t @y
E=
W T
@I @I W @t @x
0.4 Output
The test input and output files are placed in the repository https: //github.com/pi19404/m19404/tree/master/FEATURE_DETECTOR The test input file is i2.avi and output file is harris_3d_demo.ogv We can observe feature are detected in region where significant motion is present and these can help in describing the motion.
8 | 10
0.6 Code
we define a main feature_detector base class containing methods and data common to all feature detector. the harris_3d class is derived class containing specific implementations of algorithms. The code OpenCV code can be found in code repository https://github.com/pi19404/m19404/tree/master/FEATURE_DETECTOR or https://code.google.com/p/m19404/source/browse/FEATURE_DETECTOR/
9 | 10
Bibliography
Bibliography
[1] Chris Harris and Mike Stephens. A combined corner and edge detector. In: In
Proc. of Fourth Alvey Vision Conference.
[2]
Ivan Laptev. On Space-Time Interest Points. In: Int. J. Comput. Vision 64.2-3 (Sept. 2005), pp. 107123.
7.
[3]
Jianbo Shi and C. Tomasi. Good features to track. In: Computer Vision and
Pattern Recognition, 1994. Proceedings CVPR '94., 1994 IEEE Computer Society Conference on.
doi: 10.1109/CVPR.1994.323794.
10 | 10