Skip to content

Commit

Permalink
gaussian blur from cv2 goes in.........
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Genty committed May 2, 2016
1 parent c18babe commit c01e18c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions mac/pyrgb/rgb_cv2/cv2gausblur.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from cv2selection import CV2Selection
import cv2

class CV2GausBlur(CV2Selection):
def __init__(self):
super(CV2GausBlur,self).__init__()

self.name = "CV2GausBlur"

# default options
self.options['ksize'] = (5,5)
self.options['sigmaX'] = 1.0
self.options['sigmaY'] = 1.0

self.types['ksize'] = tuple
self.types['sigmaX'] = float
self.types['sigmaY'] = float

def __description__(self):
return "No description provided!"

def __implement__(self,image):
return cv2.GaussianBlur(image,**self.options)
4 changes: 3 additions & 1 deletion mac/pyrgb/rgb_cv2/cv2selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
from cv2nothing import CV2Nothing
from cv2add import CV2Add
from cv2multiply import CV2Multiply
from cv2gausblur import CV2GausBlur

class CV2Selector(object):
def __init__(self):
self.selections = { "nothing" : CV2Nothing(),
"blur" : CV2Blur() ,
"add" : CV2Add(),
"multiply" : CV2Multiply()}
"multiply" : CV2Multiply(),
"gausblur" : CV2GausBlur()}

self.selection = None

Expand Down

0 comments on commit c01e18c

Please sign in to comment.