All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.flash3388.flashlib.vision.cv.template.TemplateMatchingResult Maven / Gradle / Ivy

package com.flash3388.flashlib.vision.cv.template;

import org.opencv.core.Point;

public class TemplateMatchingResult implements Comparable {

    private final Point mCenterPoint;
    private final double mScore;

    public TemplateMatchingResult(Point centerPoint, double score) {
        mCenterPoint = centerPoint;
        mScore = score;
    }

    public Point getCenterPoint() {
        return mCenterPoint;
    }

    public double getScore() {
        return mScore;
    }

    @Override
    public int compareTo(TemplateMatchingResult o) {
        if (mScore == o.mScore) {
            return 0;
        }

        return mScore < o.mScore ? -1 : 1;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy