Parcourir la source

edge detection filter

develop
Robin Thoni il y a 8 ans
Parent
révision
dae75adb67

+ 26
- 0
app/Http/Business/Filters/EdgeDetectionFilter.php Voir le fichier

@@ -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 Voir le fichier

@@ -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
             

Chargement…
Annuler
Enregistrer