Categories
3d code graphics gui opencv opengl programming school video vision

Spherical harmonics face relighting using OpenCV, OpenGL [w/ code]

Hi!
I’ve been working on implementing a face image relighting algorithm using spherical harmonics, one of the most elegant methods I’ve seen lately.
I start up by aligning a face model with OpenGL to automatically get the canonical face normals, which brushed up my knowledge of GLSL. Then I continue to estimating real faces “spharmonics”, and relighting.
Let’s start!

Categories
3d code graphics opengl programming Solutions

A GLSL shader showing the normal map [w/ code]


A very simple thing, although I couldn’t find on Google some place to copy-paste off, so here it is: