Search in sources :

Example 1 with DogArray_I64

use of org.ddogleg.struct.DogArray_I64 in project BoofCV by lessthanoptimal.

the class PointTrackerPerfectCloud method dropUnobserved.

/**
 * Drops tracks which were not visible in the FOV
 */
void dropUnobserved() {
    // Make a list first to avoid modifying a data structure while traversing through it
    DogArray_I64 dropList = new DogArray_I64();
    for (long id : id_to_track.keys()) {
        // lint:forbidden ignore_line
        if (!observedID.contains(id)) {
            dropList.add(id);
        }
    }
    // Now actually drop the tracks
    dropList.forEach(id -> {
        PointTrack track = Objects.requireNonNull(id_to_track.remove(id));
        // Don't worry about track being recycled since it won't be recycled until the next call to process
        // and at that point drop is reset
        dropped.add(track);
        BoofMiscOps.checkTrue(activeTracks.remove(track));
        int cloudIdx = id_to_cloudIdx.remove(id);
        cloudIdx_to_id.remove(cloudIdx);
    });
}
Also used : PointTrack(boofcv.abst.tracker.PointTrack) DogArray_I64(org.ddogleg.struct.DogArray_I64)

Example 2 with DogArray_I64

use of org.ddogleg.struct.DogArray_I64 in project BoofCV by lessthanoptimal.

the class CreateFiducialSquareBinary method callRenderPdf.

@Override
protected void callRenderPdf(CreateFiducialDocumentPDF renderer) throws IOException {
    List<String> names = new ArrayList<>();
    DogArray_I64 numbers = new DogArray_I64();
    for (int i = 0; i < this.numbers.length; i++) {
        names.add(this.numbers[i].toString());
        numbers.add(this.numbers[i]);
    }
    ((CreateSquareFiducialDocumentPDF) renderer).render(names, numbers, gridWidth);
}
Also used : ArrayList(java.util.ArrayList) DogArray_I64(org.ddogleg.struct.DogArray_I64) CreateSquareFiducialDocumentPDF(boofcv.app.fiducials.CreateSquareFiducialDocumentPDF)

Example 3 with DogArray_I64

use of org.ddogleg.struct.DogArray_I64 in project BoofCV by lessthanoptimal.

the class CreateFiducialSquareBinary method callRenderImage.

@Override
protected void callRenderImage(CreateFiducialDocumentImage renderer) {
    List<String> names = new ArrayList<>();
    DogArray_I64 numbers = new DogArray_I64();
    for (int i = 0; i < this.numbers.length; i++) {
        names.add(this.numbers[i].toString());
        numbers.add(this.numbers[i]);
    }
    ((CreateSquareFiducialDocumentImage) renderer).render(names, numbers, gridWidth);
}
Also used : ArrayList(java.util.ArrayList) DogArray_I64(org.ddogleg.struct.DogArray_I64) CreateSquareFiducialDocumentImage(boofcv.app.fiducials.CreateSquareFiducialDocumentImage)

Aggregations

DogArray_I64 (org.ddogleg.struct.DogArray_I64)3 ArrayList (java.util.ArrayList)2 PointTrack (boofcv.abst.tracker.PointTrack)1 CreateSquareFiducialDocumentImage (boofcv.app.fiducials.CreateSquareFiducialDocumentImage)1 CreateSquareFiducialDocumentPDF (boofcv.app.fiducials.CreateSquareFiducialDocumentPDF)1