Suppose we have 2 images in motion for detecting the object in movement according to Lucas and Kanade [u, v] = inv(H)*[dxdt, dydt] where H is the Hessian for partial derivatives for image x and y direction dxdx, dxdy, dydx, dydy.
I know for partial derivatives with respect to x a y we need to just use the following formula for derivatives
dx = (img[i-1] - img[i+1]) / 2;
dy = (img[j-1] - img[j+1]) / 2;
but I also need to calculate the derivative for time t as we are given 2 frames in space time, I was thinking it might be smth. like this:
dz = (img1[i] - img1[i]) / 2;
But I am not sure exactly, can anyone suggest me an idea ?
In order to estimate the temporal derivative you can use:
The result will be dz = img1(i,j)-img2(i,j) or dz = (img1(i,j) - img3(i,j)) / 2, where img3 ,img2 and image 1 are consequtive caputred frames. However for practical reasons the simple differenz operator is often used.