-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add convexity and inertia ratio to findBlobs #929
base: master
Are you sure you want to change the base?
Add convexity and inertia ratio to findBlobs #929
Conversation
@@ -66,6 +74,8 @@ public FindBlobsOperation(InputSocket.Factory inputSocketFactory, OutputSocket.F | |||
inputSocket, | |||
minAreaSocket, | |||
circularitySocket, | |||
convexitySocket, | |||
inertiaRatioSocket, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, if you don't put these last, you'll break deserializing older save files. Save files are order dependent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah gotcha, thanks for the heads up for the future.
private final SocketHint<List<Number>> convexityHint = SocketHints.Inputs | ||
.createNumberListRangeSocketHint("Convexity", 0.0, 1.0); | ||
private final SocketHint<List<Number>> inertiaRatioHint = SocketHints.Inputs | ||
.createNumberListRangeSocketHint("Inertia Ratio", 0.0, 1.0); | ||
private final SocketHint<Boolean> colorHint = SocketHints | ||
.createBooleanSocketHint("Dark Blobs", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SamCarlberg At some point, we should come back through here and make all these static.
@@ -44,6 +48,8 @@ | |||
private final InputSocket<Mat> inputSocket; | |||
private final InputSocket<Number> minAreaSocket; | |||
private final InputSocket<List<Number>> circularitySocket; | |||
private final InputSocket<List<Number>> convexitySocket; | |||
private final InputSocket<List<Number>> inertiaRatioSocket; | |||
private final InputSocket<Boolean> colorSocket; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, can you put these in the same order as they are declared in the getInputSockets
method, same thing about their declaration in the constructor and in the socket hints list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@SamCarlberg Feel free to merge if you also approve. |
5f1ae35
to
098fb03
Compare
CC: @SamCarlberg |
Would you be willing to rebase this change? I'm happy to merge this |
Closes #880
Adds Sliders for convexity and inertia ratio.