Création de contours (normale-lissée)

This commit is contained in:
xdrm-brackets 2015-09-20 00:02:57 +02:00
parent aa5ef8c9ea
commit 7b19dede1c
8 changed files with 9 additions and 5 deletions

View File

@ -102,8 +102,12 @@ elif action == 11:
print startStr
testAdditiveNoise() # teste le bruitage/débruitage de type "Additif"
elif action == 12:
s = raw_input("Seuil [5]: ");
arg1 = 5
if s != "":
arg1 = int(s)
print startStr
testSmooth() # teste le lissage
testSmooth(arg1) # teste le lissage
# performances
elif action == 20:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

BIN
code/mergeSub.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

BIN
code/new.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

View File

@ -374,8 +374,7 @@ def testAdditiveNoise():
# Parse le fichier d'origine
# Lisse le fichier
# Unparse l'image et l'enregistre dans le fichier de sortie
def testSmooth():
def testSmooth(seuil=5):
t = Timer();
@ -395,8 +394,9 @@ def testSmooth():
img.parse( binFile );
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())
# Unparsing

BIN
docs/shapes/AM_Contours.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
docs/shapes/c3.pdf Normal file

Binary file not shown.