Common-Lib

common-lib contains data classes used by other utility libraries.

DetectionType

Enum for major object detection classes.

ObjectRecognition

Replacement for the TrackedRecognition with more attributes relevant to the utility libraries.

Mapping from TrackedRecognition to LSDObjectRecognition:

public class RecognitionHelper {
    /**
    * @param tr - Source TrackedRecognition
    * @param imageTime - Timestamp of tracked image
    * @param imageSeq - Sequence value tracked image
    */
    public LSDObjectRecognition createObjectRecognition(TrackedRecognition tr, Date imageTime, int imageSeq) {
        LSDObjectRecognition ir    = new LSDObjectRecognition();
        // Timestamp and sequence of image TrackedRecognition is from
        ir.timestamp            = imageTime;
        ir.imageSeq             = imageSeq;
        // Normalize tracked object class
        ir.detectionType        = LSDDetectionType.fromRecognitionTitle(tr.title);
        // Other values from TrackedRecognition
        ir.detectionConfidence  = tr.detectionConfidence;
        ir.id                   = tr.id;
        ir.title                = tr.title;
        ir.model                = tr.model;
        ir.metaData             = tr.metaData;
        ir.distance             = tr.distance;
        ir.location.set(tr.trackedLocation);
        return ir;
    }
}

results matching ""

    No results matching ""