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

Updating distortion model description #139

Merged
merged 14 commits into from
Jan 12, 2024

Conversation

banisadr
Copy link
Contributor

@banisadr banisadr commented Jan 2, 2024

Public-Facing Changes

Updates description for distortion used in doc generation. Added details on expected parameters, underlying model, and reference implementation used. Currently this page is lacking that information.

internal/schemas.ts Outdated Show resolved Hide resolved
banisadr and others added 3 commits January 2, 2024 14:38
Co-authored-by: John Hurliman <jhurliman@jhurliman.org>
Copy link
Contributor

@snosenzo snosenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text looks good, thanks for updating this!

@@ -1,7 +1,7 @@
// -*- jsonc -*-
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seemed to auto-update when I ran yarn update-generated-files. I'll change it back.

package.json Outdated
@@ -42,7 +42,7 @@
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.1",
"eslint-plugin-prettier": "4.2.1",
"jest": "29.4.3",
"jest": "^29.7.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this also necessary for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as other comment, seemed to auto update on yarn update-generated-files. Will revert.

@@ -693,7 +693,7 @@ const CameraCalibration: FoxgloveMessageSchema = {
name: "distortion_model",
type: { type: "primitive", name: "string" },
description:
"Name of distortion model\n\nSupported values: `plumb_bob` and `rational_polynomial`",
"Name of distortion model\n\nFoxglove supports `plumb_bob` (k1, k2, p1, p2, k3) and `rational_polynomial` (k1, k2, p1, p2, k3, k4, k5, k6) distortion based on [OpenCV's implementation](https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html) of the [Brown-Conrady pinhole camera model](https://en.wikipedia.org/wiki/Distortion_%28optics%29#Software_correction). This is the same [implementation used by ROS](http://docs.ros.org/en/diamondback/api/image_geometry/html/c++/pinhole__camera__model_8cpp_source.html)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd drop the reference to Brown-Conrady – I don't see that anywhere in OpenCV? In fact I believe OpenCV may have come up with their own implementation for certain things – don't quite remember where I learned that so I can't cite a source, maybe Brown–Conrady is accurate.

Also nit: I don't think we say "Foxglove supports…" in other places, we just say "supported values":

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the language to use "Supported values..." language.

Hmm interesting point w/ the model. Its a gripe of mine that they don't reference it well anywhere as far as I can tell. I know the "plumb bob" model is in fact a sub-set of the brown-conrady model but poking around it looks like you're right the rational polynomial is a deviation from it that the internet seems confused on exactly who to reference on it... I'll remove the reference and let people look at the sources.

For the ROS link, I intentionally pointed to that particular model because I believe its the one we implement. The updated one you're pointing at is what we should support when have time because it has the equidistant model as well for fisheye.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though none of this matters if I can never get the build system and auto-gen files to be happy lol

yarn.lock Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this change and your build should pass

@banisadr banisadr enabled auto-merge (squash) January 12, 2024 20:56
@banisadr banisadr merged commit b46d178 into main Jan 12, 2024
10 checks passed
@banisadr banisadr deleted the bahram/camera-calibration-description branch January 12, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants