Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
where
fc
is thefocal length
andcx = width/2
andcy 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:
private:
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.
`