changeset 85:8aadb0f59a64

changed contrast definition for add_background_image
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Wed, 10 Feb 2010 17:47:57 -0500
parents 104e0b8a1c70
children b3d76ebf2fac
files transformations/add_background_image.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/transformations/add_background_image.py	Wed Feb 10 17:38:17 2010 -0500
+++ b/transformations/add_background_image.py	Wed Feb 10 17:47:57 2010 -0500
@@ -66,7 +66,7 @@
         image = self.load_image(self.bg_image_file + self.image_files[i])
         self.bg_image = self.rand_crop(image)
         maxbg = self.bg_image.max()
-        self.bg_image = self.bg_image / maxbg * ( max(maximage - self.contrast/2.0,0.1) ) 
+        self.bg_image = self.bg_image / maxbg * ( max(maximage - self.contrast,0.0) ) 
 
     # set "bg_image" as background to "image", based on a pixels threshold
     def set_bg(self,image):