Ajout du fichier latex (dossier)

This commit is contained in:
xdrm-brackets 2015-09-24 19:52:49 +02:00
parent eec6bed61a
commit 450bce4426
9 changed files with 666 additions and 587 deletions

View File

@ -51,6 +51,7 @@ print "| %s |" % exactLength("", 25, 0)
print "| 30) %s |" % exactLength("Reveler une teinte", 21, -1) print "| 30) %s |" % exactLength("Reveler une teinte", 21, -1)
print "| 31) %s |" % exactLength("Colorer une forme", 21, -1) print "| 31) %s |" % exactLength("Colorer une forme", 21, -1)
print "| 32) %s |" % exactLength("Colorer les formes", 21, -1) print "| 32) %s |" % exactLength("Colorer les formes", 21, -1)
print "| 33) %s |" % exactLength("Relever les contours", 21, -1)
print "+---------------------------+" print "+---------------------------+"
print "| %s |" % exactLength("TESTS DE FILTRES", 25, 0) print "| %s |" % exactLength("TESTS DE FILTRES", 25, 0)
print "| %s |" % exactLength("", 25, 0) print "| %s |" % exactLength("", 25, 0)
@ -158,6 +159,9 @@ elif action == 31:
elif action == 32: elif action == 32:
print startStr print startStr
colorAllShapes() # colorie la forme contenant le pixel de coordonnées donné colorAllShapes() # colorie la forme contenant le pixel de coordonnées donné
elif action == 33:
print startStr
testStroke() # trace les contours uniquement à partir de formes pleines
# filtres # filtres

BIN
code/shapes/3.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
code/shapes/4.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

View File

@ -745,7 +745,7 @@ def colorShape(x=0, y=0):
# récupère la forme # récupère la forme
print "| Getting shape |",; t.reset(); print "| Getting shape |",; t.reset();
shape = FX.Shape.get(img.content.map[y][x], img.content.map) shape = FX.Shape.getShape(img.content.map[y][x], img.content.map)
# on colorie la forme en rouge # on colorie la forme en rouge
for pixel in shape: for pixel in shape:
@ -806,7 +806,7 @@ def colorAllShapes():
for pixel in line: for pixel in line:
# condition (si ce n'est pas le fond ~= noir) # condition (si ce n'est pas le fond ~= noir)
if pixel.r + pixel.g + pixel.b > 3*100 and pixel not in already: # si loin du noir if pixel.r + pixel.g + pixel.b > 3*100 and pixel not in already: # si loin du noir
shape = FX.Shape.get(pixel, img.content.map) shape = FX.Shape.getShape(pixel, img.content.map)
print "shape detected" print "shape detected"
R, G, B = random.randint(0,255), random.randint(0,255), random.randint(0,255) R, G, B = random.randint(0,255), random.randint(0,255), random.randint(0,255)
@ -838,6 +838,60 @@ def colorAllShapes():
# Récupère et colore les contours à partir de formes pleines #
##############################################################
# @sysarg 1 Image à traiter
# @stsarg 2 Image de sortie
#
# @history
# Parse le fichier d'entrée
# récupère les contours
# trace les contours
# Unparse le tout et l'enregistre dans le fichier de sortie
def testStroke():
t = Timer();
img = BMPFile()
# lecture du fichier
print "| Reading file |",; t.reset();
with open( sys.argv[1] ) as f:
binFile = f.read();
print "%s |" % (t.get())
# parsage
print "| Parsing image |",; t.reset();
img.parse( binFile );
print "%s |" % (t.get())
strokes = []
# récupère la forme
print "| Getting Strokes |",; t.reset();
strokes = FX.Shape.getStrokes(img.content.map)
# met tout les pixels hors des contours en noir et les autres en blanc
for line in img.content.map:
for pixel in line:
if pixel in strokes:
pixel.setRGB(255,255,255)
else:
pixel.setRGB(0,0,0)
print "%s |" % (t.get())
print "| Unparsing |",; t.reset();
img.unparse(newBpp=24);
print "%s |" % (t.get())
print "| Writing File |",; t.reset();
with open( sys.argv[2], "w") as f:
f.write( img.binData );
print "%s |" % (t.get())

View File

