My problem is this:

I have an image of a half cylinder taken from a horizontal perspective and it has square grid lines on it, so I was wondering how can I implement in MATLAB to expand this half cylinder so that all my grid cells become the same size? I know that I will lose a lot of edge resolution, and simple linear interpolation should do the trick, but I don't know how to tell MATLAB about it. I also know the geometric properties of the cylinder, radius and height. Any help is appreciated.
This is the approach I'm using, but I'm trying to find a transformation that will make the faces the same size as the inner cells.
im=imread('Capture.png');
imshow(im);
impixelinfo
r = @(x) sqrt(x(:,1).^2 + x(:,2).^2);
w = @(x) atan2(x(:,2), x(:,1));
f = @(x) [sqrt(r(x)) .* cos(w(x)), sqrt(r(x)) .* sin(w(x))];
g = @(x, unused) f(x);
tform2 = maketform('custom', 2, 2, [], g, []);
im3 = imtransform(im, tform2, 'UData', [-1 1], 'VData', [-1 1], ...
'XData', [-1 1], 'YData', [-1 1]);
figure,
imshow(im3)