# HG changeset patch # User Xavier Glorot # Date 1265842077 18000 # Node ID 8aadb0f59a64248b9f80a29ee23e32f3eef75be9 # Parent 104e0b8a1c7096675787425ced7e863c6677db42 changed contrast definition for add_background_image diff -r 104e0b8a1c70 -r 8aadb0f59a64 transformations/add_background_image.py --- 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):