Adding constrains to camera position

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blastam20
    Blossoming 3Dflower
    • Feb 2018
    • 2

    Adding constrains to camera position

    Hi,
    I've taken several images of an object and I want to create a 3d model with correct measures of the object.
    I took the images with two camera which i placed directly one above the other - 10cm apart and I walked around the object and took photos simultaneously with both cameras.
    I don't know the (x,y) positions of the cameras in the photos i took but i know that the difference in their z coordinant is constant and equals to 10 cm. is there a way i can enter this position/distance constrain and obtain exact 3d model ?
    As for know i can only add this information as distance constrain between the two cameras after the sparse reconstruction, the problem is that sometimes although the cameras were exactly above each other, in the reconstruction some of the camera positions appear as they had been taken in different (x,y) positions (not exactly above each other).
    I'd be grateful if somebody could help,
    Thanks
  • Andrea Alessi
    3Dflow Staff
    • Oct 2013
    • 1335

    #2
    Hi Blastam,

    from the information you have, it looks like you can only use the distance you have to rescale the world.

    Are you using a fixed rig with multiple cameras? If so, you can pre-calibrate your rig and the use the "load photos with known parameter" functions in order to skip the orientation phase. Otherwise, if you have x,y,z position of each camera (i.e. from a GPS) you can use them as camera constraints in the project wizard.

    If you have more details/any questions feel free to ask!

    Comment

    • Blastam20
      Blossoming 3Dflower
      • Feb 2018
      • 2

      #3
      where is that option located?

      Comment

      • Andrea Alessi
        3Dflow Staff
        • Oct 2013
        • 1335

        #4
        File -> Load Photos with known parameters

        You need to know both internals and externals though, so the pre-calibration of the shooting rig is mandatory.

        Comment

        • kailasnaga1
          Blossoming 3Dflower
          • Feb 2018
          • 1

          #5
          Yo can try this:

          deltaPos = new Vector3(oldPos.x - pos.x, oldPos.y - pos.y, oldPos.z - pos.z);

          Vector3 newPos = cam.transform.position + deltaPos;

          Vector3 newPosClamped = new Vector3(Mathf.Clamp(newPos.x, minX, maxX), Mathf.Clamp(newPos.y, minY, maxY), Mathf.Clamp(newPos.z, minZ, maxZ));

          cam.transform.position = newPosClamped;

          Comment

          • Andrea Alessi
            3Dflow Staff
            • Oct 2013
            • 1335

            #6
            Wow, bots are evolving

            Comment

            Working...