@ -13,7 +13,7 @@ class Shape:
# #
# @return retourne la liste des pixels composant la forme (références) # @return retourne la liste des pixels composant la forme (références)
# #
def get(self, originalPixel, pixelMap, seuil=10): def getShape(self, originalPixel, pixelMap, seuil=10):
width = len( pixelMap[0] ) width = len( pixelMap[0] )
height = len( pixelMap ) height = len( pixelMap )
@ -67,3 +67,127 @@ class Shape:
pass pass
return shape; return shape;
# récupère le contour dans lequel est le pixel donné #
######################################################
# @param originalPixel pixel original
# @param pixelMap matrice de pixels
# @param seuil Ecart entre le pixel et ses alentours à partir duquel on considère un contour ou une continuité de la forme
#
# Blanc = fond
# Noir = forme
#
# @return retourne la liste des pixels composant le contour
#
def getEdges(self, originalPixel, pixelMap, seuil=10):
width = len( pixelMap[0] )
height = len( pixelMap )
# retourne un kernel 2x2 (sur lequel on fera les traitements)
def getKernel(pixel, pos):
x, y = pixel.x, pixel.y
if pos == 0:
return [ pixelMap[y][x], pixelMap[y][x+1], pixelMap[y+1][x], pixelMap[y+1][x+1] ]; # [pixel, autre], [autre, autre]
elif pos == 1:
return [ pixelMap[y][x-1], pixelMap[y][x], pixelMap[y+1][x-1], pixelMap[y+1][x] ]; # [autre, pixel], [autre, autre]
elif pos == 2:
return [ pixelMap[y-1][x+1], pixelMap[y-1][x], pixelMap[y][x], pixelMap[y][x+1] ]; # [autre, autre], [pixel, autre]
elif pos == 3:
return [ pixelMap[y-1][x-1], pixelMap[y-1][x], pixelMap[y][x-1], pixelMap[y][x] ]; # [autre, autre], [autre, pixel]
# retourne un kernel 2x2 en fonction de la direction actuelle et de la position (changement de position)
def flipKernel(kernel, pos, vect):
pixel = kernel[pos];
if pos == 0: # si kernel de type [pixel, autre], [autre, autre]
if vect == 0: # si direction == 0 (vers la droite)
return getKernel(pixel, pos+2)
if vect == 1: # si direction == 1 (vers le bas)
return getKernel(pixel, pos+1)
if pos == 1: # si kernel de type [autre, pixel], [autre, autre]
if vect == 1: # si direction == 1 (vers le bas)
return getKernel(pixel, pos-1)
if vect == 2: # si direction == 2 (vers la gauche)
return getKernel(pixel, pos+2)
if pos == 2: # si kernel de type [autre, autre], [pixel, autre]
if vect == 3: # si direction == 3 (vers le haut)
return getKernel(pixel, pos+1)
if vect == 0: # si direction == 0 (vers la droite)
return getKernel(pixel, pos-2)
if pos == 3: # si kernel de type [autre, autre], [autre, pixel]
if vect == 2: # si direction == 2 (vers la gauche)
return getKernel(pixel, pos-2)
if vect == 3: # si direction == 3 (vers le haut)
return getKernel(pixel, pos-1)
# dans un cas non pris en charge on renvoie une liste de "0"
return [0,0,0,0]
stroke = []
# le pixel de départ
master = originalPixel
slaves = [];
nextP = None
position = 0; # cf. getKernel
direction = 0; # 0 = droite, 1 = bas, 2 = gauche, 4 = haut
# récupère les pixels
while nextP != master:
# on définit le kernel
k = getKernel(master, position)
# on vide la liste des esclaves
slaves = []
# on parcourt les pixels du kernel
for pix in k:
# si pixel sur même ligne ou colonne (contre le pixel maître)
if pix.x == pixel.x or pix.y == pixel.y:
slaves.append( pix );
maybeNext = [None, 0];
# on parcourt les esclaves
for pix in slaves:
# si l'esclave est quasiment de la même couleur (différence r+g+b < seuil)
if abs(pixel.r-pix.r) <= seuil and abs(pixel.g-pix.g) <= seuil and abs(pixel.b-pix.b) <= seuil:
if pixel.x != pix.x: # si le contour suit les x
maybeNext = [pix, pix.x-pixel.x]
else: # si le contour suit les y
maybeNext = [pix, ]
return stroke
# récupère les contours de chaque forme à partir de formes pleines #
####################################################################
# @param pixelMap matrice de pixels
# @param seuil Ecart entre le pixel et ses alentours à partir duquel on considère un contour ou une continuité de la forme
#
# Blanc = fond
# Noir = forme
#
# @return retourne la liste des contours contenant chacun les pixels la composant
#
def getStrokes(self, pixelMap, seuil=10):
strokeArray = [] # contiendra la liste des contours
already = [] # contient la liste des contours, séparés par un élément valant "0"
stroke = [] # contiendra les pixels du contour en cours
# on parcourt tout les pixels
for line in pixelMap:
for pixel in line:
if (pixel.r+pixel.g+pixel.b) >= 3*255/2 and pixel not in already: # si pixel ~blanc~ et pas déjà dans un contour
# traitement de forme
stroke = self.getEdges(pixel, pixelMap, seuil=seuil);
already += [0] + stroke
return strokeArray;

