Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %adapted from https://octave.sourceforge.io/image/function/imtransform.html
- im = [checkerboard(20, 2, 4); checkerboard(40, 1, 2)];
- rho = pi/4 % 45°, can't be zero
- newpoint = 1 + 1/tan(rho);
- p1 = [0 0; 1 0; 1 1];
- p2 = [0 0; 1 0; newpoint 1];
- T = maketform ('affine', p1, p2);
- im2 = imtransform (im, T, 'fillvalues', 255);
- imshow (im2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement