Generate camera positions for Instant-NGP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • feklee
    3Dflower
    • Feb 2023
    • 3

    Generate camera positions for Instant-NGP?

    Instant-NGP is an experimental software by Nvidia to generate so called NeRFs from a set of 2D images. In contrast to photogrammetry, this is not mesh based, and it is fun to play with. Asides from the images, the software needs camera positions. They are stored in a file transforms.json. Example:

    Code:
    {
      "camera_angle_x": 1.25466864999927,
      "camera_angle_y": 0.900494284520933,
      "fl_x": 1886.79279245434,
      "fl_y": 1886.79279245434,
      "k1": -6.281414521481763e-05,
      "k2": 0,
      "k3": 0,
      "k4": 0,
      "p1": 0,
      "p2": 0,
      "is_fisheye": false,
      "cx": 1368.0,
      "cy": 912.0,
      "w": 2736.0,
      "h": 1824.0,
      "aabb_scale": 16,
      "frames": [
        {
          "file_path": "./images/_DSC0344.png",
          "sharpness": 1724.0856494602224,
          "transform_matrix": [
            [
              -0.00028271292123410903,
              0.43251585105782214,
              0.90162628539701,
              -1.1552158600562916
            ],
            [
              0.999988773481783,
              0.004386977114543087,
              -0.0017909054113789376,
              -5.676470764927527
            ],
            [
              -0.004730008858073797,
              0.9016156569609916,
              -0.43251223566585667,
              2.089282683784027
            ],
            [
              0.0,
              0.0,
              0.0,
              1.0
            ]
          ]
        },
        {
          "file_path": "./images/_DSC0354.png",
    ?[...]
    Included with Instant-NGP are a bunch of scripts to extract these from output of photogrammetry software, such as colmap2nerf.py for Colmap. There is also a 3rd party script agi2nerf for Agisoft Metashape.

    Is there a way to get extract camera positions as above from the output of Zephyr Lite?
  • Andrea Alessi
    3Dflow Staff
    • Oct 2013
    • 1304

    #2
    Hi feklee,

    camera export is available only in the full version of 3DF Zephyr.

    Zephyr can export in many formats (including text internals.txt and externals.txt or an .xmp file for each camera) so converting them to another text format would be trivial. However, camera export as I mentioned is available only for the full version, so there is not possible to do (automatically, as you can still see the internals/externals from the UI) what you're looking for with the free or lite edition, sorry!

    Comment

    • feklee
      3Dflower
      • Feb 2023
      • 3

      #3
      Thanks for clarification! Good to know that there is the option to export cameras in text format. And, yes, I should be able to write a script to convert to JSON. However, the full version of 3DF Zephyr is way out of my budget. I am using Lite. At the moment I'm just exploring what is possible. I am particularly interested in scanning trees.

      Comment

      • Andrea Alessi
        3Dflow Staff
        • Oct 2013
        • 1304

        #4
        Feel free to ask for a trial anytime here in case you want to try it out

        Download now the free trial of photogrammetry software 3DF Zephyr Lite or submit a request for a free 14 days trial of Zephyr Pro or Zephyr Aerial!


        Just as note, projects created with the full can also be opened with the lite edition. So if this is compatible with your work, you can also consider subscribing for the needed months (even just for 1) to the full version, create the projects and you will still be able to open them with the lite edition (though you won't be able to export the cameras after you no longer have access to the full edition).

        Comment

        • feklee
          3Dflower
          • Feb 2023
          • 3

          #5
          That's good to know as an option, thanks!

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