PANDORE Version 6 | GREYC-IMAGE |
pgraylevel2depth builds a 3D image from a 2D image, where the gray level are converted to depth. For example, the gray level 127 at coordinate (x,y) in the 2D image is copied along the 127 first slices at the same coordinate.
The parameter depthmax defines the depth of the output image im_out. All depths are normalized from that maximum depth.
The 3D image is built from the last slice. It means that clear objects occupy the first slices while dark objects occupy the last slices.
The algorithm is as follows:
for (y=0; y< normalize(im_in[x],depthmax); y++) im_out[y][x] = normalize(im_in[x],depth);
Returns SUCCESS or FAILURE.
Builds the 3D image out.pan from the 2D image tangram.pan:
pgraylevel2depth 50 tangram.pan a.pan
Construction d'une image de reliefs 3D à partir d'une image 2D.
Author: Jean-Marie Janik