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

Feature camera class #22

Merged
merged 6 commits into from
Oct 29, 2023
Merged

Feature camera class #22

merged 6 commits into from
Oct 29, 2023

Conversation

kalwalt
Copy link
Member

@kalwalt kalwalt commented Oct 27, 2023

WebARKitCamera class

As mentioned in issue #21 i will implement a basic Camera class because it is necessary for the PnP computation retrieve the camera Matrix and the distortion coefficients.
For now it will calculate the camera matrix based on the width and height inputs of the camera (see setupCamera ) . This follow the OpenCV convention a matrix 3x3:

//camera matrix
[[fc, 0.0, cx],
 [0.0, fc, cy],
 [0.0, 0.0, 1.0]]

where fc is the focal length and cx = width/2 and cy height/2.
Read for more in this opencv tutorial.
The class also create distorion coefficients, 6 values, but we left to zeros.

I have implemented these member methods:
public:

  • setupCamera()
  • printCameraSettings()
  • getCameraData()
  • getDistortionCoefficients()
  • getFocalLength()

private:

  • setFocalLength()

In the future i will implement other methods: to load a calibration file and other utilities. I want to develop only the minimum for now: as said before, we neeed a camera matrix to compute the pose matrix with the PnP algorithm.
Tests are provided in the tests/webarkit_test.cpp file.
`

@kalwalt kalwalt added enhancement New feature or request C/C++ code concerning the C/C++ code design and improvements labels Oct 27, 2023
@kalwalt kalwalt self-assigned this Oct 27, 2023
@kalwalt kalwalt changed the base branch from master to dev October 27, 2023 21:53
@kalwalt kalwalt merged commit be9c775 into dev Oct 29, 2023
1 check passed
@kalwalt kalwalt mentioned this pull request Oct 29, 2023
5 tasks
@kalwalt kalwalt deleted the feature-camera-class branch June 6, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C/C++ code concerning the C/C++ code design and improvements enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant