diff --git a/build.gradle b/build.gradle index 7956605a1f..39683f5895 100644 --- a/build.gradle +++ b/build.gradle @@ -277,7 +277,6 @@ project(":core") { should be changed, but for now this saves us a lot of space. */ exclude 'org/bytedeco/javacpp/*/*calib3d*' exclude 'org/bytedeco/javacpp/*/*optflow*' - exclude 'org/bytedeco/javacpp/*/*photo*' exclude 'org/bytedeco/javacpp/*/*shape*' exclude 'org/bytedeco/javacpp/*/*stitching*' exclude 'org/bytedeco/javacpp/*/*superres*' diff --git a/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java b/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java index cfd426b5dd..ae09e5b720 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java @@ -29,6 +29,7 @@ import org.bytedeco.javacpp.opencv_core.Scalar; import org.bytedeco.javacpp.opencv_core.Size; import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.javacpp.opencv_photo; /** * A list of all of the raw opencv operations. @@ -377,6 +378,21 @@ public class CVOperations { opencv_imgproc.threshold(src, dst, thresh.doubleValue(), maxval.doubleValue(), type.value); } + )), + new OperationMetaData(CVOperation.defaults("CV fastNlMeansDenoisingColored", + "Modification of fastNlMeansDenoising function for colored images"), + templateFactory.create( + SocketHints.Inputs.createMatSocketHint("src", false), + SocketHints.Inputs.createNumberSpinnerSocketHint("h", 3), + SocketHints.Inputs.createNumberSpinnerSocketHint("hColor", 3), + SocketHints.Inputs.createNumberSpinnerSocketHint("templateWindowSize", 7), + SocketHints.Inputs.createNumberSpinnerSocketHint("searchWindowSize", 21), + SocketHints.Outputs.createMatSocketHint("dst"), + (src, h, hColor, templateWindowSize, searchWindowSize, dst) -> { + opencv_photo.fastNlMeansDenoisingColored(src, dst, h.floatValue(), hColor + .floatValue(), + templateWindowSize.intValue(), searchWindowSize.intValue()); + } )) ); }