Meshroom Photogrammetry
Posted: Tue Jan 01, 2019 12:23 am
Over Christmas I have been looking at a piece of open source software that allows you to create a Blender 3D textured Mesh from a set of ordinary photographs
Tutorial with Samples
https://www.gamefromscratch.com/post/20 ... hroom.aspx
I grabbed and used the samples
https://github.com/mkbreuer/Misc-Share- ... Images.zip
this set of rock images and Meshroom does take a while to run because I do have an oldish graphics card but it is Nvidia and does support CUDA. In Meshroom in the 3D viewer window I do have something that resembles the rock shape. It is almost like none of the image content has been assigned to be background.
The .obj file imports into Blender I am using version 2.79 where the result appears as a single mesh none of which is rock shaped when I look at the textured view I can see that the surface of this distorted sheet is made of 9,310 faces in a single skin where I can see that the texture is made from the original images I can make out parts that are the brick floor surface and I can see the van that appears in some of the background. But it aint no rock shape. I am going to review the tutorial to see if there is some step I have missed out I have a couple of projects pending but I do know this Rock set of images is supposed to work.
[edit]
I cleared the cache and rerun the process from scratch and the whole thing took circa 20 minutes the largest portion of this being the DepthMap section and I noticed that what appeared to be the rock was the point cloud I needed to click import model to actually see the mesh and this was the shape I saw when I imported the mesh .obj file into Blender. So it does look like Blender is importing the mesh as generated by MeshRoom it is just that the mesh I am generating is not the same as the mesh generated in the video from the same sample set. All of the images have a green check mark and the point cloud does appear to be roughly in a rock shape just that the generated mesh is not breaking the resulting mesh into foreground and background sections. There is a possibility I have not installed properly so I am going to take time to revisit this and try again.
[/edit]
[edit2]
Fresh install no change I am going to take everything to some alternative hardware I have access to to try it there.
[/edit2]
[edit3]
Tried with a newer PC with much more recent Graphics card and the Rock image set has worked fine so it was obviously an older version of CUDA that was incompatible. I will find out the spec of the PC and Graphics used and update when I have the data.
[/edit3]
[edit4]
I am now using my best Camera this is a Fuji S8650 the Meta data for pictures taken with this camera specify the camera as "S8600 S8650 S8630" so the get Meshroom to recognise the photographs it is necessary to edit the cameraSensors.db file you find this file in the folder Meshroom-2018.1.0\aliceVision\share\aliceVision (note the Meshroom-2018.0.0 may have different digits as this relates to the version). Edit the .db file with a text editor and change the line
Fujifilm; Fujifilm Finepix S8600;6.16
so that it becomes
Fujifilm; Fujifilm Finepix S8600 S8650 S8630;6.16
Another good tutorial is https://www.youtube.com/watch?v=RmMDFydHeso
[/edit4]
[edit5]
The graphics card that worked was a Nvidia GTX1050
[/edit5]
[edit6]
There is also a tool on this page "Instant Meshes" scroll down the page for the Linux and Windows binaries and this has its own tutorial at https://www.youtube.com/watch?v=hu4NavAy5f4 this is like blenders decimate but with more options.
[/edit6]
Tutorial with Samples
https://www.gamefromscratch.com/post/20 ... hroom.aspx
I grabbed and used the samples
https://github.com/mkbreuer/Misc-Share- ... Images.zip
this set of rock images and Meshroom does take a while to run because I do have an oldish graphics card but it is Nvidia and does support CUDA. In Meshroom in the 3D viewer window I do have something that resembles the rock shape. It is almost like none of the image content has been assigned to be background.
The .obj file imports into Blender I am using version 2.79 where the result appears as a single mesh none of which is rock shaped when I look at the textured view I can see that the surface of this distorted sheet is made of 9,310 faces in a single skin where I can see that the texture is made from the original images I can make out parts that are the brick floor surface and I can see the van that appears in some of the background. But it aint no rock shape. I am going to review the tutorial to see if there is some step I have missed out I have a couple of projects pending but I do know this Rock set of images is supposed to work.
[edit]
I cleared the cache and rerun the process from scratch and the whole thing took circa 20 minutes the largest portion of this being the DepthMap section and I noticed that what appeared to be the rock was the point cloud I needed to click import model to actually see the mesh and this was the shape I saw when I imported the mesh .obj file into Blender. So it does look like Blender is importing the mesh as generated by MeshRoom it is just that the mesh I am generating is not the same as the mesh generated in the video from the same sample set. All of the images have a green check mark and the point cloud does appear to be roughly in a rock shape just that the generated mesh is not breaking the resulting mesh into foreground and background sections. There is a possibility I have not installed properly so I am going to take time to revisit this and try again.
[/edit]
[edit2]
Fresh install no change I am going to take everything to some alternative hardware I have access to to try it there.
[/edit2]
[edit3]
Tried with a newer PC with much more recent Graphics card and the Rock image set has worked fine so it was obviously an older version of CUDA that was incompatible. I will find out the spec of the PC and Graphics used and update when I have the data.
[/edit3]
[edit4]
I am now using my best Camera this is a Fuji S8650 the Meta data for pictures taken with this camera specify the camera as "S8600 S8650 S8630" so the get Meshroom to recognise the photographs it is necessary to edit the cameraSensors.db file you find this file in the folder Meshroom-2018.1.0\aliceVision\share\aliceVision (note the Meshroom-2018.0.0 may have different digits as this relates to the version). Edit the .db file with a text editor and change the line
Fujifilm; Fujifilm Finepix S8600;6.16
so that it becomes
Fujifilm; Fujifilm Finepix S8600 S8650 S8630;6.16
Another good tutorial is https://www.youtube.com/watch?v=RmMDFydHeso
[/edit4]
[edit5]
The graphics card that worked was a Nvidia GTX1050
[/edit5]
[edit6]
There is also a tool on this page "Instant Meshes" scroll down the page for the Linux and Windows binaries and this has its own tutorial at https://www.youtube.com/watch?v=hu4NavAy5f4 this is like blenders decimate but with more options.
[/edit6]