Skip to content

Commit

Permalink
Run format
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Jan 10, 2024
1 parent 79e1a47 commit 9654cf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/mrcal_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ Java_org_photonvision_mrcal_MrCalJNI_undistort_1mrcal
(JNIEnv *, jclass, jlong srcMat, jlong dstMat, jlong camMat, jlong distCoeffs,
jint lensModelOrdinal, jint order, jint Nx, jint Ny, jint fov_x_deg)
{

return undistort_mrcal(
reinterpret_cast<cv::Mat *>(srcMat), reinterpret_cast<cv::Mat *>(dstMat),
reinterpret_cast<cv::Mat *>(camMat),
Expand Down
5 changes: 1 addition & 4 deletions src/mrcal_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ int homography_test() {
*std::max_element(stats.residuals.begin(), stats.residuals.end());

if (0) {

std::printf("\n===============================\n\n");
std::printf("RMS Reprojection Error: %.2f pixels\n", stats.rms_error);
std::printf("Worst residual (by measurement): %.1f pixels\n", max_error);
Expand All @@ -152,13 +151,11 @@ int homography_test() {
std::printf("\n");
}


return true;
}

int main() {
// for (int i = 0; i < 1e6; i++) {
homography_test();
homography_test();
// }

}
7 changes: 4 additions & 3 deletions src/mrcal_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ bool undistort_mrcal(const cv::Mat *src, cv::Mat *dst, const cv::Mat *cameraMat,
// Extra stuff for splined stereographic models
uint16_t order, uint16_t Nx, uint16_t Ny,
uint16_t fov_x_deg) {

mrcal_lensmodel_t mrcal_lensmodel;
switch (lensModel) {
case CameraLensModel::LENSMODEL_OPENCV5:
Expand All @@ -383,8 +382,10 @@ bool undistort_mrcal(const cv::Mat *src, cv::Mat *dst, const cv::Mat *cameraMat,
/* Maximum degree of each 1D polynomial. This is almost certainly 2 */
/* (quadratic splines, C1 continuous) or 3 (cubic splines, C2 continuous) */
mrcal_lensmodel.LENSMODEL_SPLINED_STEREOGRAPHIC__config.order = order;
/* The horizontal field of view. Not including fov_y. It's proportional with Ny and Nx */
mrcal_lensmodel.LENSMODEL_SPLINED_STEREOGRAPHIC__config.fov_x_deg = fov_x_deg;
/* The horizontal field of view. Not including fov_y. It's proportional with
* Ny and Nx */
mrcal_lensmodel.LENSMODEL_SPLINED_STEREOGRAPHIC__config.fov_x_deg =
fov_x_deg;
/* We have a Nx by Ny grid of control points */
mrcal_lensmodel.LENSMODEL_SPLINED_STEREOGRAPHIC__config.Nx = Nx;
mrcal_lensmodel.LENSMODEL_SPLINED_STEREOGRAPHIC__config.Ny = Ny;
Expand Down

0 comments on commit 9654cf4

Please sign in to comment.