How can I combine Ofmesh with Ofvideograbber?

Hi there ! Im looking how to use the cam to generate a mesh connecting lines with points, but my skecht aint working. Im learning meshes from this tutorial: ttp://openframeworks.cc/tutorials/graphics/generativemesh.html
Instead of using a predefined image I want to use the cam to generate meshes. Is there a way to do it?

Yes, instead of using an ofImage to get the intensity values, you can make an image from ofVideoGrabber input. ofVideoGrabber gives you access to pixels via .getPixelsRef() (see here). You can then create an ofImage using those pixels or, better, use them directly.

ofImage has a member function called .setFromPixels() (see here).

Thanks ! Ive done it. The only problem is that my computer seems to be on fire everytime I ran the app, so to continue in that path i would rather wait to have a better computer.