clear all
close all
clc
% data = imread('D:\Projects\CarPool\TestData\test_img1.bmp');
data = phantom(128);
img = sum(data, 3);
[M, N] = size(img);
xvec = linspace(-N/2, N/2);
% convert pixel coordinates from cartesian to polar
[x, y] = meshgrid(xvec,xvec);
[theta, rho] = cart2pol(x, y);
[xx, yy] = pol2cart(theta, rho);
%# show pixel locations (subsample to get less dense points)
xdisp = x(1:8:end,1:4:end);
ydisp = y(1:8:end,1:4:end);
tdisp = theta(1:8:end,1:4:end);
rdisp = rho(1:8:end,1:4:end);
xxdisp = xx(1:8:end,1:4:end);
yydisp = yy(1:8:end,1:4:end);
% h = warp(xx, yy, zeros(size(xx)), img);
% imgWarp = get(h, 'FaceColor');imgWapr = sum(imgWarp,3);
% imgWarp = (imgWarp - min(