From 4fd8e21ac3cfa2abf349134d1c0eba39513370c8 Mon Sep 17 00:00:00 2001 From: Soumi150 <56203058+Soumi150@users.noreply.github.com> Date: Fri, 17 Mar 2023 20:58:52 +0530 Subject: [PATCH] Add filter2D --- imagelab_electron/imagelab-blocks.js | 23 +++++++++ imagelab_electron/index.html | 1 + imagelab_electron/operations.js | 1 + imagelab_electron/src/controller/main.js | 7 +++ .../src/operator/filtering/Filter2D.js | 49 +++++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 imagelab_electron/src/operator/filtering/Filter2D.js diff --git a/imagelab_electron/imagelab-blocks.js b/imagelab_electron/imagelab-blocks.js index 8bd49e6..51d9b46 100644 --- a/imagelab_electron/imagelab-blocks.js +++ b/imagelab_electron/imagelab-blocks.js @@ -781,6 +781,29 @@ Blockly.defineBlocksWithJsonArray([ "Erosion is quite a similar process as dilation. With this procedure the areas of dark regions grow in size and bright regions reduce. The size of an object in white shade or bright shade increases. while it decreases in white shade or bright shade", helpUrl: "", }, + { + type: "filtering_filter2d", + message0: "Apply filter2d with ddepth %1 and kernel %2", + args0: [ + { + type: "field_number", + name: "ddepth", + value: -1, + }, + { + type: "field_number", + name: "kernelSize", + value: 2, + }, + ], + inputsInline: true, + previousStatement: null, + nextStatement: null, + colour: 135, + tooltip: + "Filter2D operation can be used to convolve an image with a kernel of a specific shape ", + helpUrl: "", + }, { type: "filtering_bilateral", message0: diff --git a/imagelab_electron/index.html b/imagelab_electron/index.html index 37bdbad..00c04fd 100644 --- a/imagelab_electron/index.html +++ b/imagelab_electron/index.html @@ -146,6 +146,7 @@ +