Skip to content

Commit

Permalink
AssociatedIndex
Browse files Browse the repository at this point in the history
- Added isIdentical()
  • Loading branch information
lessthanoptimal committed Apr 21, 2024
1 parent e1aba6d commit 69f5615
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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).
*
Expand All @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 69f5615

Please sign in to comment.