Mercurial > ift6266
comparison transformations/BruitGauss.py @ 159:e81241cfc2de
merge
author | Myriam Cote <cotemyri@iro.umontreal.ca> |
---|---|
date | Thu, 25 Feb 2010 09:05:48 -0500 |
parents | 7640cb31cf1f |
children |
comparison
equal
deleted
inserted
replaced
158:d1bb6e06497a | 159:e81241cfc2de |
---|---|
20 Sylvain Pannetier Lebeuf dans le cadre de IFT6266, hiver 2010 | 20 Sylvain Pannetier Lebeuf dans le cadre de IFT6266, hiver 2010 |
21 | 21 |
22 ''' | 22 ''' |
23 | 23 |
24 import numpy | 24 import numpy |
25 import random | 25 #import random |
26 import scipy | 26 import scipy |
27 from scipy import ndimage | 27 from scipy import ndimage |
28 | 28 |
29 class BruitGauss(): | 29 class BruitGauss(): |
30 | 30 |
31 def __init__(self,complexity=1): | 31 def __init__(self,complexity=1,seed=6378): |
32 self.nb_chngmax =10 #Le nombre de pixels changes. Seulement pour fin de calcul | 32 self.nb_chngmax =10 #Le nombre de pixels changes. Seulement pour fin de calcul |
33 self.grandeurmax = 20 | 33 self.grandeurmax = 20 |
34 self.sigmamax = 6.0 | 34 self.sigmamax = 6.0 |
35 self.regenerate_parameters(complexity) | 35 self.regenerate_parameters(complexity) |
36 self.seed=seed | |
37 | |
38 #numpy.random.seed(self.seed) | |
39 | |
40 def get_seed(self): | |
41 return self.seed | |
36 | 42 |
37 def get_settings_names(self): | 43 def get_settings_names(self): |
38 return ['nb_chng','sigma_gauss','grandeur'] | 44 return ['nb_chng','sigma_gauss','grandeur'] |
39 | 45 |
40 def regenerate_parameters(self, complexity): | 46 def regenerate_parameters(self, complexity): |