Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TheTripleV
Copy link
Contributor

Closes #880

Adds Sliders for convexity and inertia ratio.
image

@@ -66,6 +74,8 @@ public FindBlobsOperation(InputSocket.Factory inputSocketFactory, OutputSocket.F
inputSocket,
minAreaSocket,
circularitySocket,
convexitySocket,
inertiaRatioSocket,
Copy link
Member

@JLLeitschuh JLLeitschuh Mar 25, 2019

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.

Copy link
Contributor Author

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

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

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.

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.

LGTM!

@JLLeitschuh
Copy link
Member

@SamCarlberg Feel free to merge if you also approve.

@JLLeitschuh
Copy link
Member

CC: @SamCarlberg

@JLLeitschuh
Copy link
Member

Would you be willing to rebase this change? I'm happy to merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Find Blobs" doesn't expose convexity or inertia parameters
2 participants