Revision 27188bfef28c48a696b870a15f8927d96a7ee029 authored by a1ex on 22 October 2013, 21:29:21 UTC, committed by a1ex on 22 October 2013, 21:29:21 UTC
1 parent c8588c2
Raw File
defish-xy.m
#!/usr/bin/env octave3.2

x = 1:360; y = 1:240;
x = [x, fliplr(x)];
y = [y, fliplr(y)];
[X,Y] = meshgrid(x,y);
XY = zeros(480,720);
for i = 1:480
	for j = 1:720
		if i/480 < (721-j)/720
			XY(i,j) = X(i,j) / 360;
		else
			XY(i,j) = Y(i,j) / 255;
		end
	end
end
imwrite(XY,'xy.tiff'); # defish this and save it as rectilin-xy.jpg
back to top