Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Help Setting Camera Intrinsics via --overrides .json file #681

Closed
Viv-G opened this issue Oct 22, 2019 · 3 comments
Closed

[question] Help Setting Camera Intrinsics via --overrides .json file #681

Viv-G opened this issue Oct 22, 2019 · 3 comments

Comments

@Viv-G
Copy link

Viv-G commented Oct 22, 2019

Describe the problem
As part of a project, I am capturing a raw image feed from a mobile phone from its CPU. This allows me to get an image, and it's intrinsic's on the mobile and transfer them to a server for post-processing. I call Meshroom from the command line via a script, which includes a setup.mg file and an --overrides .json file.

I write the --overrides .json file using Python which includes the camera intrinsics that I want to use.
An example is shown below of the output.

        "CameraInit_1": {
				"intrinsics": [
                    {
                        "intrinsicId": 2561805385,
                        "pxInitialFocalLength": -1.0,
                        "pxFocalLength": 1458.1,
                        "type": "radial3",
                        "width": 1080,
                        "height": 1920,
                        "serialNumber": "C:/Server/img",
                        "principalPoint": {
                            "x": 554.0,
                            "y": 908.7
                        },
                        "initializationMode": "estimated",
                        "distortionParams": [
                            0.0,
                            0.0,
                            0.0
                        ],
                        "locked": false
                    }
				],
                "defaultFieldOfView": 40.64392
        }
}

When I run Meshroom it fails at the camera_init node. I believe it is due to the intrinsics ID field not matching that of the images.

I have tried using

 "intrinsicId":-1
""intrinsicId": "",
"intrinsicId": ,

And also just leaving the intrinsicsId field out completely.

I run a keyFrame node before running cameraInit, and point the input from cameraInit to the output of the keyFrame node, but I had this error before that step as well...

Log

Program called with the following parameters:
 * allowSingleView = 1
 * defaultCameraModel = "" (default)
 * defaultFieldOfView = 40.6439
 * defaultFocalLengthPix = -1 (default)
 * defaultIntrinsic = "" (default)
 * groupCameraFallback =  Unknown Type "enum EGroupCameraFallback"
 * imageFolder = "" (default)
 * input = "F:/Viv/Documents/Uni/sem1_2019/FYP/MESHROOM_LIVESCAN/Work/12_15/s8/CameraInit/638e1f854b9c74628c6ec7c8ae4756a89127f105//viewpoints.sfm"
 * output = "F:/Viv/Documents/Uni/sem1_2019/FYP/MESHROOM_LIVESCAN/Work/12_15/s8/CameraInit/638e1f854b9c74628c6ec7c8ae4756a89127f105/cameraInit.sfm"
 * sensorDatabase = "C:\Server\Meshroom\aliceVision\share\aliceVision\cameraSensors.db"
 * verboseLevel = "debug"

Status

{
    "status": "ERROR",
    "execMode": "LOCAL",
    "nodeName": "CameraInit_1",
    "nodeType": "CameraInit",
    "packageName": "aliceVision",
    "packageVersion": null,
    "graph": "",
    "commandLine": "aliceVision_cameraInit  --sensorDatabase \"C:\\Server\\Meshroom\\aliceVision\\share\\aliceVision\\cameraSensors.db\" --defaultFieldOfView 40.64392 --groupCameraFallback folder --verboseLevel debug --output \"F:/Viv/Documents/Uni/sem1_2019/FYP/MESHROOM_LIVESCAN/Work/12_15/s8/CameraInit/638e1f854b9c74628c6ec7c8ae4756a89127f105/cameraInit.sfm\" --allowSingleView 1  --input \"F:/Viv/Documents/Uni/sem1_2019/FYP/MESHROOM_LIVESCAN/Work/12_15/s8/CameraInit/638e1f854b9c74628c6ec7c8ae4756a89127f105//viewpoints.sfm\"",
    "env": null,
    "startDateTime": "2019-10-22 12:16:04.411078",
    "endDateTime": "",
    "elapsedTime": 0,
    "hostname": "DESKTOP-SC42VCL",
    "sessionUid": "83e27c8a-f469-11e9-a3f8-480fcf4b9ddc",
    "returnCode": 3221226505,
    "elapsedTimeStr": "0:00:00"
}

Desktop (please complete the following and other pertinent information):

  • OS: Win 10
  • Python version 3.7.1
  • Qt/PySide version [e.g. 5.12.4]
  • Meshroom version: please specify if you are using a release version or your own build
    • Binary version 2019.2
@stale
Copy link

stale bot commented Feb 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale for issues that becomes stale (no solution) label Feb 19, 2020
@natowi natowi removed the stale for issues that becomes stale (no solution) label Feb 24, 2020
@natowi
Copy link
Member

natowi commented May 26, 2020

See #683 (comment)

@natowi natowi closed this as completed Jun 21, 2020
@dimitrisPs
Copy link

dimitrisPs commented Nov 3, 2022

To use meshroom_batch with pre-computed calibration parameters you need to specify the --input flag to point to a .json file containing both your intrinsics and views, instead of the folder containing your images.

The .json file needs to be in the same format as the cameraInit.sfm, generated from the CamerInit node inside the MeshroomCache directory when you are running Meshroom GUI. You can still tweak parameters for the rest of your pipeline using the --overrides flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants