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

Adds fastNlMeansDenoisingColored a better denoising algorithm #847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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*'
Expand Down
16 changes: 16 additions & 0 deletions core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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());
}
))
);
}
Expand Down