Skip to content

Conversation

@cal-pratt
Copy link
Contributor

In this PR I'm adding a way to backup the results of the camera calibration between separate runs of the topside application. In creating this feature I decided to model the code after the motion power profile code. This code was going to be very similar so it made sense to make the profile controller a generic class. You can now save any object you want to disk by creating a ValueStore<V> instance.

This really helped clean up the camera calibration code. Instead of tracking if an object was created in the current runtime, just check the ValueStore<CameraCalibrationValue> instance to see if there was a successful calibration. This removes the need to copy the valid camera calibration images to a separate folder, as the last calibration value can be grabbed without re-running the calibration code.

Translating the value object into the JavaCV Mat and Size objects is performed as a method in the new CameraCalibrationValue kotlin data class. Might add a ctor which also accepts Mat values to keep all of the Mat to CameraCalibrationValue logic isolated to the same file.

@cal-pratt cal-pratt merged commit 6b3d998 into master Jun 6, 2017
@cal-pratt cal-pratt deleted the camera-cali-value-store branch June 6, 2017 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants