Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssociatedIndex #424

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading