Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SamCarlberg authored and azure-pipelines committed Apr 18, 2019
1 parent eaf2e4d commit 5efa91e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,18 @@ public List<Contour> 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)
.map(opencv_imgproc::boundingRect)
.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)
Expand Down

0 comments on commit 5efa91e

Please sign in to comment.