Mesh Warping and Face Recognition

Hi there.
I’m trying to do some mesh warping with OpenFrameworks.
My main goal is to use it along with Face Recognition, so I can apply some effects to the user’s face.
The Face Recognition part is pretty much solved, since ofxFaceTracker deals with it pretty well with good results.
I am having some difficulty with the mesh warping though.

My goal is to get results similar to these:


I already have the points of interest in the image. The challenge now is to use these points to construct the mesh and then apply the warping.
Anyone has some tips or directions?
Thanks

1 Like

Hi,
Assuming you have the coordinates of each blue point, and that the image size is the same than the grid, I think each vertex of the resulting mesh must have:

  • position: coordinates of a blue point, after the warping
  • texture coordinates (uv): coordinates of the same blue point, but before the warping.

Hi @bernardoaraujor, there are several addons that can handle that. Take a look at ofxaddons.com.
ofxWarpBlendTool, ofxWarpableMesh, etc…