From ddaa5fba0be30609938207ad7f5f1a6e76677079 Mon Sep 17 00:00:00 2001 From: Peter Abeles Date: Sat, 20 Apr 2024 15:46:05 -0500 Subject: [PATCH] AssociatedIndex - Added isIdentical() --- .../boofcv/struct/feature/AssociatedIndex.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/main/boofcv-feature/src/main/java/boofcv/struct/feature/AssociatedIndex.java b/main/boofcv-feature/src/main/java/boofcv/struct/feature/AssociatedIndex.java index ebc1f244b0..e997129cc2 100644 --- a/main/boofcv-feature/src/main/java/boofcv/struct/feature/AssociatedIndex.java +++ b/main/boofcv-feature/src/main/java/boofcv/struct/feature/AssociatedIndex.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Peter Abeles. All Rights Reserved. + * Copyright (c) 2024, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * @@ -18,21 +18,21 @@ package boofcv.struct.feature; -import lombok.Getter; -import lombok.Setter; +import lombok.Data; /** * Indexes of two associated features and the fit score.. * * @author Peter Abeles */ +@Data public class AssociatedIndex { /** index of the feature in the source image */ - public @Getter @Setter int src; + public int src; /** index of the feature in the destination image */ - public @Getter @Setter int dst; + public int dst; /** The association score. Meaning will very depending on implementation */ - public @Getter @Setter double fitScore; + public double fitScore; public AssociatedIndex( AssociatedIndex original ) { setTo(original); @@ -70,6 +70,10 @@ public void setTo( AssociatedIndex a ) { fitScore = a.fitScore; } + public boolean isIdentical( AssociatedIndex o ) { + return src == o.src && dst == o.dst && fitScore == o.fitScore; + } + public AssociatedIndex copy() { return new AssociatedIndex(this); }