range image challenge:
Modify the program abw-coord.c to calculate the x,y,z coordinates for the
given pixel cooordinate. The conversion is:
x[i,j] = (j-255) * (range[i,j] / scal + offset) / |f|
y[i,j] = (255-i)/c * (range[i,j] / scal + offset) / |f|
z[i,j] = (255 - range[i,j]) / scal
where i is the row coordinate, j is the column coordinate, and
range[i,j] is range[i*COLS+j] in a 1D array storing the image;
and where the calibration constants scal, offset, c and f are given
in the code stub abw-coord.c.
See pg 11 of http://cecas.clemson.edu/~ahoover/ece431/refs/RangeCameras.pdf
for more details.