diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java index a45f8b3c07..0698814e7e 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java @@ -62,9 +62,9 @@ public FindBlobsOperation(InputSocket.Factory inputSocketFactory, OutputSocket.F this.inputSocket = inputSocketFactory.create(inputHint); this.minAreaSocket = inputSocketFactory.create(minAreaHint); this.circularitySocket = inputSocketFactory.create(circularityHint); + this.colorSocket = inputSocketFactory.create(colorHint); this.convexitySocket = inputSocketFactory.create(convexityHint); this.inertiaRatioSocket = inputSocketFactory.create(inertiaRatioHint); - this.colorSocket = inputSocketFactory.create(colorHint); this.outputSocket = outputSocketFactory.create(blobsHint); } @@ -75,9 +75,10 @@ public List getInputSockets() { inputSocket, minAreaSocket, circularitySocket, + colorSocket, + //Sockets placed last to maintain backwards compatibility in deserialization convexitySocket, - inertiaRatioSocket, - colorSocket + inertiaRatioSocket ); } @@ -94,10 +95,9 @@ public void perform() { final Mat input = inputSocket.getValue().get().getCpu(); final Number minArea = minAreaSocket.getValue().get(); final List circularity = circularitySocket.getValue().get(); + final Boolean darkBlobs = colorSocket.getValue().get(); final List convexity = convexitySocket.getValue().get(); final List inertiaRatio = inertiaRatioSocket.getValue().get(); - final Boolean darkBlobs = colorSocket.getValue().get(); - final SimpleBlobDetector blobDetector = SimpleBlobDetector.create(new SimpleBlobDetector .Params()