Update WatershedOperation#607
Conversation
| private final SocketHint<Mat> outputHint = SocketHints.Inputs.createMatSocketHint("Output", true); | ||
| @SuppressWarnings("unchecked") | ||
| private final SocketHint<ContoursReport> outputHint = new SocketHint.Builder<>(ContoursReport.class) | ||
| .identifier("Segmented Contours") |
There was a problem hiding this comment.
This is a bit too long; it gets cut off and rendered as "Segmented C..." on my machine. Maybe just call it"Features"?
Current coverage is 54.58% (diff: 19.56%)@@ master #607 diff @@
==========================================
Files 209 209
Lines 6663 6700 +37
Methods 0 0
Messages 0 0
Branches 646 656 +10
==========================================
+ Hits 3655 3657 +2
- Misses 2839 2874 +35
Partials 169 169
|
0a86927 to
5739b46
Compare
|
You're going to need to rebase this so that it is just the one commit. Currently the diff is to large to correctly see what has been changed. |
|
Wait what, it was rebased. Weird. |
2c6129c to
ae6c36b
Compare
| // Background (0) or border (-1) | ||
| continue; | ||
| } | ||
| Mat m = segments.computeIfAbsent(val, k -> { |
There was a problem hiding this comment.
When does this mat get used?
There was a problem hiding this comment.
It's a temporary Mat used to find individual contours from the watershed.
2828e22 to
fdf1a47
Compare
| return backgroundLabel; | ||
| } | ||
|
|
||
| private Point fromPoint2f(Point2f p) { |
JLLeitschuh
left a comment
There was a problem hiding this comment.
Is this a breaking change? Is this a concern?
| final int cols = markers.cols(); | ||
| final int rows = markers.rows(); | ||
| final int minDist = 5; | ||
| Point2f backgroundLabel = new Point2f(); |
There was a problem hiding this comment.
Is this a memory resource that should be closed once done with it?
There was a problem hiding this comment.
There's no need to manually free it, the GC will get it.
…red by watershed, instead of (a rather unuseful) Mat.
cbbee69 to
722b025
Compare
JLLeitschuh
left a comment
There was a problem hiding this comment.
This looks good! Nice work!
|
LGTM! We'll need to mention that this is a breaking change in the release notes. |
Update WatershedOperation to return contours for the features discovered by watershed, instead of (a rather unuseful) Mat.