diff --git a/.idea/copyright/boofcv.xml b/.idea/copyright/boofcv.xml index 646dd48362..9974c737c4 100644 --- a/.idea/copyright/boofcv.xml +++ b/.idea/copyright/boofcv.xml @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/README.md b/README.md index 3360aefb2d..327c4cb3c2 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ BoofCV is on [Maven Central](http://search.maven.org/) and can be easily added t For Gradle projects: ``` dependencies { - api(group: 'org.boofcv', name: 'boofcv-core', version: '1.1.7') + api(group: 'org.boofcv', name: 'boofcv-core', version: '1.1.8') } ``` diff --git a/build.gradle b/build.gradle index adf79b8ffb..c9c3a1efeb 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ allprojects { apply plugin: 'com.peterabeles.gversion' group = 'org.boofcv' - version = '1.1.8-SNAPSHOT' + version = '1.1.9-SNAPSHOT' createVersionFile.enabled = false // run only once. enabled in types } @@ -132,8 +132,8 @@ subprojects { } dependencies { - api("org.georegression:georegression:0.27.3") { exclude group: 'org.ddogleg' } - api("org.ddogleg:ddogleg:0.23.4") + api("org.georegression:georegression:0.27.4") { exclude group: 'org.ddogleg' } + api("org.ddogleg:ddogleg:0.23.6-SNAPSHOT") api("net.sf.trove4j:trove4j:${project.trove4j_version}") diff --git a/change.txt b/change.txt index ca2254522c..759f9b77a6 100644 --- a/change.txt +++ b/change.txt @@ -6,6 +6,23 @@ Version Meaning: .. - 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 + +- PackedArray + * Added isEquals() + * Fixed bug where set(index, point) overwrite the value of `point` + * Added implementation specific variants of set( index , ... ) + --------------------- Date : 2024/Oct/05 Version : 1.1.7 diff --git a/integration/boofcv-android/examples/fragment/app/build.gradle b/integration/boofcv-android/examples/fragment/app/build.gradle index b9ac9ca369..436d03cf29 100644 --- a/integration/boofcv-android/examples/fragment/app/build.gradle +++ b/integration/boofcv-android/examples/fragment/app/build.gradle @@ -56,7 +56,7 @@ configurations { dependencies { ['boofcv-android', 'boofcv-core'].each { - String a -> implementation group: 'org.boofcv', name: a, version: '1.1.7' + String a -> implementation group: 'org.boofcv', name: a, version: '1.1.8' } def fragment_version = "2.5.3" diff --git a/integration/boofcv-android/examples/video/app/build.gradle b/integration/boofcv-android/examples/video/app/build.gradle index ac5e42abd8..bd095dbb8a 100644 --- a/integration/boofcv-android/examples/video/app/build.gradle +++ b/integration/boofcv-android/examples/video/app/build.gradle @@ -40,7 +40,7 @@ configurations { dependencies { ['boofcv-android', 'boofcv-core'].each { - String a -> api group: 'org.boofcv', name: a, version: '1.1.7' } + String a -> api group: 'org.boofcv', name: a, version: '1.1.8' } annotationProcessor 'org.projectlombok:lombok:1.18.16' diff --git a/integration/boofcv-kotlin/build.gradle b/integration/boofcv-kotlin/build.gradle index e8fd366ebd..aa8744e62e 100644 --- a/integration/boofcv-kotlin/build.gradle +++ b/integration/boofcv-kotlin/build.gradle @@ -1,12 +1,12 @@ plugins { - id 'org.jetbrains.kotlin.jvm' version '1.6.10' + id 'org.jetbrains.kotlin.jvm' version '1.7.22' } configurations.all { resolutionStrategy { force "org.jetbrains:annotations:$project.jetnull_version" - force "org.jetbrains.kotlin:kotlin-stdlib:1.6.10" - force "org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10" + force "org.jetbrains.kotlin:kotlin-stdlib:1.7.22" + force "org.jetbrains.kotlin:kotlin-stdlib-common:1.7.22" } } diff --git a/integration/boofcv-swing/src/main/java/boofcv/gui/mesh/MeshViewerPanel.java b/integration/boofcv-swing/src/main/java/boofcv/gui/mesh/MeshViewerPanel.java index bea83e8e25..1a90903559 100644 --- a/integration/boofcv-swing/src/main/java/boofcv/gui/mesh/MeshViewerPanel.java +++ b/integration/boofcv-swing/src/main/java/boofcv/gui/mesh/MeshViewerPanel.java @@ -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). * @@ -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.*; @@ -475,8 +476,8 @@ public void showHelpWindow() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, renderer); + verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, renderer); } /** diff --git a/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java b/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java index 5c5dcdf59a..70ba6fd63d 100644 --- a/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java +++ b/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java @@ -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). * @@ -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; @@ -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; @@ -197,8 +197,8 @@ public List getFoundEllipses( @Nullable List 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"}) diff --git a/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java b/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java index f8a2722196..c06161cd9b 100644 --- a/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java +++ b/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java @@ -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). * @@ -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; @@ -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; @@ -344,7 +344,7 @@ public List getFound() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } @SuppressWarnings({"NullAway.Init"}) diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_B.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_B.java index ea76cce88a..85c0f33cdf 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_B.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_B.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.DogArray_I32; /** @@ -99,6 +100,10 @@ public PackedTupleArray_B( int dof ) { } } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquals(((PackedTupleArray_B)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_F64.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_F64.java index c0aa438b0e..7608208b35 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_F64.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_F64.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.DogArray_F64; /** @@ -95,6 +96,10 @@ public PackedTupleArray_F64( int dof ) { } } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquals(((PackedTupleArray_F64)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_S8.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_S8.java index 1104446b7c..828a438a29 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_S8.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_S8.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.DogArray_I8; /** @@ -95,6 +96,10 @@ public PackedTupleArray_S8( int dof ) { } } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquals(((PackedTupleArray_S8)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_U8.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_U8.java index 1f6a6c82c9..33432f619c 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_U8.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleArray_U8.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.DogArray_I8; /** @@ -95,6 +96,10 @@ public PackedTupleArray_U8( int dof ) { } } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquals(((PackedTupleArray_U8)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_B.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_B.java index d277d61c4f..32756a84b1 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_B.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_B.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.BigDogArray_I32; import org.ddogleg.struct.BigDogGrowth; @@ -100,6 +101,10 @@ public PackedTupleBigArray_B( int dof ) { }); } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquivalent(((PackedTupleBigArray_B)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_F64.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_F64.java index be1c3442a5..bb972b7c51 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_F64.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_F64.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.BigDogArray_F64; import org.ddogleg.struct.BigDogGrowth; @@ -96,6 +97,10 @@ public PackedTupleBigArray_F64( int dof ) { }); } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquivalent(((PackedTupleBigArray_F64)other).array, 0.0); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_S8.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_S8.java index 8bd26e69b8..a158ae4c41 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_S8.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_S8.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.BigDogArray_I8; import org.ddogleg.struct.BigDogGrowth; @@ -96,6 +97,10 @@ public PackedTupleBigArray_S8( int dof ) { }); } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquivalent(((PackedTupleBigArray_S8)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_U8.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_U8.java index 5fa20d5aac..3f0c625110 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_U8.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/PackedTupleBigArray_U8.java @@ -19,6 +19,7 @@ package boofcv.struct.feature; import boofcv.misc.BoofLambdas; +import boofcv.struct.PackedArray; import org.ddogleg.struct.BigDogArray_I8; import org.ddogleg.struct.BigDogGrowth; @@ -96,6 +97,10 @@ public PackedTupleBigArray_U8( int dof ) { }); } + @Override public boolean isEquals( PackedArray other ) { + return array.isEquivalent(((PackedTupleBigArray_U8)other).array); + } + @Override public int getDOF() { return dof; } diff --git a/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/MetricBundleAdjustmentUtils.java b/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/MetricBundleAdjustmentUtils.java index 69c7351b0b..ee73ecc5f0 100644 --- a/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/MetricBundleAdjustmentUtils.java +++ b/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/MetricBundleAdjustmentUtils.java @@ -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). * @@ -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; @@ -141,6 +141,6 @@ public void printCounts( PrintStream out ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-geo/src/main/java/boofcv/abst/geo/selfcalib/ProjectiveToMetricCameraDualQuadratic.java b/main/boofcv-geo/src/main/java/boofcv/abst/geo/selfcalib/ProjectiveToMetricCameraDualQuadratic.java index 6297ec8b21..d22f0b687b 100644 --- a/main/boofcv-geo/src/main/java/boofcv/abst/geo/selfcalib/ProjectiveToMetricCameraDualQuadratic.java +++ b/main/boofcv-geo/src/main/java/boofcv/abst/geo/selfcalib/ProjectiveToMetricCameraDualQuadratic.java @@ -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). * @@ -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; @@ -361,7 +362,7 @@ private void printFoundMetric( List views, MetricCameras metric @Override public int getMinimumViews() {return selfCalib.getMinimumProjectives();} @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set 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); } } diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/distort/kanbra/KannalaBrandtPtoS_F64.java b/main/boofcv-geo/src/main/java/boofcv/alg/distort/kanbra/KannalaBrandtPtoS_F64.java index c5b0b09618..e4d37da62f 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/distort/kanbra/KannalaBrandtPtoS_F64.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/distort/kanbra/KannalaBrandtPtoS_F64.java @@ -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). * @@ -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; @@ -270,6 +271,6 @@ public Point2Transform3_F64 copyConcurrent() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - verbose = BoofMiscOps.addPrefix(this, out); + verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java index 80bb6e6b12..01d96c20d7 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/calibration/CalibrationPlanarGridZhang99.java @@ -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). * @@ -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; @@ -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; @@ -357,7 +357,7 @@ public static int totalPoints( List observations ) { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyRadial6Pts.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyRadial6Pts.java index e7a8519014..8d019d2f3a 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyRadial6Pts.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyRadial6Pts.java @@ -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). * @@ -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; @@ -364,7 +365,7 @@ boolean solveForRemaining( List points, Hypothesis hypo, Result } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** Storage for internal parameters that define a hypothesis. See paper. */ diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineDualQuadraticAlgebraicError.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineDualQuadraticAlgebraicError.java index c334b4c642..c87f5eab58 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineDualQuadraticAlgebraicError.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineDualQuadraticAlgebraicError.java @@ -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). * @@ -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; @@ -304,7 +305,7 @@ protected void encodeQ( CameraState camera, double infx, double infy, double inf } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineTwoViewPinholeRotation.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineTwoViewPinholeRotation.java index 32a9abd7c4..612ce81f71 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineTwoViewPinholeRotation.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/RefineTwoViewPinholeRotation.java @@ -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). * @@ -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; @@ -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; @@ -169,7 +169,7 @@ public boolean refine( List associatedPixels, DMatrixRMaj rotati } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/ResolveSignAmbiguityPositiveDepth.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/ResolveSignAmbiguityPositiveDepth.java index b7dc67d4e4..6b7b2e8401 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/ResolveSignAmbiguityPositiveDepth.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/ResolveSignAmbiguityPositiveDepth.java @@ -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). * @@ -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; @@ -223,6 +224,6 @@ public void process( List observations, MetricCameraTriple res } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationEssentialGuessAndCheck.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationEssentialGuessAndCheck.java index 20aa5ecd71..f2b6337771 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationEssentialGuessAndCheck.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationEssentialGuessAndCheck.java @@ -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). * @@ -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; @@ -274,6 +275,6 @@ private double computeFitError() { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationPraticalGuessAndCheckFocus.java b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationPraticalGuessAndCheckFocus.java index 35ebfe6a35..ddb901015e 100644 --- a/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationPraticalGuessAndCheckFocus.java +++ b/main/boofcv-geo/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationPraticalGuessAndCheckFocus.java @@ -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). * @@ -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; @@ -399,6 +399,6 @@ public boolean isLocalMinimum() { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-io/src/main/java/boofcv/visualize/RenderMesh.java b/main/boofcv-io/src/main/java/boofcv/visualize/RenderMesh.java index 6ba22643f4..9f05000cdb 100644 --- a/main/boofcv-io/src/main/java/boofcv/visualize/RenderMesh.java +++ b/main/boofcv-io/src/main/java/boofcv/visualize/RenderMesh.java @@ -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). * @@ -49,6 +49,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.FastAccess; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -448,7 +449,7 @@ int interpolateTextureRgb( float px, float py ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - verbose = BoofMiscOps.addPrefix(this, out); + verbose = VerboseUtils.addPrefix(this, out); } @FunctionalInterface diff --git a/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineDisparityErrors.java b/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineDisparityErrors.java index cb51f97292..446643510e 100644 --- a/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineDisparityErrors.java +++ b/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineDisparityErrors.java @@ -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). * @@ -19,7 +19,6 @@ package boofcv.alg.mvs; import boofcv.alg.geo.rectify.DisparityParameters; -import boofcv.misc.BoofMiscOps; import boofcv.struct.calib.CameraPinhole; import boofcv.struct.distort.PixelTransform; import boofcv.struct.image.GrayF32; @@ -30,6 +29,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_F32; 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.ops.DConvertMatrixStruct; @@ -261,7 +261,7 @@ boolean computeFused( GrayF32 inverseDepthImage ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** All the information for a disparity image */ diff --git a/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineStereoIndependent.java b/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineStereoIndependent.java index f06888a1aa..416d7fbc88 100644 --- a/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineStereoIndependent.java +++ b/main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/MultiBaselineStereoIndependent.java @@ -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). * @@ -30,7 +30,6 @@ import boofcv.alg.geo.rectify.DisparityParameters; import boofcv.alg.misc.ImageMiscOps; import boofcv.misc.BoofLambdas; -import boofcv.misc.BoofMiscOps; import boofcv.misc.LookUpImages; import boofcv.struct.border.BorderType; import boofcv.struct.calib.CameraPinholeBrown; @@ -40,6 +39,7 @@ import lombok.Setter; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.jetbrains.annotations.Nullable; @@ -332,8 +332,8 @@ private void filterDisparity( Image left, GrayF32 disparity, DisparityParameters } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, performFusion, disparitySmoother); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, performFusion, disparitySmoother); this.verboseProfiling = null; if (configuration != null && configuration.contains(BoofVerbose.RUNTIME)) { diff --git a/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/AztecCodePreciseDetector.java b/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/AztecCodePreciseDetector.java index 7cd3e8e783..6f2c5a2af4 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/AztecCodePreciseDetector.java +++ b/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/AztecCodePreciseDetector.java @@ -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). * @@ -24,12 +24,12 @@ import boofcv.alg.fiducial.aztec.AztecFinderPatternDetector; import boofcv.alg.fiducial.aztec.AztecPyramid; import boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine; -import boofcv.misc.BoofMiscOps; import boofcv.struct.image.GrayU8; import boofcv.struct.image.ImageGray; import lombok.Getter; import org.ddogleg.struct.DogArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -109,7 +109,7 @@ public AztecCodePreciseDetector( InputToBinary inputToBinary, @Override public Class getImageType() {return imageType;} @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, decoder, detectorPyramids); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, decoder, detectorPyramids); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/MicroQrCodePreciseDetector.java b/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/MicroQrCodePreciseDetector.java index 57290bbc8d..2e7826e28d 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/MicroQrCodePreciseDetector.java +++ b/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/MicroQrCodePreciseDetector.java @@ -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). * @@ -18,7 +18,6 @@ package boofcv.abst.fiducial; -import boofcv.BoofVerbose; import boofcv.abst.filter.binary.BinaryContourHelper; import boofcv.abst.filter.binary.InputToBinary; import boofcv.alg.distort.LensDistortionNarrowFOV; @@ -28,12 +27,12 @@ import boofcv.alg.fiducial.qrcode.QrCodePositionPatternDetector; import boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine; import boofcv.alg.shapes.polygon.DetectPolygonFromContour; -import boofcv.misc.BoofMiscOps; import boofcv.misc.MovingAverage; import boofcv.struct.image.GrayU8; import boofcv.struct.image.ImageGray; import lombok.Getter; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -142,11 +141,11 @@ public Class getImageType() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - BoofMiscOps.verboseChildren(out, configuration, decoder, detectPositionPatterns); + VerboseUtils.verboseChildren(out, configuration, decoder, detectPositionPatterns); if (configuration == null) return; - if (configuration.contains(BoofVerbose.RUNTIME)) - this.profiler = BoofMiscOps.addPrefix(this, out); + if (configuration.contains(VerboseUtils.RUNTIME)) + this.profiler = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/abst/scene/ann/FeatureSceneRecognitionNearestNeighbor.java b/main/boofcv-recognition/src/main/java/boofcv/abst/scene/ann/FeatureSceneRecognitionNearestNeighbor.java index 709e519fe1..97d4ede285 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/abst/scene/ann/FeatureSceneRecognitionNearestNeighbor.java +++ b/main/boofcv-recognition/src/main/java/boofcv/abst/scene/ann/FeatureSceneRecognitionNearestNeighbor.java @@ -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). * @@ -25,7 +25,6 @@ import boofcv.factory.feature.associate.FactoryAssociation; import boofcv.factory.struct.FactoryTupleDesc; import boofcv.misc.BoofLambdas; -import boofcv.misc.BoofMiscOps; import boofcv.struct.PackedArray; import boofcv.struct.feature.TupleDesc; import boofcv.struct.kmeans.FactoryTupleCluster; @@ -37,6 +36,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.Factory; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -246,6 +246,6 @@ public void setDictionary( List dictionary ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set config ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/abst/scene/nister2006/FeatureSceneRecognitionNister2006.java b/main/boofcv-recognition/src/main/java/boofcv/abst/scene/nister2006/FeatureSceneRecognitionNister2006.java index 55f73e7646..3ca633a523 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/abst/scene/nister2006/FeatureSceneRecognitionNister2006.java +++ b/main/boofcv-recognition/src/main/java/boofcv/abst/scene/nister2006/FeatureSceneRecognitionNister2006.java @@ -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). * @@ -27,7 +27,6 @@ import boofcv.alg.scene.vocabtree.LearnHierarchicalTree; import boofcv.factory.struct.FactoryTupleDesc; import boofcv.misc.BoofLambdas; -import boofcv.misc.BoofMiscOps; import boofcv.struct.PackedArray; import boofcv.struct.feature.TupleDesc; import boofcv.struct.kmeans.FactoryTupleCluster; @@ -37,6 +36,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.Factory; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -140,7 +140,7 @@ public void setDatabase( RecognitionVocabularyTreeNister2006 db ) { () -> FactoryTupleDesc.createPackedBig(tupleDOF, tupleType), factoryKMeans, config.randSeed); learnTree.minimumPointsForChildren.setTo(config.learningMinimumPointsForChildren); if (verbose != null) - BoofMiscOps.verboseChildren(verbose, null, learnTree); + VerboseUtils.verboseChildren(verbose, null, learnTree); learnTree.process(packedFeatures, tree); long time2 = System.currentTimeMillis(); @@ -314,6 +314,6 @@ protected int traverseUpGetID( int id, int maxHops ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set set ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoder.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoder.java index 03a5efef5f..088a9b1fe3 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoder.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoder.java @@ -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). * @@ -23,6 +23,7 @@ import boofcv.misc.BoofMiscOps; import lombok.Getter; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -306,6 +307,6 @@ boolean handleByte( int value ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set set ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoderImage.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoderImage.java index a58a4c08f9..4cdc7229a6 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoderImage.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecDecoderImage.java @@ -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). * @@ -33,6 +33,7 @@ import georegression.struct.point.Point2D_I16; import lombok.Getter; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -382,7 +383,7 @@ void readMessageDataFromImage( AztecCode marker ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, decodeMessage); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, decodeMessage); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecEncoderAutomatic.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecEncoderAutomatic.java index 3a65a935bf..79d9a0fc78 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecEncoderAutomatic.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecEncoderAutomatic.java @@ -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). * @@ -19,9 +19,9 @@ package boofcv.alg.fiducial.aztec; import boofcv.alg.fiducial.aztec.AztecCode.Mode; -import boofcv.misc.BoofMiscOps; import org.ddogleg.struct.DogArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -393,7 +393,7 @@ boolean isDigit( int c ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecFinderPatternDetector.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecFinderPatternDetector.java index 8cedf468f0..7d685ce3f2 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecFinderPatternDetector.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/aztec/AztecFinderPatternDetector.java @@ -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). * @@ -24,7 +24,6 @@ import boofcv.alg.fiducial.qrcode.SquareLocatorPatternDetectorBase; import boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine; import boofcv.alg.shapes.polygon.DetectPolygonFromContour; -import boofcv.misc.BoofMiscOps; import boofcv.struct.image.ImageGray; import georegression.struct.point.Point2D_F64; import georegression.struct.shapes.Polygon2D_F64; @@ -33,6 +32,7 @@ import org.ddogleg.nn.NearestNeighbor; import org.ddogleg.nn.NnData; import org.ddogleg.struct.DogArray; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -257,7 +257,7 @@ int computeLayerDiameter( Polygon2D_F64 polygon, float threshold ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set set ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java index f718bb76b3..5c86e7147a 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java @@ -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). * @@ -32,6 +32,7 @@ import org.ddogleg.struct.DogArray_B; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -913,7 +914,7 @@ private void growCluster( List corners, int seedIdx, Chessboar @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } public static class SearchResults { diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterToGrid.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterToGrid.java index e139f46fce..1352bc765c 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterToGrid.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterToGrid.java @@ -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). * @@ -19,7 +19,6 @@ package boofcv.alg.fiducial.calib.chess; import boofcv.alg.fiducial.calib.chess.ChessboardCornerGraph.Node; -import boofcv.misc.BoofMiscOps; import georegression.metric.UtilAngle; import georegression.struct.shapes.Rectangle2D_I32; import lombok.Getter; @@ -28,6 +27,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_B; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -686,7 +686,7 @@ public void rotateCCW( GridInfo grid ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - verbose = BoofMiscOps.addPrefix(this, out); + verbose = VerboseUtils.addPrefix(this, out); } @SuppressWarnings({"NullAway.Init"}) diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/ecocheck/ECoCheckDetector.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/ecocheck/ECoCheckDetector.java index 4684ef28b0..f807a27e5a 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/ecocheck/ECoCheckDetector.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/ecocheck/ECoCheckDetector.java @@ -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). * @@ -18,7 +18,6 @@ package boofcv.alg.fiducial.calib.ecocheck; -import boofcv.BoofVerbose; import boofcv.abst.fiducial.calib.ConfigChessboardX; import boofcv.alg.feature.detect.chess.ChessboardCorner; import boofcv.alg.feature.detect.chess.DetectChessboardCornersXPyramid; @@ -42,6 +41,7 @@ import georegression.struct.point.Point2D_F64; import lombok.Getter; import org.ddogleg.struct.*; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -729,13 +729,13 @@ public ImageType getImageType() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, clusterFinder, clusterToGrid); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, clusterFinder, clusterToGrid); if (configuration == null) return; - runtimeProfiling = configuration.contains(BoofVerbose.RUNTIME); + runtimeProfiling = configuration.contains(VerboseUtils.RUNTIME); } /** diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderBits.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderBits.java index 09d5de505c..45c8bf2a50 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderBits.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderBits.java @@ -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). * @@ -22,11 +22,11 @@ import boofcv.alg.fiducial.qrcode.QrCode; import boofcv.alg.fiducial.qrcode.QrCodeCodecBitsUtils; import boofcv.alg.fiducial.qrcode.ReedSolomonCodes_U8; -import boofcv.misc.BoofMiscOps; import lombok.Getter; import lombok.Setter; import org.ddogleg.struct.DogArray_I8; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -297,7 +297,7 @@ private int decodeKanji( MicroQrCode qr, PackedBits8 data, int bitLocation ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, utils); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, utils); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderImage.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderImage.java index 30ffa6e835..c5eb5f5367 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderImage.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeDecoderImage.java @@ -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). * @@ -20,7 +20,6 @@ import boofcv.alg.distort.LensDistortionNarrowFOV; import boofcv.alg.fiducial.qrcode.*; -import boofcv.misc.BoofMiscOps; import boofcv.struct.image.ImageGray; import georegression.geometry.UtilPolygons2D_F64; import georegression.struct.point.Point2D_I32; @@ -29,6 +28,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_F32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -314,7 +314,7 @@ public void setLensDistortion( int width, int height, @Nullable LensDistortionNa } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, decoder); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, decoder); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeEncoder.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeEncoder.java index 2d8ded76e7..ea9e3c01ca 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeEncoder.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/microqr/MicroQrCodeEncoder.java @@ -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). * @@ -22,12 +22,12 @@ import boofcv.alg.fiducial.qrcode.QrCode; import boofcv.alg.fiducial.qrcode.QrCodeCodecBitsUtils; import boofcv.alg.fiducial.qrcode.ReedSolomonCodes_U8; -import boofcv.misc.BoofMiscOps; import georegression.struct.point.Point2D_I32; import lombok.Getter; import lombok.Setter; import org.ddogleg.struct.DogArray_I8; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.BMatrixRMaj; import org.jetbrains.annotations.Nullable; @@ -542,6 +542,6 @@ public int sizeInBits( MessageSegment segment, int version ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeCodecBitsUtils.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeCodecBitsUtils.java index 2ff2c09afb..328bc4a9d7 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeCodecBitsUtils.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeCodecBitsUtils.java @@ -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). * @@ -18,9 +18,9 @@ package boofcv.alg.fiducial.qrcode; -import boofcv.misc.BoofMiscOps; import org.ddogleg.struct.DogArray_I8; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -539,7 +539,7 @@ public static void addAutomatic( Charset byteCharacterSet, } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } @SuppressWarnings({"NullAway.Init"}) diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java index 1688c5135f..6f33a8bdfe 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderBits.java @@ -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). * @@ -18,11 +18,11 @@ package boofcv.alg.fiducial.qrcode; -import boofcv.misc.BoofMiscOps; import lombok.Getter; import lombok.Setter; import org.ddogleg.struct.DogArray_I8; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -367,7 +367,7 @@ int decodeEci( PackedBits8 data, int bitLocation ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, utils); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, utils); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java index b652117a91..baafb656b5 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java @@ -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). * @@ -21,7 +21,6 @@ import boofcv.alg.fiducial.calib.squares.SquareGraph; import boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine; import boofcv.alg.shapes.polygon.DetectPolygonFromContour; -import boofcv.misc.BoofMiscOps; import boofcv.struct.image.ImageGray; import georegression.geometry.UtilLine2D_F64; import georegression.geometry.UtilPoint2D_F64; @@ -30,6 +29,7 @@ import georegression.struct.shapes.Polygon2D_F64; import lombok.Getter; import org.ddogleg.struct.DogArray; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -214,6 +214,6 @@ static boolean positionSquareIntensityCheck( float[] values, float threshold ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternGraphGenerator.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternGraphGenerator.java index 3991f72277..6e225f3212 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternGraphGenerator.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternGraphGenerator.java @@ -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). * @@ -20,7 +20,6 @@ import boofcv.alg.fiducial.calib.squares.SquareGraph; import boofcv.alg.fiducial.calib.squares.SquareNode; -import boofcv.misc.BoofMiscOps; import georegression.struct.line.LineSegment2D_F64; import georegression.struct.point.Point2D_F64; import lombok.Getter; @@ -30,6 +29,7 @@ import org.ddogleg.nn.NnData; import org.ddogleg.struct.DogArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -171,6 +171,6 @@ void considerConnect( SquareNode node0, SquareNode node1 ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - verbose = BoofMiscOps.addPrefix(this, out); + verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/SquareLocatorPatternDetectorBase.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/SquareLocatorPatternDetectorBase.java index c3ad334f27..9519e91927 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/SquareLocatorPatternDetectorBase.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/SquareLocatorPatternDetectorBase.java @@ -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). * @@ -24,7 +24,6 @@ import boofcv.alg.interpolate.InterpolatePixelS; import boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine; import boofcv.factory.interpolate.FactoryInterpolation; -import boofcv.misc.BoofMiscOps; import boofcv.misc.MovingAverage; import boofcv.struct.ConfigLength; import boofcv.struct.border.BorderType; @@ -37,6 +36,7 @@ import lombok.Getter; import lombok.Setter; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -142,6 +142,6 @@ protected void configureContourDetector( T gray ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java index 7bd81f8355..694ddec7be 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java @@ -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). * @@ -35,7 +35,6 @@ import boofcv.factory.geo.EpipolarError; import boofcv.factory.geo.FactoryMultiView; import boofcv.factory.interpolate.FactoryInterpolation; -import boofcv.misc.BoofMiscOps; import boofcv.struct.ConfigLength; import boofcv.struct.border.BorderType; import boofcv.struct.distort.*; @@ -53,6 +52,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.ops.DConvertMatrixStruct; @@ -447,7 +447,7 @@ public DogArray getFound() { protected abstract boolean processSquare( GrayF32 square, Result result, double edgeInside, double edgeOutside ); @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - verbose = BoofMiscOps.addPrefix(this, out); + verbose = VerboseUtils.addPrefix(this, out); } public GrayU8 getBinary() { diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/scene/vocabtree/LearnHierarchicalTree.java b/main/boofcv-recognition/src/main/java/boofcv/alg/scene/vocabtree/LearnHierarchicalTree.java index 55230b8f11..375df048f8 100644 --- a/main/boofcv-recognition/src/main/java/boofcv/alg/scene/vocabtree/LearnHierarchicalTree.java +++ b/main/boofcv-recognition/src/main/java/boofcv/alg/scene/vocabtree/LearnHierarchicalTree.java @@ -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). * @@ -28,6 +28,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.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -198,6 +199,6 @@ private void processChildren( HierarchicalVocabularyTree tree, } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set set ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-recognition/src/test/java/boofcv/alg/scene/vocabtree/TestHierarchicalVocabularyTree.java b/main/boofcv-recognition/src/test/java/boofcv/alg/scene/vocabtree/TestHierarchicalVocabularyTree.java index 3bd1f40694..931c6f7ade 100644 --- a/main/boofcv-recognition/src/test/java/boofcv/alg/scene/vocabtree/TestHierarchicalVocabularyTree.java +++ b/main/boofcv-recognition/src/test/java/boofcv/alg/scene/vocabtree/TestHierarchicalVocabularyTree.java @@ -145,6 +145,7 @@ public static class Packed2D implements PackedArray { @Override public void append( Point2D_F64 element ) {list.add(element.copy());} @Override public void set(int index, Point2D_F64 element) {} @Override public void forIdx( int idx0, int idx1, BoofLambdas.ProcessIndex op ) {} + @Override public boolean isEquals(PackedArray other) {return false;} @Override public Point2D_F64 getTemp( int index ) {return list.get(index);} @Override public void getCopy( int index, Point2D_F64 dst ) {dst.setTo(list.get(index));} @Override public void copy( Point2D_F64 src, Point2D_F64 dst ) {dst.setTo(src);} diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesSceneRecognition.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesSceneRecognition.java index 73a5443825..e21e4d805e 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesSceneRecognition.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesSceneRecognition.java @@ -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). * @@ -24,7 +24,6 @@ import boofcv.abst.scene.SceneRecognition; import boofcv.alg.structure.LookUpSimilarImages; import boofcv.misc.BoofLambdas; -import boofcv.misc.BoofMiscOps; import boofcv.struct.PackedArray; import boofcv.struct.feature.AssociatedIndex; import boofcv.struct.feature.TupleDesc; @@ -40,6 +39,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastAccess; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -378,8 +378,8 @@ private FeatureSceneRecognition.Features createFeaturesLambda( int imageInde } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set options ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, options, recognizer); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, options, recognizer); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesTrackThenMatch.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesTrackThenMatch.java index a231d3ba85..2d4cd86fa7 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesTrackThenMatch.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/similar/SimilarImagesTrackThenMatch.java @@ -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). * @@ -24,7 +24,6 @@ import boofcv.abst.scene.SceneRecognition; import boofcv.abst.tracker.PointTrack; import boofcv.misc.BoofLambdas; -import boofcv.misc.BoofMiscOps; import boofcv.struct.PackedArray; import boofcv.struct.feature.AssociatedIndex; import boofcv.struct.feature.TupleDesc; @@ -36,6 +35,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastAccess; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -424,7 +424,7 @@ private int frameToIndex( String id ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set options ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, options, recognizer); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, options, recognizer); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/GeneratePairwiseImageGraph.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/GeneratePairwiseImageGraph.java index 004d68401a..448047cd2f 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/GeneratePairwiseImageGraph.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/GeneratePairwiseImageGraph.java @@ -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). * @@ -18,7 +18,6 @@ package boofcv.alg.structure; -import boofcv.misc.BoofMiscOps; import boofcv.struct.calib.CameraPinholeBrown; import boofcv.struct.feature.AssociatedIndex; import boofcv.struct.geo.AssociatedPair; @@ -27,6 +26,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.jetbrains.annotations.Nullable; @@ -185,7 +185,7 @@ protected void createEdge( LookUpCameraInfo dbCams, @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, epipolarScore); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, epipolarScore); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonMetric.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonMetric.java index 706ccb1dfe..d85f3f36ac 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonMetric.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonMetric.java @@ -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). * @@ -33,6 +33,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -342,8 +343,8 @@ public View getPairwiseGraphViewByStructureIndex( int index ) { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, pixelToMetric3); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, pixelToMetric3); } public SceneStructureMetric getStructure() { diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonProjective.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonProjective.java index 9910014f7c..2fc6badd6b 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonProjective.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/InitializeCommonProjective.java @@ -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). * @@ -39,6 +39,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.ejml.dense.row.MatrixFeatures_DDRM; import org.jetbrains.annotations.Nullable; @@ -550,6 +551,6 @@ public View getPairwiseGraphViewByStructureIndex( int index ) { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricFromUncalibratedPairwiseGraph.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricFromUncalibratedPairwiseGraph.java index 772a21612f..325e40adf2 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricFromUncalibratedPairwiseGraph.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricFromUncalibratedPairwiseGraph.java @@ -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). * @@ -25,6 +25,7 @@ import lombok.Setter; import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -546,8 +547,8 @@ public ViewScenes getView( PairwiseImageGraph.View view ) { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, spawnScene, expandMetric, refineWorking, mergeOps, mergeScenes); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricMergeScenes.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricMergeScenes.java index ed455f0e35..2d47332b1d 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricMergeScenes.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricMergeScenes.java @@ -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). * @@ -26,6 +26,7 @@ import org.ddogleg.struct.DogArray_B; import org.ddogleg.struct.FastArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -418,8 +419,8 @@ static void findCommonViews( SceneWorkingGraph src, SceneWorkingGraph dst, } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, checks, refiner); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, checks, refiner); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricSanityChecks.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricSanityChecks.java index 09784b9287..5a5d06db9d 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricSanityChecks.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/MetricSanityChecks.java @@ -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). * @@ -36,6 +36,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_B; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -294,6 +295,6 @@ public boolean checkPhysicalConstraints( SceneStructureMetric structure, } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ReconstructionFromPairwiseGraph.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ReconstructionFromPairwiseGraph.java index d0bb4e53f7..e8026a8af8 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ReconstructionFromPairwiseGraph.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ReconstructionFromPairwiseGraph.java @@ -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). * @@ -26,6 +26,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -356,7 +357,7 @@ protected SeedInfo scoreSeedAndSelectSet( View target, int maxMotions, SeedInfo @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricGraphSubset.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricGraphSubset.java index 2925ef89e6..68991c5c2b 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricGraphSubset.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricGraphSubset.java @@ -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). * @@ -25,6 +25,7 @@ import lombok.Getter; import org.ddogleg.struct.DogArray_B; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -266,7 +267,7 @@ protected void markKnownParameters( MetricBundleAdjustmentUtils utils ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, refiner); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, refiner); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricWorkingGraph.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricWorkingGraph.java index 45d3907dc3..5abd3d9592 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricWorkingGraph.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/RefineMetricWorkingGraph.java @@ -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). * @@ -40,6 +40,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -548,8 +549,8 @@ protected boolean refineViews( SceneWorkingGraph graph ) { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, metricSba); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, metricSba); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ResolveSceneScaleAmbiguity.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ResolveSceneScaleAmbiguity.java index fe8e1c7c85..612e38c8e6 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ResolveSceneScaleAmbiguity.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ResolveSceneScaleAmbiguity.java @@ -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). * @@ -28,6 +28,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_F64; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -328,7 +329,7 @@ boolean triangulate( SceneInfo scene, int featureIdx ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/SceneMergingOperations.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/SceneMergingOperations.java index d404bef1b7..6e221f24f2 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/SceneMergingOperations.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/SceneMergingOperations.java @@ -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). * @@ -32,6 +32,7 @@ import org.ddogleg.struct.DogArray_B; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -642,8 +643,8 @@ private int countCommonViews( SceneWorkingGraph sceneA, SceneWorkingGraph sceneB } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, resolveScale, refineSubset); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, resolveScale, refineSubset); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ThreeViewEstimateMetricScene.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ThreeViewEstimateMetricScene.java index 4f76660f28..afe4334b9e 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ThreeViewEstimateMetricScene.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/ThreeViewEstimateMetricScene.java @@ -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). * @@ -43,6 +43,7 @@ import org.ddogleg.optimization.ConfigNonLinearLeastSquares; import org.ddogleg.struct.DogArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.ejml.dense.row.CommonOps_DDRM; import org.jetbrains.annotations.Nullable; @@ -481,6 +482,6 @@ private static void flipAround( SceneStructureMetric structure, SceneObservation @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewKnownCalibration.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewKnownCalibration.java index 9d895d971b..be60b4ea7a 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewKnownCalibration.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewKnownCalibration.java @@ -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). * @@ -25,7 +25,6 @@ import boofcv.alg.structure.SceneWorkingGraph; import boofcv.alg.structure.expand.EstimateViewUtils.RemoveResults; import boofcv.factory.geo.*; -import boofcv.misc.BoofMiscOps; import boofcv.struct.ConfigLength; import boofcv.struct.calib.CameraPinhole; import boofcv.struct.geo.AssociatedTriple; @@ -36,6 +35,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -283,7 +283,7 @@ private boolean checkEnoughRemainingInliers() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, estimateUtils.checks, estimateUtils.metricSba); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, estimateUtils.checks, estimateUtils.metricSba); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewSelfCalibrate.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewSelfCalibrate.java index b746fc5f0f..48f989dd2e 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewSelfCalibrate.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/EstimateViewSelfCalibrate.java @@ -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). * @@ -24,12 +24,12 @@ import boofcv.alg.geo.selfcalib.TwoViewToCalibratingHomography; import boofcv.alg.structure.PairwiseGraphUtils; import boofcv.alg.structure.SceneWorkingGraph; -import boofcv.misc.BoofMiscOps; import boofcv.struct.geo.AssociatedPair; import boofcv.struct.geo.AssociatedTriple; import georegression.struct.se.Se3_F64; import org.ddogleg.struct.DogArray; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.jetbrains.annotations.Nullable; @@ -242,7 +242,7 @@ boolean removedBadFeatures() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, estimateUtils.checks); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, estimateUtils.checks); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/ExpandByOneView.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/ExpandByOneView.java index 448d8ea8c9..e9abc28e11 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/ExpandByOneView.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/ExpandByOneView.java @@ -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). * @@ -26,6 +26,7 @@ import lombok.Getter; import lombok.Setter; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -133,6 +134,6 @@ void createListOfValid( PairwiseImageGraph.View target, List configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/MetricExpandByOneView.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/MetricExpandByOneView.java index 7b7e127efe..d55fab7476 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/MetricExpandByOneView.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/expand/MetricExpandByOneView.java @@ -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). * @@ -23,6 +23,7 @@ import boofcv.misc.BoofMiscOps; import georegression.struct.se.Se3_F64; import org.ddogleg.struct.DogArray_I32; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -257,6 +258,6 @@ public void reset() { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { super.setVerbose(out, configuration); - BoofMiscOps.verboseChildren(verbose, configuration, expandCalibrated, expandUnknown); + VerboseUtils.verboseChildren(verbose, configuration, expandCalibrated, expandUnknown); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalHomographyCompatibility.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalHomographyCompatibility.java index ce242ff38a..be3ddf8827 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalHomographyCompatibility.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalHomographyCompatibility.java @@ -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). * @@ -22,7 +22,6 @@ import boofcv.alg.geo.robust.DistanceFundamentalGeometric; import boofcv.alg.geo.robust.GenerateHomographyLinear; import boofcv.alg.structure.EpipolarScore3D; -import boofcv.misc.BoofMiscOps; import boofcv.struct.ConfigLength; import boofcv.struct.calib.CameraPinholeBrown; import boofcv.struct.geo.AssociatedPair; @@ -34,6 +33,7 @@ import lombok.Setter; import org.ddogleg.fitting.modelset.ModelMatcher; import org.ddogleg.struct.DogArray_I32; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.jetbrains.annotations.Nullable; @@ -213,6 +213,6 @@ private int countFitModel( DMatrixRMaj fundamental ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set param ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalVsRotation.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalVsRotation.java index 50147b5c8c..24b40985ec 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalVsRotation.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreFundamentalVsRotation.java @@ -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). * @@ -34,6 +34,7 @@ import lombok.Setter; import org.ddogleg.fitting.modelset.ModelMatcher; import org.ddogleg.struct.DogArray_I32; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.ejml.dense.row.CommonOps_DDRM; import org.jetbrains.annotations.Nullable; @@ -309,7 +310,7 @@ private void selectBestModel( List pairs, DogArray_I32 inliersId } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, fitRotation); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, fitRotation); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreRatioFundamentalHomography.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreRatioFundamentalHomography.java index 4a5b9bfb7d..b39493eca4 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreRatioFundamentalHomography.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/score3d/ScoreRatioFundamentalHomography.java @@ -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). * @@ -19,7 +19,6 @@ package boofcv.alg.structure.score3d; import boofcv.alg.structure.EpipolarScore3D; -import boofcv.misc.BoofMiscOps; import boofcv.struct.ConfigLength; import boofcv.struct.calib.CameraPinholeBrown; import boofcv.struct.geo.AssociatedPair; @@ -28,6 +27,7 @@ import lombok.Setter; import org.ddogleg.fitting.modelset.ModelMatcher; import org.ddogleg.struct.DogArray_I32; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.ejml.ops.DConvertMatrixStruct; import org.jetbrains.annotations.Nullable; @@ -152,7 +152,7 @@ protected ScoreRatioFundamentalHomography() {} } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set options ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); } /** diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/spawn/MetricSpawnSceneFromView.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/spawn/MetricSpawnSceneFromView.java index 816999c65c..6886927ebe 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/spawn/MetricSpawnSceneFromView.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/structure/spawn/MetricSpawnSceneFromView.java @@ -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). * @@ -27,6 +27,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastAccess; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -246,7 +247,7 @@ void saveMetricSeed( PairwiseImageGraph graph, List viewIds, } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, initialize, checks); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, initialize, checks); } } diff --git a/main/boofcv-reconstruction/src/main/java/boofcv/alg/video/SelectFramesForReconstruction3D.java b/main/boofcv-reconstruction/src/main/java/boofcv/alg/video/SelectFramesForReconstruction3D.java index 97ae43999d..a2e88583f2 100644 --- a/main/boofcv-reconstruction/src/main/java/boofcv/alg/video/SelectFramesForReconstruction3D.java +++ b/main/boofcv-reconstruction/src/main/java/boofcv/alg/video/SelectFramesForReconstruction3D.java @@ -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). * @@ -39,6 +39,7 @@ import lombok.Setter; import org.ddogleg.sorting.QuickSelect; import org.ddogleg.struct.*; +import org.ddogleg.util.VerboseUtils; import org.ejml.data.DMatrixRMaj; import org.jetbrains.annotations.Nullable; @@ -391,8 +392,8 @@ protected double computeFrameRelativeMotion() { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, scorer); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, scorer); } /** Storage for feature and track information for a single image frame */ diff --git a/main/boofcv-sfm/src/main/java/boofcv/alg/mvs/MultiViewStereoFromKnownSceneStructure.java b/main/boofcv-sfm/src/main/java/boofcv/alg/mvs/MultiViewStereoFromKnownSceneStructure.java index 9cdf20a6c9..9b984abf17 100644 --- a/main/boofcv-sfm/src/main/java/boofcv/alg/mvs/MultiViewStereoFromKnownSceneStructure.java +++ b/main/boofcv-sfm/src/main/java/boofcv/alg/mvs/MultiViewStereoFromKnownSceneStructure.java @@ -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). * @@ -44,6 +44,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -505,8 +506,8 @@ public void setImageLookUp( LookUpImages imageLookUp ) { } @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(out, configuration, computeFused); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(out, configuration, computeFused); } /** Information on each view that's used to select and compute the disparity images */ diff --git a/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomBundlePnPBase.java b/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomBundlePnPBase.java index 330a9aaf7e..63eb197dd3 100644 --- a/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomBundlePnPBase.java +++ b/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomBundlePnPBase.java @@ -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). * @@ -18,7 +18,6 @@ package boofcv.alg.sfm.d3; -import boofcv.BoofVerbose; import boofcv.abst.geo.TriangulateNViewsMetric; import boofcv.abst.tracker.PointTrack; import boofcv.abst.tracker.PointTracker; @@ -29,7 +28,6 @@ import boofcv.alg.sfm.d3.structure.VisOdomBundleAdjustment.BObservation; import boofcv.alg.sfm.d3.structure.VisOdomBundleAdjustment.BTrack; import boofcv.alg.sfm.d3.structure.VisOdomKeyFrameManager; -import boofcv.misc.BoofMiscOps; import boofcv.struct.distort.Point2Transform2_F64; import georegression.struct.point.Point2D_F64; import georegression.struct.point.Point3D_F64; @@ -41,6 +39,7 @@ import org.ddogleg.struct.DogArray; import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -326,14 +325,14 @@ void dropBadBundleTracks() { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); + this.verbose = VerboseUtils.addPrefix(this, out); this.profileOut = null; if (configuration == null) { return; } - if (configuration.contains(BoofVerbose.RUNTIME)) { + if (configuration.contains(VerboseUtils.RUNTIME)) { this.profileOut = verbose; } } diff --git a/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomStereoQuadPnP.java b/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomStereoQuadPnP.java index c32cd89cd4..610367b2f5 100644 --- a/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomStereoQuadPnP.java +++ b/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomStereoQuadPnP.java @@ -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). * @@ -31,7 +31,6 @@ import boofcv.factory.distort.LensDistortionFactory; import boofcv.factory.geo.ConfigTriangulation; import boofcv.factory.geo.FactoryMultiView; -import boofcv.misc.BoofMiscOps; import boofcv.misc.ConfigConverge; import boofcv.struct.calib.StereoParameters; import boofcv.struct.distort.Point2Transform2_F64; @@ -51,6 +50,7 @@ import org.ddogleg.struct.DogArray_I32; import org.ddogleg.struct.FastAccess; import org.ddogleg.struct.VerbosePrint; +import org.ddogleg.util.VerboseUtils; import org.jetbrains.annotations.Nullable; import java.io.PrintStream; @@ -746,8 +746,8 @@ public void reset() { @Override public void setVerbose( @Nullable PrintStream out, @Nullable Set configuration ) { - this.verbose = BoofMiscOps.addPrefix(this, out); - BoofMiscOps.verboseChildren(verbose, configuration, bundle); + this.verbose = VerboseUtils.addPrefix(this, out); + VerboseUtils.verboseChildren(verbose, configuration, bundle); this.profileOut = null; if (configuration == null) { diff --git a/main/boofcv-types/src/main/java/boofcv/BoofVerbose.java b/main/boofcv-types/src/main/java/boofcv/BoofVerbose.java index 9821a55c05..2cb29285a7 100644 --- a/main/boofcv-types/src/main/java/boofcv/BoofVerbose.java +++ b/main/boofcv-types/src/main/java/boofcv/BoofVerbose.java @@ -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). * @@ -23,6 +23,7 @@ * * @author Peter Abeles */ +@Deprecated public final class BoofVerbose { /** * Pass along these arguments to all fields that support verbose printing too diff --git a/main/boofcv-types/src/main/java/boofcv/misc/BoofMiscOps.java b/main/boofcv-types/src/main/java/boofcv/misc/BoofMiscOps.java index a93546cf6f..23dd2e54b0 100644 --- a/main/boofcv-types/src/main/java/boofcv/misc/BoofMiscOps.java +++ b/main/boofcv-types/src/main/java/boofcv/misc/BoofMiscOps.java @@ -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). * @@ -936,6 +936,7 @@ public static C copyConfig( C src ) { /** * Function which handles boilerplate for support recursive verbose print */ + @Deprecated public static void verboseChildren( @Nullable PrintStream out, @Nullable Set configuration, @Nullable VerbosePrint... children ) { // See how many tabs have already been added @@ -980,10 +981,12 @@ public static String toStringLine( List list ) { return out + "}"; } + @Deprecated public static @Nullable PrintStream addPrefix( VerbosePrint owner, @Nullable PrintStream out ) { return addPrefix(owner, 1, out); } + @Deprecated public static @Nullable PrintStream addPrefix( VerbosePrint owner, int numIndents, @Nullable PrintStream out ) { if (out == null || out instanceof PrintStreamInjectIndent) return out; @@ -998,6 +1001,7 @@ public static String toStringLine( List list ) { /** * Assumes names are camel case and that the capital letters are important. Same for numbers */ + @Deprecated public static String nameToShort( String name, int length ) { String text = ""; for (int i = 0; i < name.length() && text.length() < length; i++) { diff --git a/main/boofcv-types/src/main/java/boofcv/misc/PrintStreamInjectIndent.java b/main/boofcv-types/src/main/java/boofcv/misc/PrintStreamInjectIndent.java index 874644f504..576c63eac7 100644 --- a/main/boofcv-types/src/main/java/boofcv/misc/PrintStreamInjectIndent.java +++ b/main/boofcv-types/src/main/java/boofcv/misc/PrintStreamInjectIndent.java @@ -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). * @@ -27,6 +27,7 @@ * * @author Peter Abeles */ +@Deprecated public class PrintStreamInjectIndent extends PrintStream { public PrintStreamInjectIndent( String prefix, int numIndent, PrintStream out ) { super(new Injector(out, prefix, numIndent*2)); diff --git a/main/boofcv-types/src/main/java/boofcv/struct/PackedArray.java b/main/boofcv-types/src/main/java/boofcv/struct/PackedArray.java index 1e25ae0c2f..1d059d529d 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/PackedArray.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/PackedArray.java @@ -62,4 +62,7 @@ public interface PackedArray extends LArrayAccessor { * @param op The operation to process each element */ void forIdx( int idx0, int idx1, BoofLambdas.ProcessIndex op ); + + /** Checks to see if the two data structures are equal */ + boolean isEquals( PackedArray other ); } diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_F64.java index cee34d9fe9..231844ac44 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_F64.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_F64.java @@ -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). * @@ -19,36 +19,19 @@ package boofcv.struct.packed; import boofcv.misc.BoofLambdas; -import boofcv.struct.PackedArray; import georegression.struct.point.Point2D_F64; -import lombok.Getter; -import org.ddogleg.struct.DogArray_F64; /** * Packed array of {@link Point2D_F64}. Internally the point is stored in an interleaved format. * * @author Peter Abeles */ -public class PackedArrayPoint2D_F64 implements PackedArray { - private static final int DOF = 2; - - /** Stores tuple in a single continuous array */ - @Getter private final DogArray_F64 array; - +public class PackedArrayPoint2D_F64 extends PackedArray_F64 { // tuple that the result is temporarily written to private final Point2D_F64 temp = new Point2D_F64(); public PackedArrayPoint2D_F64() { - array = new DogArray_F64(); - array.resize(0); - } - - @Override public void reset() { - array.reset(); - } - - @Override public void reserve( int numTuples ) { - array.reserve(numTuples*2); + super(2, 0); } public final void append( double x, double y ) { @@ -56,6 +39,12 @@ public final void append( double x, double y ) { array.add(y); } + public void set( int index, double x, double y ) { + index *= 2; + array.data[index++] = x; + array.data[index] = y; + } + @Override public void append( Point2D_F64 element ) { append(element.x, element.y); } @@ -82,10 +71,6 @@ public final void append( double x, double y ) { dst.setTo(src); } - @Override public int size() { - return array.size/2; - } - @Override public Class getElementType() { return Point2D_F64.class; } diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I16.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I16.java index 774d368675..1b75d875a0 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I16.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I16.java @@ -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). * @@ -56,6 +56,12 @@ public final void append( int x, int y ) { array.add(y); } + public void set( int index, int x, int y ) { + index *= 2; + array.data[index++] = (short)x; + array.data[index] = (short)y; + } + @Override public void append( Point2D_I16 element ) { append(element.x, element.y); } @@ -103,6 +109,10 @@ public final void append( int x, int y ) { } } + @Override public boolean isEquals( PackedArray o ) { + return this.array.isEquals(((PackedArrayPoint2D_I16)o).array); + } + /** * Makes this array have a value identical to 'src' * diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I32.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I32.java index 057e650db9..f9798f52aa 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I32.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint2D_I32.java @@ -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). * @@ -56,6 +56,12 @@ public final void append( int x, int y ) { array.add(y); } + public void set( int index, int x, int y ) { + index *= 2; + array.data[index++] = x; + array.data[index] = y; + } + @Override public void append( Point2D_I32 element ) { append(element.x, element.y); } @@ -103,6 +109,10 @@ public final void append( int x, int y ) { } } + @Override public boolean isEquals( PackedArray o ) { + return this.array.isEquals(((PackedArrayPoint2D_I32)o).array); + } + /** * Makes this array have a value identical to 'src' * diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint3D_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint3D_F64.java index f93cb29125..373ac42c12 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint3D_F64.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint3D_F64.java @@ -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). * @@ -19,36 +19,19 @@ package boofcv.struct.packed; import boofcv.misc.BoofLambdas; -import boofcv.struct.PackedArray; import georegression.struct.point.Point3D_F64; -import lombok.Getter; -import org.ddogleg.struct.DogArray_F64; /** * Packed array of {@link Point3D_F64}. Internally the point is stored in an interleaved format. * * @author Peter Abeles */ -public class PackedArrayPoint3D_F64 implements PackedArray { - private static final int DOF = 3; - - /** Stores tuple in a single continuous array */ - @Getter private final DogArray_F64 array; - +public class PackedArrayPoint3D_F64 extends PackedArray_F64 { // tuple that the result is temporarily written to private final Point3D_F64 temp = new Point3D_F64(); public PackedArrayPoint3D_F64() { - array = new DogArray_F64(); - array.resize(0); - } - - @Override public void reset() { - array.reset(); - } - - @Override public void reserve( int numTuples ) { - array.reserve(numTuples*2); + super(3, 0); } @Override public void append( Point3D_F64 element ) { @@ -63,6 +46,13 @@ public void append( double x, double y, double z) { array.add(z); } + public void set( int index, double x, double y, double z ) { + index *= 3; + array.data[index++] = x; + array.data[index++] = y; + array.data[index] = z; + } + @Override public void set( int index, Point3D_F64 element ) { index *= 3; array.data[index++] = element.x; @@ -90,10 +80,6 @@ public void append( double x, double y, double z) { dst.setTo(src); } - @Override public int size() { - return array.size/3; - } - @Override public Class getElementType() { return Point3D_F64.class; } diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint4D_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint4D_F64.java index ae2b6ba61c..24f39bbb38 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint4D_F64.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArrayPoint4D_F64.java @@ -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). * @@ -19,28 +19,19 @@ package boofcv.struct.packed; import boofcv.misc.BoofLambdas; -import boofcv.struct.PackedArray; import georegression.struct.point.Point4D_F64; -import lombok.Getter; -import org.ddogleg.struct.DogArray_F64; /** * Packed array of {@link Point4D_F64}. Internally the point is stored in an interleaved format. * * @author Peter Abeles */ -public class PackedArrayPoint4D_F64 implements PackedArray { - private static final int DOF = 4; - - /** Stores tuple in a single continuous array */ - @Getter private final DogArray_F64 array; - +public class PackedArrayPoint4D_F64 extends PackedArray_F64 { // tuple that the result is temporarily written to private final Point4D_F64 temp = new Point4D_F64(); public PackedArrayPoint4D_F64() { - array = new DogArray_F64(); - array.resize(0); + super(4, 0); } @Override public void reset() { @@ -65,6 +56,14 @@ public void append( double x, double y, double z, double w ) { array.add(w); } + public void set( int index, double x, double y, double z, double w ) { + index *= 4; + array.data[index++] = x; + array.data[index++] = y; + array.data[index++] = z; + array.data[index] = w; + } + @Override public void set( int index, Point4D_F64 element ) { index *= 4; array.data[index++] = element.x; @@ -95,10 +94,6 @@ public void append( double x, double y, double z, double w ) { dst.setTo(src); } - @Override public int size() { - return array.size/4; - } - @Override public Class getElementType() { return Point4D_F64.class; } diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArray_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArray_F64.java new file mode 100644 index 0000000000..9cf2423070 --- /dev/null +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedArray_F64.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2024, Peter Abeles. All Rights Reserved. + * + * This file is part of BoofCV (http://boofcv.org). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package boofcv.struct.packed; + +import boofcv.struct.PackedArray; +import lombok.Getter; +import org.ddogleg.struct.DogArray_F64; + +public abstract class PackedArray_F64 implements PackedArray { + /** Degrees of freedom */ + protected final int DOF; + + /** Stores tuple in a single continuous array */ + @Getter protected final DogArray_F64 array; + + public PackedArray_F64( int DOF, int length ) { + this.DOF = DOF; + this.array = new DogArray_F64(length); + } + + @Override public void reset() { + array.reset(); + } + + @Override public void reserve( int numTuples ) { + array.reserve(numTuples*DOF); + } + + @Override public int size() { + return array.size/DOF; + } + + @Override public boolean isEquals( PackedArray b ) {return array.isEquals(((PackedArray_F64)b).array);} + + /** True if the two arrays are equal to within the specified tolerance */ + public boolean isEquals( PackedArray b, double tol ) {return array.isEquals(((PackedArray_F64)b).array, tol);} +} diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint2D_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint2D_F64.java index de6cf7f48f..8c85f3b436 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint2D_F64.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint2D_F64.java @@ -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). * @@ -19,10 +19,7 @@ package boofcv.struct.packed; import boofcv.misc.BoofLambdas; -import boofcv.struct.PackedArray; import georegression.struct.point.Point2D_F64; -import lombok.Getter; -import org.ddogleg.struct.BigDogArray_F64; import org.ddogleg.struct.BigDogGrowth; /** @@ -30,12 +27,7 @@ * * @author Peter Abeles */ -public class PackedBigArrayPoint2D_F64 implements PackedArray { - private static final int DOF = 2; - - /** Storage for the raw data in an array */ - @Getter private final BigDogArray_F64 array; - +public class PackedBigArrayPoint2D_F64 extends PackedBigArray_F64 { // tuple that the result is temporarily written to private final Point2D_F64 temp = new Point2D_F64(); @@ -59,7 +51,7 @@ public PackedBigArrayPoint2D_F64( int reservedPoints ) { * @param growth Growth strategy to use */ public PackedBigArrayPoint2D_F64( int reservedPoints, int blockSize, BigDogGrowth growth ) { - array = new BigDogArray_F64(reservedPoints*DOF, blockSize*DOF, growth); + super(2, reservedPoints, blockSize, growth); } /** @@ -75,19 +67,19 @@ public PackedBigArrayPoint2D_F64 setTo( PackedBigArrayPoint2D_F64 src ) { return this; } - @Override public void reset() { - array.reset(); - } - - @Override public void reserve( int numPoints ) { - array.reserve(numPoints*DOF); - } - public void append( double x, double y ) { array.add(x); array.add(y); } + public void set( int index, double x, double y ) { + index *= DOF; + double[] block = array.getBlocks().get(index/array.getBlockSize()); + int where = index%array.getBlockSize(); + block[where] = x; + block[where + 1] = y; + } + @Override public void append( Point2D_F64 element ) { array.add(element.x); array.add(element.y); @@ -97,8 +89,8 @@ public void append( double x, double y ) { index *= DOF; double[] block = array.getBlocks().get(index/array.getBlockSize()); int where = index%array.getBlockSize(); - element.x = block[where]; - element.y = block[where + 1]; + block[where] = element.x; + block[where + 1] = element.y; } @Override public Point2D_F64 getTemp( int index ) { @@ -123,14 +115,6 @@ public void append( double x, double y ) { dst.setTo(src); } - @Override public int size() { - return array.size/2; - } - - @Override public Class getElementType() { - return Point2D_F64.class; - } - @Override public void forIdx( int idx0, int idx1, BoofLambdas.ProcessIndex op ) { array.processByBlock(idx0*DOF, idx1*DOF, ( array, arrayIdx0, arrayIdx1, offset ) -> { int pointIndex = idx0 + offset/DOF; @@ -143,4 +127,8 @@ public void append( double x, double y ) { } }); } + + @Override public Class getElementType() { + return Point2D_F64.class; + } } diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint3D_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint3D_F64.java index b6a2326220..8dd27882a4 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint3D_F64.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint3D_F64.java @@ -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). * @@ -19,11 +19,8 @@ package boofcv.struct.packed; import boofcv.misc.BoofLambdas; -import boofcv.struct.PackedArray; import georegression.struct.GeoTuple3D_F64; import georegression.struct.point.Point3D_F64; -import lombok.Getter; -import org.ddogleg.struct.BigDogArray_F64; import org.ddogleg.struct.BigDogGrowth; import java.util.Collection; @@ -33,15 +30,10 @@ * * @author Peter Abeles */ -public class PackedBigArrayPoint3D_F64 implements PackedArray { - private static final int DOF = 3; - +public class PackedBigArrayPoint3D_F64 extends PackedBigArray_F64 { // tuple that the result is temporarily written to private final Point3D_F64 temp = new Point3D_F64(); - /** Storage for the raw data in an array */ - @Getter private final BigDogArray_F64 array; - /** * Constructor where the default is used for all parameters. */ @@ -64,7 +56,7 @@ public PackedBigArrayPoint3D_F64( int reservedPoints ) { * @param growth Growth strategy to use */ public PackedBigArrayPoint3D_F64( int reservedPoints, int blockSize, BigDogGrowth growth ) { - array = new BigDogArray_F64(reservedPoints*DOF, blockSize*DOF, growth); + super(3, reservedPoints, blockSize, growth); } /** @@ -80,14 +72,6 @@ public PackedBigArrayPoint3D_F64 setTo( PackedBigArrayPoint3D_F64 src ) { return this; } - @Override public void reset() { - array.reset(); - } - - @Override public void reserve( int numPoints ) { - array.reserve(numPoints*DOF); - } - public void append( double x, double y, double z ) { array.add(x); array.add(y); @@ -98,13 +82,22 @@ public void append( GeoTuple3D_F64 element ) { append(element.x, element.y, element.z); } + public void set( int index, double x, double y, double z ) { + index *= DOF; + double[] block = array.getBlocks().get(index/array.getBlockSize()); + int where = index%array.getBlockSize(); + block[where] = x; + block[where + 1] = y; + block[where + 2] = z; + } + @Override public void set( int index, Point3D_F64 element ) { index *= DOF; double[] block = array.getBlocks().get(index/array.getBlockSize()); int where = index%array.getBlockSize(); - element.x = block[where]; - element.y = block[where + 1]; - element.z = block[where + 2]; + block[where] = element.x; + block[where + 1] = element.y; + block[where + 2] = element.z; } /** diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint4D_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint4D_F64.java index cd0f55f79a..d1337a10cd 100644 --- a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint4D_F64.java +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArrayPoint4D_F64.java @@ -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). * @@ -19,10 +19,8 @@ package boofcv.struct.packed; import boofcv.misc.BoofLambdas; -import boofcv.struct.PackedArray; import georegression.struct.point.Point4D_F64; import lombok.Getter; -import org.ddogleg.struct.BigDogArray_F64; import org.ddogleg.struct.BigDogGrowth; /** @@ -30,12 +28,7 @@ * * @author Peter Abeles */ -public class PackedBigArrayPoint4D_F64 implements PackedArray { - private static final int DOF = 4; - - // Storage for the raw data in an array - private final BigDogArray_F64 array; - +public class PackedBigArrayPoint4D_F64 extends PackedBigArray_F64 { /** Storage for the raw data in an array */ @Getter private final Point4D_F64 temp = new Point4D_F64(); @@ -61,7 +54,7 @@ public PackedBigArrayPoint4D_F64( int reservedPoints ) { * @param growth Growth strategy to use */ public PackedBigArrayPoint4D_F64( int reservedPoints, int blockSize, BigDogGrowth growth ) { - array = new BigDogArray_F64(reservedPoints*DOF, blockSize*DOF, growth); + super(4, reservedPoints, blockSize, growth); } /** @@ -77,14 +70,6 @@ public PackedBigArrayPoint4D_F64 setTo( PackedBigArrayPoint4D_F64 src ) { return this; } - @Override public void reset() { - array.reset(); - } - - @Override public void reserve( int numPoints ) { - array.reserve(numPoints*DOF); - } - public void append( double x, double y, double z, double w ) { array.add(x); array.add(y); @@ -92,6 +77,16 @@ public void append( double x, double y, double z, double w ) { array.add(w); } + public void set( int index, double x, double y, double z, double w ) { + index *= DOF; + double[] block = array.getBlocks().get(index/array.getBlockSize()); + int where = index%array.getBlockSize(); + block[where] = x; + block[where + 1] = y; + block[where + 2] = z; + block[where + 3] = w; + } + @Override public void append( Point4D_F64 element ) { array.add(element.x); array.add(element.y); @@ -103,10 +98,10 @@ public void append( double x, double y, double z, double w ) { index *= DOF; double[] block = array.getBlocks().get(index/array.getBlockSize()); int where = index%array.getBlockSize(); - element.x = block[where]; - element.y = block[where + 1]; - element.z = block[where + 2]; - element.w = block[where + 3]; + block[where] = element.x; + block[where + 1] = element.y; + block[where + 2] = element.z; + block[where + 3] = element.w; } @Override public Point4D_F64 getTemp( int index ) { diff --git a/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArray_F64.java b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArray_F64.java new file mode 100644 index 0000000000..686abf9609 --- /dev/null +++ b/main/boofcv-types/src/main/java/boofcv/struct/packed/PackedBigArray_F64.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024, Peter Abeles. All Rights Reserved. + * + * This file is part of BoofCV (http://boofcv.org). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package boofcv.struct.packed; + +import boofcv.struct.PackedArray; +import lombok.Getter; +import org.ddogleg.struct.BigDogArray_F64; +import org.ddogleg.struct.BigDogGrowth; + +public abstract class PackedBigArray_F64 implements PackedArray { + /** Degrees of freedom */ + protected final int DOF; + + /** Stores tuple in a single continuous array */ + @Getter protected final BigDogArray_F64 array; + + public PackedBigArray_F64( int DOF, int reservedPoints, int blockSize, BigDogGrowth growth ) { + this.DOF = DOF; + this.array = new BigDogArray_F64(reservedPoints*DOF, blockSize*DOF, growth); + } + + @Override public void reset() { + array.reset(); + } + + @Override public void reserve( int numTuples ) { + array.reserve(numTuples*DOF); + } + + @Override public int size() { + return array.size/DOF; + } + + @Override public boolean isEquals( PackedArray b ) {return array.isEquivalent(((PackedBigArray_F64)b).array, 0.0);} + + /** True if the two arrays are equal to within the specified tolerance */ + public boolean isEquals( PackedArray b, double tol ) {return array.isEquivalent(((PackedBigArray_F64)b).array, tol);} +} diff --git a/main/boofcv-types/src/test/java/boofcv/struct/packed/GenericPackedArrayChecks.java b/main/boofcv-types/src/test/java/boofcv/struct/packed/GenericPackedArrayChecks.java index f450fdf21f..ede6329265 100644 --- a/main/boofcv-types/src/test/java/boofcv/struct/packed/GenericPackedArrayChecks.java +++ b/main/boofcv-types/src/test/java/boofcv/struct/packed/GenericPackedArrayChecks.java @@ -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). * @@ -26,8 +26,7 @@ import java.util.ArrayList; import java.util.List; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.*; /** * Common tests for implementations of {@link PackedArray}. @@ -135,7 +134,7 @@ public abstract class GenericPackedArrayChecks extends BoofStandardJUnit { List found = new ArrayList<>(); DogArray_I32 indexes = new DogArray_I32(); - array.forIdx(2,array.size()-1, (idx, point)->{ + array.forIdx(2, array.size() - 1, ( idx, point ) -> { T copy = createRandomPoint(); array.copy(point, copy); found.add(copy); @@ -144,8 +143,8 @@ public abstract class GenericPackedArrayChecks extends BoofStandardJUnit { assertEquals(23, indexes.size); for (int i = 0; i < indexes.size; i++) { - assertEquals(i+2, indexes.get(i)); - checkEquals(array.getTemp(i+2), found.get(i)); + assertEquals(i + 2, indexes.get(i)); + checkEquals(array.getTemp(i + 2), found.get(i)); } } @@ -157,10 +156,33 @@ public abstract class GenericPackedArrayChecks extends BoofStandardJUnit { alg.append(createRandomPoint()); var p = createRandomPoint(); + var copy = createRandomPoint(); + alg.copy(p, copy); + alg.set(1, p); + + // make sure set isn't writing to 'p'. yes this was a bug + checkEquals(p, copy); + + // Retrieve the value and see if it's the same T found = alg.getTemp(1); checkEquals(p, found); } @Test void setTo_Standard() {checkSetTo(createAlg().getClass(), true);} + + @Test void isEquals() { + PackedArray a = createAlg(); + PackedArray b = createAlg(); + + assertTrue(a.isEquals(b)); + + for (int i = 0; i < 4; i++) { + T p = createRandomPoint(); + a.append(p); + assertFalse(a.isEquals(b)); + b.append(p); + assertTrue(a.isEquals(b)); + } + } } diff --git a/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedArrayPoint2D_F64.java b/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedArrayPoint2D_F64.java index ce38bb53de..5f3e714f33 100644 --- a/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedArrayPoint2D_F64.java +++ b/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedArrayPoint2D_F64.java @@ -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). * @@ -23,8 +23,7 @@ import org.ejml.UtilEjml; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.*; public class TestPackedArrayPoint2D_F64 extends GenericPackedArrayChecks { @@ -34,8 +33,8 @@ public class TestPackedArrayPoint2D_F64 extends GenericPackedArrayChecks { @@ -48,6 +47,14 @@ public class TestPackedArrayPoint3D_F64 extends GenericPackedArrayChecks { @@ -49,6 +48,14 @@ public class TestPackedArrayPoint4D_F64 extends GenericPackedArrayChecks { @@ -48,6 +47,14 @@ public class TestPackedBigArrayPoint2D_F64 extends GenericPackedArrayChecks { @@ -51,6 +50,14 @@ public class TestPackedBigArrayPoint3D_F64 extends GenericPackedArrayChecks(); points.add(new Point3D_F64(1, 2, 3)); diff --git a/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedBigArrayPoint4D_F64.java b/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedBigArrayPoint4D_F64.java index a38e49c986..9674c0ed41 100644 --- a/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedBigArrayPoint4D_F64.java +++ b/main/boofcv-types/src/test/java/boofcv/struct/packed/TestPackedBigArrayPoint4D_F64.java @@ -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). * @@ -24,8 +24,7 @@ import org.ejml.UtilEjml; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.*; public class TestPackedBigArrayPoint4D_F64 extends GenericPackedArrayChecks { @@ -50,6 +49,14 @@ public class TestPackedBigArrayPoint4D_F64 extends GenericPackedArrayChecks