This plugin compute a normal map from an image stack (surface views) and it's associate lighting positions.
The image stack contains images captured from a fixed camera position under spatially variable source of illumination.
I write this plugin using this paper informations : “Polynomial Texture Mapping and 3D representations” / Lindsay MacDonald and Stuart Robson (ISPRS http://www.isprs.org/).
You can download the paper here : http://www.isprs.org/proceedings/XXXVIII/part5/papers/152.pdf
To test my plugin, I was using a 3D virtual scene done with Blender (www.blender.org).
Here is the scene configuration in Blender (if you haven't real PTM hardware to capture pictures)
With Blender, I produce 61 pictures of the 3D surface by moving the lamp on each 61 positions.
Here is my Blender test file : blender_test_ptm_v02.zip. Play animation to generate whole picture set.
I use a flat RGB texture on the 3D surface, but the plugin use 8 bits grayscale.
61 pictures from the 3D surface :
For each picture, I record the attached lamp position in world origine. Here is the 61 lamp positions (a text file. Each row contains x y z position).
1) You can also run the plugin from menu “Analyze / Tools / Normal map computing using PTM”. The image stack containing PTM measure must be already opened
2) Choose the lamp position file
(The stack size must be the same than the lamp positions, not necessary 61)
3) Choose the texture size and position in the real world (using same origin than lamp position)
If you checked “Invert normals”, it produce the second map.
(For example, Blender use inverted normal map)
It use this following libraries : “Jama”, “JLapack”.
Copy the .jar file to your plugins directory and restart “ImageJ”.
You can use the script by menu “ImageJ / Analyze / Tools / Normal map computing using PTM”
Contact me for any questions or suggestions : vincent dot vansuyt at edf dot fr (preferred language : french)
GPL distribution (see licence ). Sources for plugins are available freely. Sources for core are available on request.