Création de contours (normale-lissée)
This commit is contained in:
parent
aa5ef8c9ea
commit
7b19dede1c
|
@ -102,8 +102,12 @@ elif action == 11:
|
||||||
print startStr
|
print startStr
|
||||||
testAdditiveNoise() # teste le bruitage/débruitage de type "Additif"
|
testAdditiveNoise() # teste le bruitage/débruitage de type "Additif"
|
||||||
elif action == 12:
|
elif action == 12:
|
||||||
|
s = raw_input("Seuil [5]: ");
|
||||||
|
arg1 = 5
|
||||||
|
if s != "":
|
||||||
|
arg1 = int(s)
|
||||||
print startStr
|
print startStr
|
||||||
testSmooth() # teste le lissage
|
testSmooth(arg1) # teste le lissage
|
||||||
|
|
||||||
# performances
|
# performances
|
||||||
elif action == 20:
|
elif action == 20:
|
||||||
|
|
BIN
code/mask.bmp
BIN
code/mask.bmp
Binary file not shown.
Before Width: | Height: | Size: 227 KiB |
Binary file not shown.
After Width: | Height: | Size: 352 KiB |
Binary file not shown.
After Width: | Height: | Size: 352 KiB |
|
@ -374,8 +374,7 @@ def testAdditiveNoise():
|
||||||
# Parse le fichier d'origine
|
# Parse le fichier d'origine
|
||||||
# Lisse le fichier
|
# Lisse le fichier
|
||||||
# Unparse l'image et l'enregistre dans le fichier de sortie
|
# Unparse l'image et l'enregistre dans le fichier de sortie
|
||||||
def testSmooth():
|
def testSmooth(seuil=5):
|
||||||
|
|
||||||
t = Timer();
|
t = Timer();
|
||||||
|
|
||||||
|
|
||||||
|
@ -395,8 +394,9 @@ def testSmooth():
|
||||||
img.parse( binFile );
|
img.parse( binFile );
|
||||||
print "%s |" % (t.get())
|
print "%s |" % (t.get())
|
||||||
|
|
||||||
print "| Smooth image |",; t.reset();
|
|
||||||
noise.smooth(img.content.map, seuil=5)
|
print "| Lissage |",; t.reset();
|
||||||
|
noise.smooth(img.content.map, seuil=seuil);
|
||||||
print "%s |" % (t.get())
|
print "%s |" % (t.get())
|
||||||
|
|
||||||
# Unparsing
|
# Unparsing
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue