3D scanner with auto uv texture

I have used a line laser and a camera to capture the profile of a spinning object.
Although one could just use a beam of sun light or lamp light shining through a slit in a piece of paper.

I wrote a python script that takes the footage, detects the laser and makes a 3d object.obj file… everything is working well

I would like to take this to the next level and have the script automatically texture the 3d scan

the current script and files can be found at https://github.com/Rylangrayston/peach/tree/master/scanner

my script can already create a mesh (not just a particle cloud) from the scan footage.

can some one tell me how i can automatically generate a uv map … i have all the data i need to do this I just dont know how to get it into blender.

Right now this script uses python 2.7 and creates a mesh you can import to blender … but id like it to run right inside blender.
ps it uses open cv and the script lets you chose a real time frames from your web cam!!
You can detect any colour with it not just lasers, and then data can be mapped to a terrain.

here are some pics!


above you can see the green dots on the edge of the spoon …
edit: you cant see the green dots unless you right click and view the image in a new tab at its full resolution!
The script will detect any colour you click real time or from a pre recorded frame range


we filmed the crane with a spinning weight, and a rod.
it all went well thanks Nathan Graystons mad camera skills!!


you dont have to film a spinning object you can pan with the camera as well and map to a 3d plane