ALGORITHMES DE COMPRESSION D'IMAGES ET CODES DE ...

ALGORITHMES DE COMPRESSION D'IMAGES ET CODES DE ... ALGORITHMES DE COMPRESSION D'IMAGES ET CODES DE ...

tel.archives.ouvertes.fr
from tel.archives.ouvertes.fr More from this publisher
23.01.2014 Views

76 Solutions envisageables: 1. coder en ~ibut de contour la longueur du contour. 2. terminer chaque contour par une situation impossible. 3. ne rien coder ... puisque tout contour est fermi, et notre codage exact. En suivant le contour on doit retomber sur le point de dipart, qui indique sa fin. Si l'on envisage des diformations ultirieures sur les contours il faut choisir parmi les deux premJ.eres solutions. Celle qui nous parait la plus intiressante est celle d'un escalier impossible constitui d'une marche de taille nulle et ne contenant que la marche finale. tel-00839591, version 1 - 28 Jun 2013 Ceci donne le code: (siparateur)(type)(taille marche)(marche finale) ( 1) ( 000) ( 0 ••• 0) (11) donc un code de (6 + n) bits, où n est la longueur du code de la première classe des tailles des marches. 5.1.4. Algorithme de recherche des escaliers.

77 1* [intervalle] désigne [taillemarche-1 , taillemarche+1l */ Pour chaque contour 1* initialisations */ lire(lien) marche:=lien; comptmarche:=1; ESCALIER:= FAUX; tel-00839591, version 1 - 28 Jun 2013 tant qu'il existe un lien faire lire(lien) si (ESCALIER) alors si (lien=marche) alors comptmarche := comptmarche+1; si (comptmarche > taillemarche+1) alors terminer_escalier; ESCALIER := FAUX; comptmarche :=1; fin si sinon si (lien=contremarche) alors si (comptmarche >O) alors si (comptmarche € [intervalle]) alors coder_marche(comptmarche); comptmarche:= 0; sinon /* la dernière marche vue est trop courte *1 terminer_escalier; coder_contremarche; taillemarche:=comptmarche; démarrer_escalier (marche,lien); /*meme type*/ comptmarche:=O; fin si sinon /* on a deux liens contremarche consécutifs *1 terminer_escalier; marche:=lien; comptmarche:=2; ESCALIER:=FAUX; fin si sinon 1* le lien n'est pas une marche, ni une contremarche *1 si (comptmarche >0) alors si (comptmarche€[intervalle]) alors coder_marche(comptmarche); terminer_escalier; marche:=lien; comptmarche:=1; ESCALIER:=FAUX; sinon terminer_escalier; coder_contremarche; taillemarche:=comptmarche; démarrer_escalier(marche,lien); comptmarche:=O; fin si sinon

77<br />

1* [intervalle] désigne [taillemarche-1 , taillemarche+1l */<br />

Pour chaque contour<br />

1* initialisations */<br />

lire(lien)<br />

marche:=lien;<br />

comptmarche:=1;<br />

ESCALIER:= FAUX;<br />

tel-00839591, version 1 - 28 Jun 2013<br />

tant qu'il existe un lien faire<br />

lire(lien)<br />

si (ESCALIER) alors<br />

si (lien=marche) alors<br />

comptmarche := comptmarche+1;<br />

si (comptmarche > taillemarche+1) alors<br />

terminer_escalier;<br />

ESCALIER := FAUX;<br />

comptmarche :=1;<br />

fin si<br />

sinon<br />

si (lien=contremarche) alors<br />

si (comptmarche >O) alors<br />

si (comptmarche € [intervalle]) alors<br />

coder_marche(comptmarche);<br />

comptmarche:= 0;<br />

sinon /* la dernière marche vue est trop courte *1<br />

terminer_escalier;<br />

coder_contremarche;<br />

taillemarche:=comptmarche;<br />

démarrer_escalier (marche,lien); /*meme type*/<br />

comptmarche:=O;<br />

fin si<br />

sinon /* on a deux liens contremarche consécutifs *1<br />

terminer_escalier;<br />

marche:=lien;<br />

comptmarche:=2;<br />

ESCALIER:=FAUX;<br />

fin si<br />

sinon 1* le lien n'est pas une marche, ni une contremarche *1<br />

si (comptmarche >0) alors<br />

si (comptmarche€[intervalle]) alors<br />

coder_marche(comptmarche);<br />

terminer_escalier;<br />

marche:=lien;<br />

comptmarche:=1;<br />

ESCALIER:=FAUX;<br />

sinon<br />

terminer_escalier;<br />

coder_contremarche;<br />

taillemarche:=comptmarche;<br />

démarrer_escalier(marche,lien);<br />

comptmarche:=O;<br />

fin si<br />

sinon

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!