1

I computed a mesh using SfM techniques and am able to extract a 3D mesh. However, the mesh doesn't have scale as expected with SfM techniques.

Mesh using SfM without scale

To scale the mesh, I am able to generate planes of the with real world scale. E.g.,

Planes with scale

I tried to play around with ICP to scale and register the SfM mesh to match the scale of the planes but was not very successful. Could anyone point me in the right direction on how to solve this issue? I would like to scale the SfM mesh to match the real world scale. (I do not need to register the two meshes)

Pavan K
  • 4,085
  • 8
  • 41
  • 72
  • Do you have some form of correspondences between the mesh and the input images? – Nico Schertler Oct 10 '19 at 16:09
  • No, but I am looking at computing them in some form. I am looking at using procrustes to scale and compute the align the meshes. Not sure if it is the right approach. Any pointers will be helpful – Pavan K Oct 11 '19 at 10:14

2 Answers2

1

You need to relate some distance in the model to some measurable distance in the physical world. The easiest is probably the camera height above the floor plane. If that is not available, then perhaps the height of the bed or the size of the pillow.

Let's say that the physical camera height is 1.6m and in the model the camera is 800 units of length above the floor plane, then the scale factor you need to apply (to get 1 unit of length = 1 mm) is:

               1600
scale_factor = ---- = 2.0
                800

Pibben
  • 1,876
  • 14
  • 28
  • I can use mesh lab to do the scaling with the way you mentioned. I am trying to look for a method that can do it programmatically since one of the meshes is in known world scale. – Pavan K Oct 21 '19 at 09:53
  • So you have two meshes of the same object, one with known scale? – Pibben Oct 21 '19 at 10:21
  • Yes, that is correct. As you can see in the renders above – Pavan K Oct 21 '19 at 10:54
0

I ended up doing this, hope this helps someone or if anyone has a better suggestion, I will take it.

1) I used pyrender to render the two meshes from known poses in two worlds to get exact correspondences

2) I then used procustes analysis to figure out the scaling factor by computing the transformation of one mesh to another. You can procrustes from here

I am able to retrieve a scaling factor that is in acceptable range.

Pavan K
  • 4,085
  • 8
  • 41
  • 72