function out=adjust( image ) % ADJUST computes the x and y component of the linear symetry % The program lin_sym is called and the angle is then adjusted % It returns a matrix twice the size, as the x and y components % are interleaved ( x11, y11, x22, ... ) image = lin_sym( image, 1.9, 1.8, 15, 0 ); % Transform to polar image_mod = abs( image ); image_ang = angle( image ); % The angle needs to be multiplied by 2 image_ang = image_ang * 2; % Transform it back to cartesian coordinates image_x = image_mod .* cos( image_ang ); image_y = image_mod .* sin( image_ang ); [m n] = size( image_x ); % Interleave the values out = zeros(m,2*n); out( : , 1:2:2*n-1 ) = image_x; out( : , 2:2:2*n ) = image_y; end