Bladeren bron

edge detection filter

develop
Robin Thoni 8 jaren geleden
bovenliggende
commit
dae75adb67
2 gewijzigde bestanden met toevoegingen van 30 en 0 verwijderingen
  1. 26
    0
      app/Http/Business/Filters/EdgeDetectionFilter.php
  2. 4
    0
      public/app/controllers/upload.controller.js

+ 26
- 0
app/Http/Business/Filters/EdgeDetectionFilter.php Bestand weergeven

@@ -0,0 +1,26 @@
1
+<?php
2
+/**
3
+ * Created by PhpStorm.
4
+ * User: robin
5
+ * Date: 4/27/16
6
+ * Time: 8:16 PM
7
+ */
8
+
9
+namespace App\Http\Business\Filters;
10
+
11
+
12
+use App\Http\DBO\EffectApplyDbo;
13
+
14
+class EdgeDetectionFilter extends AbstractFilter
15
+{
16
+
17
+    /**
18
+     * @param $data EffectApplyDbo
19
+     */
20
+    public function apply($data)
21
+    {
22
+        $edgeArray = array(-1,-1,-1,-1,8,-1,-1,-1,-1);
23
+        $data->getImage()->convolveImage($edgeArray);
24
+        $data->getImage()->thresholdImage(1);
25
+    }
26
+}

+ 4
- 0
public/app/controllers/upload.controller.js Bestand weergeven

@@ -24,6 +24,10 @@ angular.module('app')
24 24
                 {
25 25
                     name: "Decrease Contrast",
26 26
                     id: "ContrastDec"
27
+                },
28
+                {
29
+                    name: "Edge Detection",
30
+                    id: "EdgeDetection"
27 31
                 }
28 32
             ];
29 33
             

Laden…
Annuleren
Opslaan