No products are associated with this question.
I think you want to compute the SIFT right ?
Anyway to divide the image into blocks, you can use following tip
in case you have difficulty you can share your code.
To find the gradient magnitude and orientation, the following code may help you.
angle = 360;
[GradientX,GradientY] = gradient(double(img));
Gr = sqrt((GradientX.*GradientX)+(GradientY.*GradientY));
index = GradientX == 0; GradientX(index) = 1e-5;
YX = GradientY./GradientX;
A = ((atan2(GradientY,GradientX)+pi)*180)/pi;
A contains the orientation of each pixel.