346
docs/draws.svg Normal file
View File

@ -0,0 +1,346 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 744.09448819 1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="draws.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="175.73772"
inkscape:cy="787.50248"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g4163">
<rect
y="45.933632"
x="57.857143"
height="42.142857"
width="42.142857"
id="rect4136"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4138"
width="42.142857"
height="42.142857"
x="105.85715"
y="45.933632" />
<rect
y="93.933632"
x="105.85715"
height="42.142857"
width="42.142857"
id="rect4140"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4142"
width="42.142857"
height="42.142857"
x="57.857147"
y="93.933632" />
</g>
<g
id="g4193">
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4171"
width="42.142857"
height="42.142857"
x="257.85715"
y="45.933632" />
<rect
y="45.933632"
x="305.85715"
height="42.142857"
width="42.142857"
id="rect4173"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4175"
width="42.142857"
height="42.142857"
x="305.85715"
y="93.933632" />
<rect
y="93.933632"
x="257.85715"
height="42.142857"
width="42.142857"
id="rect4177"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
y="93.933632"
x="353.85715"
height="42.142857"
width="42.142857"
id="rect4183"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4185"
width="42.142857"
height="42.142857"
x="353.85715"
y="45.933632" />
<rect
y="141.93362"
x="353.85715"
height="42.142857"
width="42.142857"
id="rect4187"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4189"
width="42.142857"
height="42.142857"
x="305.85715"
y="141.93362" />
<rect
y="141.93362"
x="257.85715"
height="42.142857"
width="42.142857"
id="rect4191"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<g
id="g4223"
transform="matrix(-1,0,0,-1,175.34952,464.45183)">
<rect
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4225"
width="42.142857"
height="42.142857"
x="57.857147"
y="45.93362" />
<rect
y="45.933632"
x="105.85715"
height="42.142857"
width="42.142857"
id="rect4227"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4229"
width="42.142857"
height="42.142857"
x="105.85715"
y="93.933632" />
<rect
y="93.933617"
x="57.857147"
height="42.142857"
width="42.142857"
id="rect4231"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<g
transform="matrix(0,-1,1,0,101.41589,476.37534)"
id="g4233">
<rect
y="45.933632"
x="57.857143"
height="42.142857"
width="42.142857"
id="rect4235"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4237"
width="42.142857"
height="42.142857"
x="105.85715"
y="45.933632" />
<rect
y="93.933632"
x="105.85715"
height="42.142857"
width="42.142857"
id="rect4239"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4241"
width="42.142857"
height="42.142857"
x="57.857147"
y="93.933632" />
</g>
<g
id="g4243"
transform="matrix(-1,0,0,-1,415.34952,464.45183)">
<rect
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4245"
width="42.142857"
height="42.142857"
x="57.857143"
y="45.933632" />
<rect
y="45.933632"
x="105.85715"
height="42.142857"
width="42.142857"
id="rect4247"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4249"
width="42.142857"
height="42.142857"
x="105.85715"
y="93.933632" />
<rect
y="93.933632"
x="57.857147"
height="42.142857"
width="42.142857"
id="rect4251"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<g
transform="matrix(0,1,-1,0,523.426,270.5182)"
id="g4253">
<rect
y="45.933632"
x="57.857143"
height="42.142857"
width="42.142857"
id="rect4255"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4257"
width="42.142857"
height="42.142857"
x="105.85715"
y="45.933632" />
<rect
y="93.933632"
x="105.85715"
height="42.142857"
width="42.142857"
id="rect4259"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4261"
width="42.142857"
height="42.142857"
x="57.857147"
y="93.933632" />
</g>
<g
id="g4263"
transform="translate(449.49237,282.44171)">
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4265"
width="42.142857"
height="42.142857"
x="57.857143"
y="45.933632" />
<rect
y="45.933632"
x="105.85715"
height="42.142857"
width="42.142857"
id="rect4267"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4269"
width="42.142857"
height="42.142857"
x="105.85715"
y="93.933632" />
<rect
y="93.933632"
x="57.857147"
height="42.142857"
width="42.142857"
id="rect4271"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:10.2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 490.42906,436.67423 621.74889,303.83917"
id="path4274"
inkscape:connector-curvature="0" />
<g
id="g4304">
<g
style="stroke:#008000;stroke-width:4.08936834;stroke-miterlimit:4;stroke-dasharray:none"
transform="matrix(0.45312624,0,0,0.45312624,67.778895,161.56232)"
id="g4300">
<path
id="path4283"
style="fill:none;fill-rule:evenodd;stroke:#008000;stroke-width:4.08936834;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 86.543713,480.95398 98.329419,467.60577 86.454423,454.25756 m -49.668709,13.28817 61.428571,0.0893"
inkscape:connector-curvature="0" />
</g>
</g>
<g
id="g4310"
transform="matrix(0,-1,1,0,-301.02583,496.09408)"
style="stroke:#800000">
<g
id="g4312"
transform="matrix(0.45312624,0,0,0.45312624,67.778895,161.56232)"
style="stroke:#800000;stroke-width:4.08936834;stroke-miterlimit:4;stroke-dasharray:none">
<path
inkscape:connector-curvature="0"
d="M 86.543713,480.95398 98.329419,467.60577 86.454423,454.25756 m -49.668709,13.28817 61.428571,0.0893"
style="fill:none;fill-rule:evenodd;stroke:#800000;stroke-width:4.08936834;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4314" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

