Skip to content

Commit

Permalink
Verbose
Browse files Browse the repository at this point in the history
- Start of moving all code into DDogleg
- Removed internal references
  • Loading branch information
lessthanoptimal committed Mar 8, 2025
1 parent 43e5cd7 commit 0083529
Show file tree
Hide file tree
Showing 68 changed files with 238 additions and 197 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ subprojects {

dependencies {
api("org.georegression:georegression:0.27.4") { exclude group: 'org.ddogleg' }
api("org.ddogleg:ddogleg:0.23.5")
api("org.ddogleg:ddogleg:0.23.6-SNAPSHOT")

api("net.sf.trove4j:trove4j:${project.trove4j_version}")

Expand Down
8 changes: 8 additions & 0 deletions change.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Version Meaning: <compatible>.<feature>.<bug fix>
- Second digit indicates if a new feature was added and/or if only a minor refactoring has been done
- Last digit always indicates a bug fix and other minor changes

---------------------
Date : 2025/XXX/YY
Version : 1.1.9

- VerboseUtils
* Moving verbose related utilities into DDogleg
* Deprecated functions in BoofCV

---------------------
Date : 2025/Mar/06
Version : 1.1.8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -33,6 +33,7 @@
import lombok.Getter;
import lombok.Setter;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
Expand Down Expand Up @@ -475,8 +476,8 @@ public void showHelpWindow() {
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
verbose = BoofMiscOps.addPrefix(this, out);
BoofMiscOps.verboseChildren(out, configuration, renderer);
verbose = VerboseUtils.addPrefix(this, out);
VerboseUtils.verboseChildren(out, configuration, renderer);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -19,7 +19,6 @@
package boofcv.alg.shapes.ellipse;

import boofcv.alg.filter.binary.ContourPacked;
import boofcv.misc.BoofMiscOps;
import boofcv.struct.distort.PixelTransform;
import boofcv.struct.image.GrayU8;
import boofcv.struct.image.ImageGray;
Expand All @@ -28,6 +27,7 @@
import georegression.struct.point.Point2D_I32;
import org.ddogleg.struct.DogArray;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.jetbrains.annotations.Nullable;

import java.io.PrintStream;
Expand Down Expand Up @@ -197,8 +197,8 @@ public List<EllipseRotated_F64> getFoundEllipses( @Nullable List<EllipseRotated_
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> config ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
BoofMiscOps.verboseChildren(out, config, ellipseDetector);
this.verbose = VerboseUtils.addPrefix(this, out);
VerboseUtils.verboseChildren(out, config, ellipseDetector);
}

@SuppressWarnings({"NullAway.Init"})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -24,7 +24,6 @@
import boofcv.alg.filter.binary.ContourOps;
import boofcv.alg.filter.binary.ContourPacked;
import boofcv.factory.filter.binary.FactoryBinaryContourFinder;
import boofcv.misc.BoofMiscOps;
import boofcv.struct.ConfigLength;
import boofcv.struct.ConnectRule;
import boofcv.struct.distort.PixelTransform;
Expand All @@ -42,6 +41,7 @@
import lombok.Setter;
import org.ddogleg.struct.DogArray;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.jetbrains.annotations.Nullable;

import java.io.PrintStream;
Expand Down Expand Up @@ -344,7 +344,7 @@ public List<Found> getFound() {
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}

@SuppressWarnings({"NullAway.Init"})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -22,12 +22,12 @@
import boofcv.factory.geo.ConfigBundleAdjustment;
import boofcv.factory.geo.ConfigTriangulation;
import boofcv.factory.geo.FactoryMultiView;
import boofcv.misc.BoofMiscOps;
import boofcv.misc.ConfigConverge;
import lombok.Getter;
import lombok.Setter;
import org.ddogleg.optimization.ConfigNonLinearLeastSquares;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.jetbrains.annotations.Nullable;

import java.io.PrintStream;
Expand Down Expand Up @@ -141,6 +141,6 @@ public void printCounts( PrintStream out ) {
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -38,6 +38,7 @@
import org.ddogleg.struct.DogArray_I32;
import org.ddogleg.struct.FastAccess;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.data.DMatrix3;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
Expand Down Expand Up @@ -361,7 +362,7 @@ private void printFoundMetric( List<ElevateViewInfo> views, MetricCameras metric
@Override public int getMinimumViews() {return selfCalib.getMinimumProjectives();}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
BoofMiscOps.verboseChildren(verbose, configuration, resolveSign, refiner);
this.verbose = VerboseUtils.addPrefix(this, out);
VerboseUtils.verboseChildren(verbose, configuration, resolveSign, refiner);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -30,6 +30,7 @@
import org.ddogleg.solver.PolynomialRoots;
import org.ddogleg.solver.RootFinderType;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.UtilEjml;
import org.ejml.data.Complex_F64;
import org.ejml.data.DMatrix2x2;
Expand Down Expand Up @@ -270,6 +271,6 @@ public Point2Transform3_F64 copyConcurrent() {
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
verbose = BoofMiscOps.addPrefix(this, out);
verbose = VerboseUtils.addPrefix(this, out);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -27,7 +27,6 @@
import boofcv.alg.geo.calibration.cameras.Zhang99Camera;
import boofcv.factory.geo.ConfigBundleAdjustment;
import boofcv.factory.geo.FactoryMultiView;
import boofcv.misc.BoofMiscOps;
import boofcv.misc.ConfigConverge;
import boofcv.struct.calib.CameraModel;
import boofcv.struct.calib.CameraPinholeBrown;
Expand All @@ -38,6 +37,7 @@
import lombok.Setter;
import org.ddogleg.optimization.ConfigNonLinearLeastSquares;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.data.DMatrixRMaj;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -357,7 +357,7 @@ public static int totalPoints( List<CalibrationObservation> observations ) {

@Override
public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -26,6 +26,7 @@
import lombok.Setter;
import org.ddogleg.struct.DogArray;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.UtilEjml;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
Expand Down Expand Up @@ -364,7 +365,7 @@ boolean solveForRemaining( List<AssociatedPair> points, Hypothesis hypo, Result
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}

/** Storage for internal parameters that define a hypothesis. See paper. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -31,6 +31,7 @@
import org.ddogleg.struct.DogArray_F64;
import org.ddogleg.struct.DogArray_I32;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
import org.ejml.dense.row.NormOps_DDRM;
Expand Down Expand Up @@ -304,7 +305,7 @@ protected void encodeQ( CameraState camera, double infx, double infy, double inf
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -19,7 +19,6 @@
package boofcv.alg.geo.selfcalib;

import boofcv.alg.geo.PerspectiveOps;
import boofcv.misc.BoofMiscOps;
import boofcv.misc.ConfigConverge;
import boofcv.struct.calib.CameraPinhole;
import boofcv.struct.geo.AssociatedPair;
Expand All @@ -36,6 +35,7 @@
import org.ddogleg.optimization.functions.FunctionNtoM;
import org.ddogleg.struct.DogArray_F64;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -169,7 +169,7 @@ public boolean refine( List<AssociatedPair> associatedPixels, DMatrixRMaj rotati
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -32,6 +32,7 @@
import georegression.transform.se.SePointOps_F64;
import org.ddogleg.struct.DogArray;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.jetbrains.annotations.Nullable;

import java.io.PrintStream;
Expand Down Expand Up @@ -223,6 +224,6 @@ public void process( List<AssociatedTriple> observations, MetricCameraTriple res
}

@Override public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -23,6 +23,7 @@
import boofcv.struct.geo.AssociatedPair;
import lombok.Getter;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
import org.ejml.dense.row.factory.DecompositionFactory_DDRM;
Expand Down Expand Up @@ -274,6 +275,6 @@ private double computeFitError() {

@Override
public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand All @@ -19,11 +19,11 @@
package boofcv.alg.geo.selfcalib;

import boofcv.alg.geo.MultiViewOps;
import boofcv.misc.BoofMiscOps;
import boofcv.struct.calib.CameraPinhole;
import georegression.struct.point.Vector3D_F64;
import org.ddogleg.struct.DogArray;
import org.ddogleg.struct.VerbosePrint;
import org.ddogleg.util.VerboseUtils;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -399,6 +399,6 @@ public boolean isLocalMinimum() {

@Override
public void setVerbose( @Nullable PrintStream out, @Nullable Set<String> configuration ) {
this.verbose = BoofMiscOps.addPrefix(this, out);
this.verbose = VerboseUtils.addPrefix(this, out);
}
}
Loading

0 comments on commit 0083529

Please sign in to comment.