Let's start from a small teaser, my ~30 y.o. teddy reconstructed by openMVG and openMVS:
https://sharemy3d.com/viewer.php?m=6316 ... 8bd70cccb8 <-WebGL viewer + downloadable OBJ model
I used 7 photos (10 years old cheap compact camera and pretty bad lighting), and whole reconstruction process took ~5 minutes.
Here are used commands in short:
Code: Select all
python SfM_GlobalPipeline.py teddy_in teddy_global_out
InterfaceOpenMVG2 -i teddy_global_out/sfm_data.json -o teddy.mvs
DensifyPointCloud teddy.mvs
ReconstructMesh teddy_dense.mvs
TextureMesh teddy_dense_mesh.mvs
Code: Select all
import ReverseEngineering as Reen
points = App.ActiveDocument.teddy.Points
data = [(i.x,i.y,i.z) for i in points.Points]
surf=Reen.approxSurface(Points=data,UDegree=2,VDegree=2,NbUPoles=18,NbVPoles=18,Smooth=True,Weight=0.01,Grad=0.9,Bend=0.1,Iterations=5,Correction=True,PatchFactor=1.2)
shape=App.ActiveDocument.addObject("Part::Spline")
shape.Shape=surf.toShape()
Unfortunately the process was slow, and the results (as you can see) are not so great....
The aim: I want create some kind of frontend in FreeCAD, using openMVG/openMVS in similar fashion as Calculix is used in the FEM workbench. Some things to consider implementation:
a) fast 3d point cloud with colours object - for displaying point cloud
b) rendering 3d meshes with textures (not possible yet?)
Other ideas? I'm open for them, this a random project for long winter nights;)