Using camera constraints

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HansWellens
    3Dfollower
    • Nov 2016
    • 21

    Using camera constraints

    I have a 14 camera stereo setup for facial capture. I am assuming I could improve the strength of the solutions Zephyr obtains by taking a "calibration shot", of an inkjet printed page containing multiple coded targets, which can bee "seen" by all cameras (or as many as possible). This should enable Zephyr to obtain the camera positions "sub-pixel marked". Subsequent facial shots would then be obtained, but the camera positions constrained using the "calibration data", obtained using the calibration shot. Is this reasoning correct? If so, how do I apply it correctly? I have tried, but failed to apply this using the "import camera constraints" option, getting a warning in the process to remove the constraints. Anybody have experience with this?
  • Roberto
    3Dflow
    • Jun 2011
    • 559

    #2
    Hi HansWellens,

    if your cameras are fixed (ie you are using a rigid rig / array) then your reasoning is definitely correct. Please note that to use control points and to import/export camera constraints you must have a Pro or Aerial version.

    For the first calibration run and for computing the camera internal and external parameters, it's a good idea to use coded targets both for improving the calibration and for actually checking the accuracy. My suggestion is to use a well textured subject + coded targets. For introducing coded target constraints, after the orientation/sparse point cloud creation, you should select them in the 2d images manually though the 'add control points -> from 2D images' or automatically with the appropriate tool if you are using Zephyr coded targets. If you don't have any 3D positions associated to the coded targets (most probably), you can run a bundle adjustment using the control points constraints from tools->workspace->adjust camera parameters. Make sure the 'use control points' is checked. My suggestion is to keep the confidence at 50%, but if you want to weight the control points more wrt to the automatic keypoints matches, feel free to increase the slider. Additionally you can scale the world metrically by introducing one or more known distances. Once you think the camera orientations and calibrations are good, you can export both internals and externals parameters from the "export cameras and points menu".

    Now, when you start a new project using the same rig, instead of selecting 'new project', select "File"->"Load Photos with known parameters". You will be asked to input the internals and externals camera parameters (in the same txt format you exported them) and they will be considered by Zephyr as fixed.

    The 'import camera constraints' that you used does not enforce the camera constraints but scale the model in a rigid way. Anyway, if you are having problem importing it, probably the file is not in the correct format. If you still want to share it with me I can have a look.

    Comment

    • HansWellens
      3Dfollower
      • Nov 2016
      • 21

      #3
      Dear Roberto,

      Thank you for your enlightening response. I tried your suggestions, but unfortunately still get the parsing error. I took the liberty of enclosing the internals and externals file. I don't immediately see anything that's off about them. I do have one additional question: do you believe calibrating the cameras individually would have merit in a high accuracy project? Would this be simple to implement (loading the individual camera calibrations (I guess it would be, using the internals file)? Secondly, since the camera orientations are now fixed, would there still be a use for some markers in the after-calibration facial shots?

      Thanks,
      Hans
      Attached Files

      Comment

      • Roberto
        3Dflow
        • Jun 2011
        • 559

        #4
        I've made a quick test and it seems to work fine. I've created 'fake' images with the very same names as in the files you sent me:



        Click image for larger version

Name:	test.JPG
Views:	1090
Size:	28.1 KB
ID:	1631
        Please note that the filename must match those specified in the externals and internal text files. In case you are still having problems, please check also the log for additional warnings.

        As for the camera calibration of each camera, since you different devices, it might be a good idea to let the internals parameters to be adjusted in an independent way. You can easily do that during the first run. In the calibration page of the new project wizard, select all the cameras, then right click on the list and select 'clone calibrations':

        Click image for larger version

Name:	clone.JPG
Views:	1206
Size:	107.7 KB
ID:	1632
        To select all the cameras simply left-click on the name of the first camera and then press ctrl+a (selected cameras will be marked as yellow).

        In this way, all the calibrations will start from the initial calibration values (extracted from exif / database or manual), but they will be adjusted independently during the reconstruction or during the subsequent bundle adjustment with control points. As for the need of additional markers, it might depends on how much you think the rig will move during the acquisitions. If you additional other markers you can use them to check the error and to run an additional bundle adjustment to adjust the cameras. I don't think you need additional markers if the rig is fixed, but you can always use them for error checking.


        Attached Files

        Comment

        Working...