Skip to content

Comments

Update WatershedOperation#607

Merged
SamCarlberg merged 5 commits intoWPIRoboticsProjects:masterfrom
SamCarlberg:feat/update-watershed
Oct 6, 2016
Merged

Update WatershedOperation#607
SamCarlberg merged 5 commits intoWPIRoboticsProjects:masterfrom
SamCarlberg:feat/update-watershed

Conversation

@SamCarlberg
Copy link
Member

Update WatershedOperation to return contours for the features discovered by watershed, instead of (a rather unuseful) Mat.

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")
Copy link
Member Author

@SamCarlberg SamCarlberg Jun 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit too long; it gets cut off and rendered as "Segmented C..." on my machine. Maybe just call it"Features"?

@codecov-io
Copy link

codecov-io commented Jun 17, 2016

Current coverage is 54.58% (diff: 19.56%)

Merging #607 into master will decrease coverage by 0.27%

@@             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          

Sunburst

Powered by Codecov. Last update 7996fc8...722b025

@JLLeitschuh
Copy link
Member

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.

@SamCarlberg
Copy link
Member Author

Wait what, it was rebased. Weird.

@SamCarlberg SamCarlberg force-pushed the feat/update-watershed branch from 2c6129c to ae6c36b Compare June 27, 2016 16:08
// Background (0) or border (-1)
continue;
}
Mat m = segments.computeIfAbsent(val, k -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When does this mat get used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a temporary Mat used to find individual contours from the watershed.

@SamCarlberg SamCarlberg force-pushed the feat/update-watershed branch from 2828e22 to fdf1a47 Compare July 5, 2016 15:47
return backgroundLabel;
}

private Point fromPoint2f(Point2f p) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this static?

@AustinShalit AustinShalit added this to the v2.0.0 milestone Aug 4, 2016
@AustinShalit AustinShalit modified the milestones: v1.5.0, 1.6.0 Aug 27, 2016
@AustinShalit AustinShalit modified the milestones: 1.6.0, v1.5.0 Oct 5, 2016
Copy link
Member

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a memory resource that should be closed once done with it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to manually free it, the GC will get it.

@SamCarlberg SamCarlberg force-pushed the feat/update-watershed branch from cbbee69 to 722b025 Compare October 5, 2016 21:07
Copy link
Member

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Nice work!

@JLLeitschuh
Copy link
Member

JLLeitschuh commented Oct 6, 2016

@SamCarlberg SamCarlberg merged commit f84d379 into WPIRoboticsProjects:master Oct 6, 2016
@SamCarlberg SamCarlberg deleted the feat/update-watershed branch October 6, 2016 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants