tensorRelightingDemo.m demonstrates the use of the Cartesian Tensor basis for facial Apparent BRDF (ABRDF) estimation and subsequent relighting. Given a few images of a face under different point source illuminations, the included code for ABRDF estimation can interpolate and extrapolate them to generate new images.
Please cite the following paper if you find this code useful:
Ritwik Kumar, Angelos Barmpoutis, Arunava Banerjee, Baba C. Vemuri, “Non-Lambertian Reflectance Modeling and Shape Recovery of Faces using Tensor Splines”, IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2009.
Note that in the above paper we propose a method that combines the Cartesian Tensors at each pixel with spatial Splines. The spline part of the paper is not included in this code, but even without it, the provided code can be used for relighting, although with a little reduced relighting quality when the number of input images is small.
Ritwik Kumar (2022). Cartesian Tensor Face Relighting (https://www.mathworks.com/matlabcentral/fileexchange/27914-cartesian-tensor-face-relighting), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!