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);
});
}
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);
}
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);
}
Aggregations