First we captured stereo data using the GoPro Hero 3D system.
Some examples of left and right images are below.
|
|
Then we built a disparity map using MatLab. The results of the left and right image shown above:
Next we build a normal map from the disparity image by comparing neighboring pixels and shifting the normal accordingly.
Disparity Map Output From MatLab |
Normal Map Displayed As RGB Values |
I then recalculate phong shading using using these new normals.
Then the original texture image is added.
Finally, I transform the normals into tangent space. For this demo I have hardcoded the TBN matrices. I have removed the texture to make the results more noticeable.