25
dossier Normal file
View File

@ -0,0 +1,25 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\title{TRAITEMENT D'IMAGE\\Débruitage}
\author{Adrien MARQUÈS - Alexis HELSON }
\date{Septembre 2015}
\begin{document}
\maketitle
% Introduction
\section{Introduction}
Cette étude vise à améliorer les méthodes de débruitage d'images, et donc de développer un programme universel de débruitage, c'est-à-dire qu'il réduirait convenablement tout type de bruit. Le programma est développé en Python2 pour la simplicité et efficacité du langage. Le code sur Github à l'adresse suivante:\\
\begin{center} \textcolor{blue}{https://github.com/xdrm-brackets/bmp\_python} \end{center}
\end{document}

109
dossier.tex Normal file
View File

@ -0,0 +1,109 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{amsmath,amsfonts}
\usepackage{lmodern}
% Définition des symboles
\newcommand{\N}{\mathbb{N}} % \N pour les entiers naturels
\newcommand{\R}{\mathbb{R}} % \R pour les réels
\title{TRAITEMENT D'IMAGE\\Débruitage}
\author{Adrien MARQUÈS - Alexis HELSON }
\date{Septembre 2015}
\begin{document}
\maketitle
% Introduction
\section{Introduction}
Cette étude vise à améliorer les méthodes de \emph{nettoyage d'image}, et donc de développer un programme universel de débruitage, c'est-à-dire qu'il réduirait convenablement tout type de bruit, dépendant toutefois de paramètres adaptés à chacun.
\begin{center} \emph{Avant d'essayer d'améliorer quelque chose, il faut le comprendre.} \end{center}
Pour cela, nous avont donc étudié:
\begin{description}
\item Le débruitage standard
\item Le filtrage par convolution
\item La détection de formes
\item La détection de contours
\end{description}
Le programme a été développé en Python2 pour la simplicité et efficacité du langage. Le code est sur Github à l'adresse suivante:
\begin{center} \textcolor{blue}{https://github.com/xdrm-brackets/bmp\_python} \end{center}
% Structure du programme
\section{Architecture et structure du programme}
\begin{description}
\item \textbf{racine}
\begin{description}
\item \textbf{main.py} \hfill \\
Programme principal, il affiche une interface (en console) permettant d'éxécuter une des opérations disponibles.
\item \textbf{tests.py} \hfill \\
Contient les corps de toutes le opérations pouvant être choisies dans le programme principal.
\item \textbf{BMPFile.py} \hfill \\
Contient les structures \emph{BMPFile}, \emph{BMPContent}, \emph{BMPHeader}, permettant d'encoder et de décoder un fichier BMP. Ainsi que la strucure \emph{RGBPixel} permettant de coder un pixel.
\item \textbf{Noise.py} \hfill \\
Contient tout les traitements tels que les bruitages et débruitages, les filtres, et les détections de formes et contours. (il importe tout le dossier \emph{utility})
\begin{description}
\item \textbf{SaltAndPepper\_Noise.py} \hfill \\
Contient les méthodes de bruitage et débruitage du bruit de type \emph{Poivre \& Sel}.
\item \textbf{Additive\_Noise.py} \hfill \\
Contient les méthodes de bruitage et débruitage du bruit de type \emph{additif}.
\item \textbf{Gaussian\_Noise.py} \hfill \\
Contient les méthodes de bruitage et débruitage du bruit de type \emph{gaussien}.
\item \textbf{Multiplicative\_Noise.py} \hfill \\
Contient les méthodes de bruitage et débruitage du bruit de type \emph{multiplicatif}.
\item \textbf{Color\_Noise.py} \hfill \\
Contient les méthodes de bruitage et débruitage du bruit de type \emph{multicolore}.
\item \textbf{Filter.py} \hfill \\
Contient les méthodes de filtrage (standard ou par convolution).
\item \textbf{Shape.py} \hfill \\
Contient les méthodes de détection de formes et de contours
\end{description}
\end{description}
\end{description}
Le fichier \textbf{tests.py} utilise la structure \emph{BMPFile} afin de lire/écrire les fichiers ainsi que la structure \emph{Noise} qui contient toutes les méthodes de bruitage et de débruitage, les filtres et les détections de formes et de contours. Le fichier \emph{\textbf{Noise.py}} (qui contient la structure de même nom) appelle les différents fichiers contenus dans le dossier \textbf{utility}. Les fichiers contenus dans \textbf{utility} peuvent être:\\
- Un fichier qui contient toutes les méthodes pour un type de bruit (bruitage et débruitage)\\
- Le fichier \emph{Filters.py} qui contient toutes les méthodes de filtrage\\
- Le fichier \emph{Shapes.py} qui contient toutes les méthodes de détection de formes et contours
% Fichiers
\section{Fichiers}
La lecture et l'écriture des fichiers se fait octet par octet, la structure \emph{BMPFile} permet de transformer les octets d'un fichier BMP en matrice de pixels, et inversement, de transformer une matrice de pixels en fichier BMP. Les types d'encodage des couleurs pris en charge sont 8 (nuance de gris) bits par pixel, et 24 (rouge, vert, bleu) bits par pixels. Les pixels sont du type \emph{RGBPixel} qui contient les coordonnées du pixel (x, y), ainsi que la couleur du pixel au format RGB (rouge, vert, bleu) chaque nuance prend sa valeur entre 0 et 255.
\\\par Le seul format pris en charge est le format BMP, pour accepter d'autres formats (jpeg, png, gif, etc), il suffirait de récupérer une matrice de pixels (\emph{RGBPixel}), car toutes les méthodes agissent uniquement sur la matrice. Il serait ainsi possible de convertir une image vers un autre format.
% Débruitage standard
\section{Le bruit Poivre \& Sel}
\textbf{Définition graphique}\par
L'image est parsemée de pixels ayant une teinte extrême (blancs ou noirs) sans rapport avec leur contexte (voisinage).
\-
\\*
\textbf{Bruitage}\par
Soit \emph{width} et \emph{height}, respectivement la largeur et la hauteur de l'image en nombre de pixels.
L'image est bruitée par rapport à \emph{seuil} le seuil de bruitage.
\begin{align*}
&\text{Soit:}\\
&\text{ - }width\in\N\text{, la largeur de l'image}\\
&\text{ - }height\in\N\text{, la hauteur de l'image}\\
&\text{ - }seuil\in\R\text{, le seuil de bruitage, tel que }seuil\in[0;1]\\
&\text{ - }n = seuil \times width \times height\text{, le nombre de pixels à traiter}\\
&\text{ - }(x, y) \text{, tel que} (x, y)\in\N^2\text{, et }x\in[0,width[, y\in[0,height[
\end{align*}
\emph{n} couples \emph{(x, y)}
\end{document}

View File

@ -1,583 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 744.09448819 1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="Salt&amp;Pepper.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="205.98747"
inkscape:cy="980.13082"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g4297"
style="">
<rect
y="33.229847"
x="106.23346"
height="24.285715"
width="24.285715"
id="rect4142"
style="fill:#aa0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#ff2a2a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4140"
width="24.285715"
height="24.285715"
x="106.23346"
y="85.801254" />
<rect
y="59.515553"
x="106.23346"
height="24.285715"
width="24.285715"
id="rect4136"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#d40000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4146"
width="24.285715"
height="24.285715"
x="132.51917"
y="33.229847" />
<rect
y="85.801254"
x="132.51917"
height="24.285715"
width="24.285715"
id="rect4150"
style="fill:#ff8080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
y="59.515553"
x="132.51917"
height="24.285715"
width="24.285715"
id="rect4152"
style="fill:#ff5555;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#800000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4144"
width="24.285715"
height="24.285715"
x="79.947739"
y="33.229847" />
<rect
y="85.801254"
x="79.947739"
height="24.285715"
width="24.285715"
id="rect4148"
style="fill:#d40000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#aa0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4154"
width="24.285715"
height="24.285715"
x="79.947739"
y="59.515553" />
<text
sodipodi:linespacing="125%"
id="text4242"
y="48.042065"
x="86.327255"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="48.042065"
x="86.327255"
id="tspan4244"
sodipodi:role="line">1,1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="111.69331"
y="48.069801"
id="text4246"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4248"
x="111.69331"
y="48.069801"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">1,2</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4250"
y="48.069801"
x="138.01529"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="48.069801"
x="138.01529"
id="tspan4252"
sodipodi:role="line">1,3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="138.52954"
y="74.355507"
id="text4254"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4256"
x="138.52954"
y="74.355507"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">2,3</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4258"
y="100.64121"
x="138.45273"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="100.64121"
x="138.45273"
id="tspan4260"
sodipodi:role="line">3,3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="112.13074"
y="100.64121"
id="text4262"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4264"
x="112.13074"
y="100.64121"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">3,2</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4266"
y="100.64121"
x="86.764679"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="100.64121"
x="86.764679"
id="tspan4268"
sodipodi:role="line">3,1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="86.841499"
y="74.355507"
id="text4270"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4272"
x="86.841499"
y="74.355507"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">2,1</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4274"
y="74.355507"
x="112.13501"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:'Sawasdee Bold';fill:#ffffff"
y="74.355507"
x="112.13501"
id="tspan4276"
sodipodi:role="line">2,2</tspan></text>
</g>
<g
id="g4326"
transform="translate(300.00002,0)"
style="">
<rect
style="fill:#005544;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4328"
width="24.285715"
height="24.285715"
x="106.23346"
y="33.229847" />
<rect
y="85.801254"
x="106.23346"
height="24.285715"
width="24.285715"
id="rect4330"
style="fill:#4400aa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4332"
width="24.285715"
height="24.285715"
x="106.23346"
y="59.515553" />
<rect
y="33.229847"
x="132.51917"
height="24.285715"
width="24.285715"
id="rect4334"
style="fill:#00aa88;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#4400aa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4336"
width="24.285715"
height="24.285715"
x="132.51917"
y="85.801254" />
<rect
style="fill:#5500d4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4338"
width="24.285715"
height="24.285715"
x="132.51917"
y="59.515553" />
<rect
y="33.229847"
x="79.947739"
height="24.285715"
width="24.285715"
id="rect4340"
style="fill:#668000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#5500d4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4342"
width="24.285715"
height="24.285715"
x="79.947739"
y="85.801254" />
<rect
y="59.515553"
x="79.947739"
height="24.285715"
width="24.285715"
id="rect4344"
style="fill:#677821;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="86.327255"
y="48.042065"
id="text4346"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4348"
x="86.327255"
y="48.042065"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">1,1</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4350"
y="48.069801"
x="111.69331"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="48.069801"
x="111.69331"
id="tspan4352"
sodipodi:role="line">1,2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="138.01529"
y="48.069801"
id="text4354"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4356"
x="138.01529"
y="48.069801"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">1,3</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4358"
y="74.355507"
x="138.52954"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="74.355507"
x="138.52954"
id="tspan4360"
sodipodi:role="line">2,3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="138.45273"
y="100.64121"
id="text4362"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4364"
x="138.45273"
y="100.64121"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">3,3</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4366"
y="100.64121"
x="112.13074"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="100.64121"
x="112.13074"
id="tspan4368"
sodipodi:role="line">3,2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="86.764679"
y="100.64121"
id="text4370"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4372"
x="86.764679"
y="100.64121"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">3,1</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4374"
y="74.355507"
x="86.841499"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="74.355507"
x="86.841499"
id="tspan4376"
sodipodi:role="line">2,1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="112.13501"
y="74.355507"
id="text4378"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4380"
x="112.13501"
y="74.355507"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:'Sawasdee Bold';fill:#000000">2,2</tspan></text>
</g>
<g
transform="translate(150.00002,0)"
id="g4382"
style="">
<rect
y="33.229847"
x="106.23346"
height="24.285715"
width="24.285715"
id="rect4384"
style="fill:#338000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#225500;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4386"
width="24.285715"
height="24.285715"
x="106.23346"
y="85.801254" />
<rect
y="59.515553"
x="106.23346"
height="24.285715"
width="24.285715"
id="rect4388"
style="fill:#4d4d4d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#00aa00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4390"
width="24.285715"
height="24.285715"
x="132.51917"
y="33.229847" />
<rect
y="85.801254"
x="132.51917"
height="24.285715"
width="24.285715"
id="rect4392"
style="fill:#338000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
y="59.515553"
x="132.51917"
height="24.285715"
width="24.285715"
id="rect4394"
style="fill:#338000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#225500;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4396"
width="24.285715"
height="24.285715"
x="79.947739"
y="33.229847" />
<rect
y="85.801254"
x="79.947739"
height="24.285715"
width="24.285715"
id="rect4398"
style="fill:#225500;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1" />
<rect
style="fill:#225500;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.03699994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:19.40000534;stroke-opacity:1"
id="rect4400"
width="24.285715"
height="24.285715"
x="79.947739"
y="59.515553" />
<text
sodipodi:linespacing="125%"
id="text4402"
y="48.042065"
x="86.327255"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="48.042065"
x="86.327255"
id="tspan4404"
sodipodi:role="line">1,1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="111.69331"
y="48.069801"
id="text4406"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4408"
x="111.69331"
y="48.069801"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">1,2</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4410"
y="48.069801"
x="138.01529"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="48.069801"
x="138.01529"
id="tspan4412"
sodipodi:role="line">1,3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="138.52954"
y="74.355507"
id="text4414"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4416"
x="138.52954"
y="74.355507"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">2,3</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4418"
y="100.64121"
x="138.45273"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="100.64121"
x="138.45273"
id="tspan4420"
sodipodi:role="line">3,3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="112.13074"
y="100.64121"
id="text4422"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4424"
x="112.13074"
y="100.64121"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">3,2</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4426"
y="100.64121"
x="86.764679"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff"
y="100.64121"
x="86.764679"
id="tspan4428"
sodipodi:role="line">3,1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="86.841499"
y="74.355507"
id="text4430"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4432"
x="86.841499"
y="74.355507"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:Sawasdee;fill:#ffffff">2,1</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4434"
y="74.355507"
x="112.13501"
style="font-style:normal;font-weight:normal;font-size:8.73996544px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Sawasdee;-inkscape-font-specification:'Sawasdee Bold';fill:#ffffff"
y="74.355507"
x="112.13501"
id="tspan4436"
sodipodi:role="line">2,2</tspan></text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 30 KiB