diff data_generation/transformations/gimp_script.py @ 260:0c0f0b3f6a93

branch merge.
author Arnaud Bergeron <abergeron@gmail.com>
date Wed, 17 Mar 2010 15:31:21 -0400
parents dd2df78fcf47
children d5b2b6397a5a
line wrap: on
line diff
--- a/data_generation/transformations/gimp_script.py	Wed Mar 17 15:24:25 2010 -0400
+++ b/data_generation/transformations/gimp_script.py	Wed Mar 17 15:31:21 2010 -0400
@@ -38,7 +38,7 @@
         return ['mblur_length', 'mblur_angle', 'pinch']
     
     def regenerate_parameters(self, complexity):
-        if complexity and self.blur_bool:
+        if complexity:
            self.mblur_length = abs(int(round(numpy.random.normal(0, 3*complexity))))
         else:
             self.mblur_length = 0
@@ -50,7 +50,7 @@
     def transform_image(self, image):
         if self.mblur_length or self.pinch:
             setpix(image)
-            if self.mblur_length:
+            if self.mblur_length and self.blur_bool:
                 pdb.plug_in_mblur(img, layer1, 0, self.mblur_length, self.mblur_angle, 0, 0)
             if self.pinch:        
                 pdb.plug_in_whirl_pinch(img, layer1, 0.0, self.pinch, 1.0)