This question is in the context of image processing.
Assume I have a matrix of size 64 by 64. Assume even rows are all zero and odd rows are all one. I want to rotate the matrix
d degrees. For example if I rotate it 90 degrees, then I will have a matrix with even columns equal to zero and odd columns equal to one.
Is there an algorithm to do that easily? Given the matrix and
d I want to rotate the elements. Matlab's
imrotate won't work since after rotation I get some zeros at the corners. I know one way is to use
repmat, rotate it and then crop it in the center. But that does not seem straightforward. Any smart ideas? For example, is it possible to define a formula to give the values of each element given d (and the fact that the matrix was originally
1 0 1 0...?