diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java index 3a60b7419e..d09b2e2a12 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java @@ -85,9 +85,7 @@ public List getProcessedContours() { } /** - * Compute the bounding boxes of all contours (if they haven't already been computed). Bounding - * boxes are used to compute several different properties, so it's probably not a good idea to - * compute them over and over again. + * Compute the bounding boxes of all contours. Called lazily and cached by {@link #boundingBoxes}. */ private Rect[] computeBoundingBoxes() { return PointerStream.ofMatVector(contours) @@ -95,6 +93,10 @@ private Rect[] computeBoundingBoxes() { .toArray(Rect[]::new); } + /** + * Computes the minimum-area bounding boxes of all contours. Called lazily and cached by + * {@link #rotatedBoundingBoxes}. + */ private RotatedRect[] computeMinAreaBoundingBoxes() { return PointerStream.ofMatVector(contours) .map(opencv_imgproc::minAreaRect)