Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

calibrate_camera is saving distortion coefficients improperly #5

Open
fovea1959 opened this issue Dec 1, 2022 · 0 comments
Open

calibrate_camera is saving distortion coefficients improperly #5

fovea1959 opened this issue Dec 1, 2022 · 0 comments

Comments

@fovea1959
Copy link
Contributor

The JSON being put out for distortion coefficients is not formatted correctly (missing commas):

  "dist": [[ 2.96051672e+01 -1.15858321e+04 -1.79874268e+00 -1.79700977e+00
  4.78984685e+05]]

Looks like some of the sample files have been corrected, but incorrectly; they were changed from a (1, 5) matrix to a (5, 0) matrix (caused by dropping the outer brackets).

Logitech Webcam file:

{
    "fx": 676.6192195641298,
    "fy": 676.8359339562655,
    "cx": 385.1137834870396,
    "cy": 201.81402152233636,
    "dist": [ 0.01632932, -0.36390723, -0.01638719,  0.02577886,  0.93133364]
  }

should be "dist": [[ 0.01632932, -0.36390723, -0.01638719, 0.02577886, 0.93133364]]

Suggest fixing calibrate_camera as:

        print('  "dist": {}'.format(dcoeffs.tolist()))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant