Keywords:

Dans cette thèse, nous allons proposer des modèles et des méthodes mathématiques basées sur les équations aux dérivées partielles permettant de compresser des images ainsi que des vidéos. Ces nouveaux algorithmes de compression seront également capables de prendre en compte d'éventuelles détériorations de l'image dues aux capteurs d'acquisitions, au stockage ou à la transmission de celles-ci. Ainsi, le but serait de pouvoir enlever une partie de ces détériorations de l'image (bruit) via l'action de la compression plutôt que d'effectuer une étape de pré-filtrage sur l'image à compresser. Plus précisément, dans la première partie, nous allons proposer un critère mathématique permettant de localiser les meilleurs pixels à garder au sein d'une image dans le cas où la méthode d'inpainting, permettant la reconstruction de l'image, est l'équation de la chaleur (avec les conditions aux bords adéquates). Pour cela, nous écrirons le problème de compression comme un problème d'optimisation de forme, dont le coût sera une "erreur" entre l'image d'origine et l'image décompressée/reconstruite. L'existence d'une solution à ce problème sera démontrée dans le cadre de la Γ-convergence. Dans un premier temps, nous nous restreindrons au coût L 2 , important pour le débruitage, ainsi qu'à la première itération d'un schéma explicite en temps de l'équation de la chaleur. Nous pourrons expliciter un critère de sélection au moyen du gradient topologique et un critère relâché en imposant qu'un ensemble admissible soit une réunion de "fat pixels" (boules dont on fait tendre le rayon vers 0). Nous étendrons ce critère au cas d'une procédure itérative de sélection des pixels en considérant cette fois-ci une itération quelconque de l'inpainting, améliorant ainsi les performances de la méthode. Dans un second temps, nous étudierons le cas d'un coût plus général, dont un critère sera donné par la méthode de l'adjoint. Des résultats numériques seront alors présentés dans le cas du coût L 2 et du coût L 1 , également important pour la suppression du bruit dans une image. Dans la seconde partie, nous nous intéresserons aux cas de la compression vidéo en étudiant le mouvement existant entre deux images consécutives. Cette estimation du mouvement sera faite grâce au flot optique pour de petits déplacements. Nous implémenterons quelques méthodes de calcul du flot optique dans le but de pouvoir les utiliser pour la compression de vidéos dans la partie suivante. Ensuite, nous proposerons un nouveau modèle de flot optique utilisant le transport optimal et la formule de Benamou-Brenier. Enfin, dans la troisième partie, nous implémenterons un codec vidéo complet et nous le comparerons avec les codecs existants dans la vie courante. Plus particulièrement, nous comparerons la taille effective de la vidéo compressée ainsi que la qualité de la vidéo décompressée. Pour finir, nous proposerons du calcul sur GPU afin d'accélérer la résolution numérique des équations.

Mots clés

Compression vidéo -Optimisation de formes -Inpainting d'image -Flot optique -Γconvergence -Transport optimal -Calcul numérique -GPU I

 [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]et [START_REF] Chizhov | Efficient Data Optimisation for Harmonic Inpainting with Finite Elements[END_REF] 2.2 when the input image is noiseless (σ = 0). . . . . Avec le déploiement massif de l'internet haut-débit partout dans le monde au cours de ces dernières années, les services de streaming de musiques, de vidéos et plus récemment de jeux vidéos ont connu un véritable essor. Ainsi, de nouvelles problématiques ont émergé concernant l'efficacité des méthodes de compression des flux de données, comme par exemple le taux de compression pour optimiser la consommation de données, la qualité visuelle et auditive, le temps de calcul pour diminuer le temps de latence ou encore la consommation énergétique. Le but de la compression est de minimiser la taille en octets d'une image/vidéo sans réduire la qualité de l'image à un niveau inacceptable. Comme les données d'image et de vidéo occupent une grande partie de la bande passante pendant la transmission, elles doivent être compressées sans perte ou avec une faible perte de qualité. La compression d'une vidéo est sensiblement différente de la compression de données binaires brutes puisque les données contenues dans une image ou dans une vidéo sont fortement corrélées. Ces redondances sont de trois types : les redondances à l'intérieur d'une image de la vidéo, appelées redondances spatiales, les redondances entre les images, appelées redondances temporelles et les redondances psycho-visuelles dues aux informations qui sont ignorées par le système visuel humain.

Masks and reconstructions for

List of Algorithms

Introduction générale et résumé

État-de-l'art de la compression vidéo

Une image est un signal 2D traité par le système visuel humain. Les signaux représentant les images sont généralement sous forme analogique, mais pour le traitement, le stockage et la transmission par des applications informatiques, ils sont convertis de la forme analogique à la forme numérique. Une image numérique est un tableau bidimensionnel de pixels.

La compression de données ou codage source est l'opération informatique consistant à transformer une séquence de bits A en une séquence de bits B plus courte permettant de restituer la même information, ou une information similaire, à l'aide d'un algorithme de décompression [START_REF] Bull | Intelligent image and video compression: communicating pictures[END_REF][START_REF] Joshi | Image and video compression: fundamentals, techniques, and applications[END_REF][START_REF] Megala | State-Of-The-Art In Video Processing: Compression, Optimization And Retrieval[END_REF][START_REF] Salomon | Data compression: the complete reference[END_REF]. Un algorithme de compression sans perte restitue après décompression une séquence de bits strictement identique à l'original. Les algorithmes de compression sans perte sont utilisés pour les archives, les fichiers exécutables ou les textes. Avec un algorithme de compression avec perte, la séquence de bits obtenue après décompression est plus ou moins proche de l'original selon la qualité souhaitée. Ils sont utiles pour les images, le son et la vidéo. La compression d'images ou de vidéos est une application de la compression de données aux images numériques. Le but de cette compression est de réduire la redondance des données (compression sensing) dans une image afin qu'elle puisse être stockée sans prendre beaucoup de place ou transmise rapidement.

Dans cette section, nous proposons une revue non exhaustive des différentes méthodes de compression. Inspirés par [START_REF] Netravali | Picture coding: A review[END_REF], nous proposons une classification des principales méthodes de compression d'image/vidéo dans la Figure 1.

Codage

Le codage par transformation

Dans le codage par transformation, on souhaite exploiter la corrélation spatial des pixels d'une image afin de pouvoir retirer de l'information sans trop détériorer la qualité de l'image. Pour cela, on divise une image en sous-images, puis celles-ci sont transformées en un ensemble de coefficients dé-corrélés grâce à une fonction de transformation. Les coefficients sont ensuite échantillonnés et codés pour la transmission à la place des pixels originaux de l'image. Une grande partie de la compression résulte de l'élimination des coefficients suffisamment petits et de l'échantillonnage des autres, en fonction de la qualité de l'image voulue. Au niveau du récepteur, les bits reçus sont décodés en coefficients de transformation. Une transformation inverse est appliquée pour reconstruire l'image.

Voici quelques exemples de transformées utilisées dans les codecs : la transformée en ondelettes discrète (DWT) [START_REF] Wang | A wavelet-based video codec and its performance[END_REF], la transformée de Karhunen-Loève [START_REF] Torres-Urgell | Adaptive image compression using Karhunen-Loeve transform[END_REF], la transformée de Hadamard [START_REF] Pratt | Hadamard transform image coding[END_REF], la transformée en cosinus discrète [START_REF] Ahmed | Discrete Cosine Transform[END_REF], la transformée en rigidlets [START_REF] Do | The Finite Ridgelet Transform for Image Representation[END_REF], ou encore la transformée de Fourier discrète [START_REF] Gilbert | Near-optimal sparse fourier representations via sampling[END_REF]. Nous allons voir dans la suite que la méthode de codage par transformation est au coeur du fonctionnement des codecs existants de la vie de tous les jours, ainsi que détailler la transformée en cosinus.

Enfin, en 1983, les auteurs ont proposé dans [START_REF] Burt | The Laplacian Pyramid as a Compact Image Code[END_REF] une méthode de compression d'image à mi-chemin entre le codage par transformation et le codage prédictif (voir paragraphe suivant). Cette méthode consiste en la création d'une pyramide de Laplace, c'est-à-dire que l'on va appliquer une série de filtres de plus en plus lissants et réduire de plus en plus la taille de l'image. On obtient ainsi de nouvelles images, (g i ) i , et on sauvegarde les différences entre deux images consécutives i.e. g i -g i+1 . Ces différences sont en effet fortement dé-corrélées et très régulières : on peut les sous-échantillonner sans perdre trop d'informations.

Le codage prédictif

Dans le codage prédictif, la redondance des données vidéo est déterminée à partir de la corrélation des pixels voisins, qui existe dans les images ou entre les images. Ainsi, la base du codage prédictif est de prédire la valeur d'un pixel à partir des valeurs de pixels qui ont déjà été transmises.

Le codage prédictif le plus courant est celui utilisant des méthodes de compensation de mouvements. La compensation de mouvements en informatique est une technique algorithmique utilisée pour prédire une image dans une vidéo, compte tenu des images précédentes et/ou futures, en tenant compte du mouvement de la caméra et/ou des objets dans la vidéo.

L'exemple le plus simple d'algorithme de compensation de mouvements est la différenciation des images. Cette méthode n'utilise aucun modèle de mouvements : l'image de référence est, sans aucune modification, directement utilisée comme prédiction pour l'image actuelle. La méthode connue sous le nom de modulation d'impulsion codée différentielle (DPCM), quantifie l'erreur de prédiction (c'est-à-dire la différence entre le pixel réel et la valeur du pixel prédit) puis la code. Étant donné que les pixels entre les images sont fortement corrélés, l'erreur de prédiction tend à être faible.

Un autre exemple d'algorithmes sont les algorithmes basés sur une estimation du mouvement. Il s'agit d'un processus de détermination des vecteurs de mouvements qui décrivent la transformation d'une image à une autre, généralement à partir d'images adjacentes dans une séquence vidéo. Il s'agit d'un problème mal posé, car le mouvement est en trois dimensions, mais les images sont une projection sur un plan 2D. Les vecteurs de mouvements peuvent se rapporter à l'image entière comme dans le flot optique [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF] ou à des parties spécifiques, comme des blocs rectangulaires, comme les algorithmes de block-matching (BMA) [START_REF] Netravali | Motion-compensated television coding: Part I[END_REF][START_REF] Jain | Displacement Measurement and Its Application in Interframe Image Coding[END_REF][START_REF] Ninomiya | A Motion-Compensated Interframe Coding Scheme for Television Pictures[END_REF][START_REF] Ghanbari | The cross-search algorithm for motion estimation (image coding)[END_REF][START_REF] Jiang | A fast BMA based on combining search candidate subsampling and APDS[END_REF][START_REF] Jia | Directional Cross Diamond Search Algorithm for Fast Block Motion Estimation[END_REF][START_REF] Choudhury | Dynamic Block Matching Algorithm (BMA) Scheduling Algorithm for Fast and Accurate Motion Estimation[END_REF]. Une fois le mouvement estimé, un algorithme est invoqué pour utiliser les informations de mouvements provenant de l'estimation du mouvement pour modifier le contenu de l'image de référence, selon le modèle de mouvements, afin de produire une prédiction de l'image actuelle. La prédiction est appelée prédiction à compensation de mouvements ou trame déplacée (DF) [START_REF] Wu | Video Compression through Image Interpolation[END_REF].

Les prédicteurs linéaires (par exemple [START_REF] Maragos | Two-dimensional linear prediction and its application to adaptive predictive coding of images[END_REF]) ont été étudiés en utilisant la théorie générale de la prédiction linéaire [START_REF] Harrison | Experiments with linear prediction in television[END_REF]. Dans cet article, la prédiction pour le prochain échantillon de signal est simplement la somme des échantillons des signaux précédents, chacun étant multiplié par un facteur de pondération approprié.

Dans [START_REF] Stuller | Interframe television coding using gain and displacement compensation[END_REF], les auteurs présentent des algorithmes pour prédire les changements d'intensité dans des images de télévision successives.

Enfin, il existe des méthodes utilisant du machine learning pour obtenir l'estimation d'un mouvement comme dans [START_REF] Shi | AlphaVC: High-Performance and Efficient Learned Video Compression[END_REF]. chaque vecteur d'image est codé par son index dans le dictionnaire. Ainsi, chaque image est représentée par une séquence d'indices.

La compression fractale repose sur la détection de la récurrence des motifs [START_REF] Barnsley | Iterated function systems and the global construction of fractals[END_REF][START_REF] Ismail | Studying the effect of down sampling and spatial interpolation on fractal image compression[END_REF][START_REF] Wang | VSA-based fractal image compression[END_REF]. Cette méthode convient mieux aux textures et aux images naturelles, car elle repose sur le fait que certaines parties d'une image ressemblent souvent à d'autres parties de la même image.

Une méthode utilisant du machine learning peut être associé au codage par quantification [START_REF] Li | Deep Image Compression with Residual Learning[END_REF].

Le codage par interpolation

Dans le codage par interpolation, un sous-ensemble d'éléments de l'image est transmis et les autres sont interpolés [START_REF] Hang | Motion Estimation for Video Coding Standards[END_REF]. Cette technique de codage a été largement étudiée dans le passé pour le codage numérique des images [START_REF] Kortman | Redundancy reduction-A practical method of data compression[END_REF][START_REF] Hochman | Application of redundancy reduction to television bandwidth compression[END_REF]. La qualité de l'image qui en résulte dépend du nombre et du type d'échantillons éliminés et de la méthode d'interpolation. La plupart des méthodes d'interpolation ont utilisé des moyennes pondérées, soit en utilisant des lignes droites, soit des polynômes de degré supérieur [START_REF] Davisson | Data compression using straight line interpolation[END_REF][START_REF] Distasi | Image compression by B-tree triangular coding[END_REF][START_REF] Laurent | Image compression by linear splines over adaptive triangulations[END_REF][START_REF] Marwood | Representing Images in 200 Bytes: Compression via Triangulation[END_REF]. Il semble que l'interpolation à l'aide de lignes droites soit assez efficace et que l'interpolation à l'aide de polynômes de degré supérieur n'apporte pas grand-chose.

Une autre méthode de codage par interpolation se basant sur les zero-crossings a été proposée dans [START_REF] Curtis | Reconstruction of two-dimensional signals from threshold crossings[END_REF][START_REF] Rotem | Image Reconstruction from Zero Crossings, Acoustics, Speech and Signal Processing[END_REF]. La détection des arêtes d'une image est réduite à la résolution du problème des zero-crossings. Cette méthode de compression utilise une extension du théorème de Logan [START_REF] Logan | Information in the zero crossings of bandpass signals[END_REF] et l'interpolation spatio-temporelle proposée dans [START_REF] Poggio | Zero-Crossings and Spatiotemporal Interpolation in Vision: Aliasing and Electrical Coupling between Sensors[END_REF].

Il existe aussi des méthodes basées sur l'inpainting d'images [START_REF] Bertalmio | Image inpainting[END_REF]. L'objectif est de trouver et de sauvegarder les meilleurs pixels dans une image pour pouvoir reconstruire les pixels manquants grâce à un problème d'inpainting. On détaillera ces méthodes dans la partie I de cette thèse.

Dans [START_REF] Jassim | Image Interpolation Using Kriging Technique for Spatial Data[END_REF][START_REF] Vidhya | Kriging Interpolation Technique with Triangulated Irregular Network for Image Compression Using Image Inpainting[END_REF] les auteurs proposent d'utiliser la technique de Kriging comme opérateur d'interpolation. La technique de Kriging est une méthode d'interpolation qui permet de produire des prédictions de valeurs non observées à partir d'observations de sa valeur à des endroits proches. Elle confère des poids à chaque point en fonction de sa distance par rapport à la valeur inconnue. En fait, ces prédictions sont traitées comme des combinaisons linéaires pondérées des valeurs connues. La méthode de Kriging est plus précise que l'interpolation polynomiale lorsque la valeur non observée est suffisamment proche des valeurs observées.

Une autre méthode, proposée dans [START_REF] Candes | Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information[END_REF], consiste à reconstruire une image à partir de la connaissance partielle de ses coefficients de Fourier. L'interpolation est donc réalisée dans le domaine fréquentiel au lieu du domaine spatial.

Il existe également des méthodes utilisant des collections de points d'intérêt de l'espace d'échelle (scale space) [START_REF] Weickert | Linear Scale-Space has First been Proposed in Japan[END_REF] comme entrée pour l'algorithme de reconstruction comme [START_REF] Kanters | On Image Reconstruction from Multiscale Top Points[END_REF]. Un point d'intérêt (top point) est un point critique (le gradient de l'image est nul) auquel le déterminant de la hessienne de l'image est également nul. L'interpolation utilisée est l'algorithme de reconstruction proposé par Janssen [START_REF] Janssen | A Linear Image Reconstruction Framework Based on Sobolev Type Inner Products[END_REF]. Celui-ci tente de minimiser une fonction d'énergie régularisée.

Un code en chaîne (chain code) [START_REF] Freeman | On the Encoding of Arbitrary Geometric Configurations[END_REF][START_REF] Zalik | Chain code lossless compression using move-to-front transform and adaptive run-length encoding[END_REF] est une méthode de compression sans perte pour les images binaires basée sur la segmentation d'image. Le principe de base des codes en chaîne est de coder séparément chaque composante connectée dans l'image. Pour chacune de ces régions, un point sur la frontière est sélectionné et ses coordonnées sont transmises. Le codeur se déplace ensuite sur le bord de la région et, à chaque étape, transmet un symbole représentant la direction de ce mouvement jusqu'à ce que le codeur revienne à la position de départ.

Enfin, il existe des méthodes utilisant du machine learning comme par exemple [5].

Le codage symbolique

Le codage symbolique est une méthode de compression des données, généralement sans perte, qui code les symboles en utilisant une quantité de bits inversement proportionnelle à la probabilité des symboles. Cette étape élimine la redondance du codage en utilisant des techniques comme le codage de Huffman, le codage arithmétique ou le codage Lempel-Ziv-Welch (LZW) [START_REF] Salomon | Data compression: the complete reference[END_REF]. Les idées de base du codage arithmétique et du codage de Huffman trouvent leur origine dans les travaux originaux de Shannon [START_REF] Shannon | A mathematical theory of communication[END_REF].

Le codage arithmétique [START_REF] Rissanen | Arithmetic Coding[END_REF][START_REF] Mahoney | Adaptive Weighing of Context Models for Lossless Data Compression[END_REF] et le codage de Huffman [START_REF] Huffman | A Method for the Construction of Minimum-Redundancy Codes[END_REF] attribuent un numéro unique à une séquence entière qui agit comme une étiquette pour cette séquence. En d'autres termes, ce nombre est un code pour cette séquence : une représentation binaire de ce nombre est un code binaire pour cette séquence. Comme cette étiquette est unique, en théorie, le décodeur peut reconstruire toute la séquence à partir de cette étiquette. Afin de mettre en oeuvre cette idée, nous avons besoin d'une bijection entre la séquence et l'étiquette.

Le codage Lempel-Ziv-Welch [START_REF] Welch | A Technique for High-Performance Data Compression[END_REF] est un codage par dictionnaire (ou codage par facteur). Comme son nom l'indique, ce codage est basé sur un dictionnaire ou une liste de mots. Ici, l'objectif va être de remplacer une séquence de symboles (un mot) par sa position dans le dictionnaire.

Enfin, le codage par plages (RLE) [START_REF] Robinson | Results of a prototype television bandwidth compression scheme[END_REF] est une forme de compression de données sans perte dans laquelle les séquences où le même symbole apparaît plusieurs fois de manière consécutive, sont stockées comme un symbole et son nombre de répétition.

Historique des codecs existants

Le premier codec vidéo fut le H.120 et a été proposé en 1984. Celui-ci était basé sur la modulation par codage impulsionnel différentielle (DPCM). La modulation par codage impulsionnel est une méthode utilisée pour représenter numériquement des signaux analogiques échantillonnés. C'est la forme standard de l'audio numérique dans les ordinateurs, les CD audio ou la téléphonie numérique.

En 1988, le standard H.261 fut le premier à utiliser la transformée en cosinus discrète (DCT) et la notion de compensation de mouvements (voir la section suivante). Suite à ce standard, le MPEG-1 à été proposé en 1991 comme une évolution du H.261.

À partir de 1994, la norme MPEG-2/H.262 fut utilisée pour stocker des vidéos sur les DVD. En 1999, le codec MPEG-4/H.263 introduisit un nouveau codage entropique basé sur des codes à longueur variable. de l'image. Par exemple, le standard JPEG [START_REF] Wallace | The JPEG still picture compression standard[END_REF] fonctionne de la manière suivante : une image est découpée en blocs de taille 8 par 8 pixels, que l'on décrit par une fonction,

F : {0, . . . , 7} 2 → R.
Ainsi, F (i, j) nous donne l'intensité (le niveau de gris) du pixel situé à la position i, j dans le bloc. On peut alors définir les images de base comme la famille (F u,v ), pour 0 ≤ u, v ≤ 7 de la manière suivante : G(i, j) H(i, j).

F u,v : (i, j) → C cos (2i +
On peut alors décomposer F comme,

F = 0≤u,v≤7 c u,v F u,v , où c u,v := ⟨F, F u,v ⟩.
Pour la compression, ce sont ces c u,v qui sont sauvegardés. Avec cette décomposition, les coefficients c u,v sont proches de 0 et certains peuvent être négligés, en fonction du taux de compression ou de la qualité souhaité. Plus généralement, les différentes méthodes de compression d'image actuelles diffèrent principalement par la taille des blocs ainsi que par le choix des images de bases [START_REF] Taubman | JPEG2000: image compression fundamentals, standards, and practice[END_REF][START_REF] Boix | Wavelet Transform application to the compression of images[END_REF]. Le problème majeur de ces codecs vient de la décomposition de l'image en blocs qui introduit l'apparition d'artefacts visuels lors de la décompression, comme illustré ci-dessous : La prédiction des inter frames est effectuée à l'aide de techniques de compensation de mouvement (motion compensation). La compensation de mouvement est une technique algorithmique utilisée pour prédire une image dans une vidéo, compte tenu des images précédentes et/ou futures, en tenant compte du mouvement de la caméra et/ou des objets dans la vidéo. La plupart des standards de codage vidéo, tels que les formats H.26x et MPEG [START_REF] Chang | Overview of the MPEG-7 standard[END_REF][START_REF] Sullivan | Overview of the High Efficiency Video Coding (HEVC) Standard[END_REF], utilisent la transformée discrète en cosinus compensée en mouvement (motion-compensated DCT). Ici encore, l'image à traiter est divisée en blocs de taille fixe (par exemple 16 par 16) et pour passer d'une image à la suivante, les blocs sont translatés grâce à un vecteur de mouvement. Ces types d'algorithmes font partie de la famille des Block-Matching Algorithms (BMA).

Plusieurs stratégies de calcul pour trouver le vecteur de mouvement sont possibles, mais l'approche la plus simple, bien que coûteuse en terme de temps de calcul, est la recherche exhaustive [START_REF] Jain | Displacement Measurement and Its Application in Interframe Image Coding[END_REF]. Cet algorithme consiste à déplacer chaque bloc dans toutes les directions possibles dans un voisinage du bloc afin de minimiser une erreur locale entre le bloc déplacé et l'image suivante (ou précédente). Il existe d'autres algorithmes de Block-Matching, avec comme principale différence leur précision et le temps de calcul [START_REF] Abdul Halin | A Comparison of Different Block Matching Algorithms for Motion Estimation[END_REF]. Tout comme pour les intra frames, chaque bloc est considéré indépendamment des autres. Ainsi, le principal inconvénient de la compensation de mouvement par blocs est qu'elle introduit des discontinuités aux limites des blocs.

Contributions

Le but de cette thèse est de proposer de nouvelles méthodes de compression d'image et d'estimation du mouvement, où les artefacts sont absents. En 2009, Schmaltz et al ont réussi à surpasser la compression JPEG2000 en utilisant des méthodes de compression basées sur l'inpainting d'image par équations aux dérivées partielles (EDP) [START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF]. Le principe de ces méthodes est de reconstruire une image à partir d'un faible nombre de pixels connus, la difficulté majeure étant de choisir les "bons" pixels à garder afin d'obtenir une "bonne" reconstruction. L'avantage de ces méthodes est de considérer la totalité de l'image et ainsi d'éviter les artefacts visuels. De plus, l'utilisation des EDP permet d'obtenir une image plus régulière et donc, plus agréable visuellement. Le principal objectif dans cette thèse est de proposer de nouveaux modèles de compression prenant en compte le fait que les vraies images contiennent du bruit. Le but est d'obtenir un codec permettant, en une seule étape, de compresser et de débruiter une image ou une vidéo.

Organisation de la thèse

La partie I, est consacrée à la compression des inter frames, donc la compression d'image par inpainting. Dans le chapitre 1, nous allons proposer un modèle de compression prenant en compte le bruit gaussien dans les images et donner un critère analytique pour localiser les meilleurs pixels à sauvegarder. Dans le chapitre 2, nous allons étendre les résultats précédents à une approche itérative afin d'améliorer le débruitage lors de la compression. Notamment, l'approche itérative nous permet de modifier au cours des itéraions l'ensemble des pixels retenus pour la compression. Cet ensemble est ainsi construit de manière dynamique par un processus d'enrichisement-délestage à travers l'échange de pixels (les moins "influents" avec les plus significatifs). Le débruitage se trouve ainsi amélioré par la prise en compte des nouvelles valeurs de l'intensité (valeur à l'étape n) et du masque remis à jour.

Enfin, dans le chapitre 3, nous allons présenter une nouvelle méthode pour déterminer l'ensemble de compression basée sur la notion d'état adjoint. Cette méthode conduit à un critère de sélection plus lisse (soft-tresholding) qui permet une meilleure reconstruction et qui s'applique avec la même éfficacité au bruit gaussien et au bruit salt and pepper. Nous présentons dans un petit chapitre a part, les résultats préliminaires concernant la mise en ouvre des algorithmes dans cette thèse par carte graphique pour accéler les calculs et permettre à des méthodes variationnelles de réaliser des performances en simulations numériques qui approchent le traitement en temps réel.

Dans la partie II, nous allons étudier l'estimation du mouvement au sein d'une vidéo, dans le but de la compresser. Nous allons proposer dans le chapitre 4 une nouvelle formulation du flot optique basée sur le transport optimal [START_REF] Villani | Topics in optimal transportation[END_REF]. On présentera des formulations classiques du problème de la détermination du flot optique, notamment avec prise en compte de la variation de la luminosité, puis la nouvelle formulation basée sur le transport de densités à la place des particules (pixels).

La partie III, nous allons la consacrer à appliquer les méthodes des deux parties précédentes pour effectuer la compression video. Nous présentons le principe du fonctionnement général du codec vidéo. Dans le chapitre 5, différentes étapes de cette compression vidéo sont mises en oeuvre sur des exemples et des comparaisons de la qualité visuelle des reconstructions sont données.

En annexes, nous donnons quelques détails et démonstrations techniques. L'annexe A est liée aux chapitres 1 et 2 et la démonstration de résultats utilisés. L'annexe B, concerne les démonstrations de certains résultats utlisés au chapitre 3. Enfin l'annexe C est dédié à des rappels d'outils généraux évoqués le long de la thèse.

Description détaillée du contenu

Compression d'image par "inpainting"

L'utilisation d'équations aux dérivées partielles (EDPs) pour la compression d'image est un domaine de recherche relativement récent et qui gagne en popularité depuis quelques années. Cependant, la majorité de ces techniques sont en réalité couplées avec des méthodes de compression plus traditionnelles comme le JPEG [START_REF] Rabbani | Digital image compression techniques[END_REF], le JPEG 2000 [START_REF] Taubman | JPEG2000: image compression fundamentals, standards, and practice[END_REF] ou la transformation en ondelettes [START_REF] Boix | Wavelet Transform application to the compression of images[END_REF]. En effet, les EDPs sont plutôt utilisées pour effectuer un filtrage de l'image avant ou après l'avoir compressée avec ces codecs. On peut citer par exemple le lissage d'image ou le débruitage d'image [START_REF] Chan | Total Variation Wavelet Thresholding[END_REF][START_REF] Masnou | Level lines based disocclusion[END_REF][START_REF] Tschumperle | Vector-valued image regularization with PDEs: a common framework for different applications[END_REF][START_REF] Rotem | Image Reconstruction from Zero Crossings, Acoustics, Speech and Signal Processing[END_REF][START_REF] Adam | Denoising by Inpainting[END_REF]. Le but de la compression d'image par inpainting est de réduire la quantité de données nécessaires pour stocker l'image, en utilisant uniquement des méthodes basées sur les équations aux dérivées partielles. Le principal objectif de ce champ de recherche est de trouver tout d'abord quelles méthodes d'inpainting utiliser en fonction des caractéristiques de l'image à compresser (images texturées, bruitées, cartoon, ...), mais également de savoir quels sont les "bons" pixels à garder pour avoir une reconstruction satisfaisante [START_REF] Dell | Seed Points in PDE-Driven Interpolation[END_REF][START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF][START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Liu | Image Compression With Edge-Based Inpainting[END_REF]. Récemment, ces techniques ont été appliquées à des signaux autres que des images, comme pour la compression audio [START_REF] Peter | Compressing Audio Signals with Inpainting-Based Sparsification[END_REF]. Dans ce chapitre, nous ferons une liste non exhaustive des méthodes de compression par inpainting d'image. En particulier, il existe des méthodes utilisant le machine learning qui ne seront pas détaillée ici [START_REF] Schrader | CNN-based Euler's Elastica Inpainting with Deep Energy and Deep Image Prior[END_REF][START_REF] Peter | Deep Spatial and Tonal Optimisation for Diffusion Inpainting[END_REF].

Inpainting d'images

La technique d'inpainting trouve son origine dans la restauration de tableaux anciens où certaines parties de peintures sont manquantes. Ces dernières sont repeintes en s'aidant des couleurs et des motifs aux alentours. En analyse d'image, cette méthode est également utilisée pour restaurer une image lorsque celle-ci est détériorée, mais également pour enlever certains éléments de l'image [START_REF] Bertalmio | Image inpainting[END_REF][START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF]. L'inpainting est un problème mal posé au sens d'Hadamard. Soit K un sous-ensemble de D dans lequel l'image à traiter n'est pas détériorée. On appelle K le masque d'inpainting et D \ K le domaine d'inpainting. Le modèle général de l'inpainting d'image est le suivant : [START_REF] Charbonnier | Two deterministic half-quadratic regularization algorithms for computed imaging[END_REF], on utilise la fonction,

Problem 0.0.1. Trouver u dans V tel que,    A(u) = 0, dans D \ K, u = f, dans K, ∂u ∂n = 0, sur ∂D, où A : V → R
g(s 2 ) = 1 1 + (s/λ) 2 ,
avec λ > 0 un paramètre dit de contraste. Une variante de la diffusion de Charbonnier a été proposée dans [START_REF] Catté | Image Selective Smoothing and Edge Detection by Nonlinear Diffusion[END_REF]. Ici, g(|∇u| 2 ) est remplacée par g(|∇u σ | 2 ) avec u σ une version plus lisse de u dans le but d'être moins sensible au bruit. Une illustration de cette reconstruction est donnée dans la figure 7 (c).

Example 3 (Edge-enhancing diffusion). Dans l'exemple précédent, l'interpolation anisotropique tentait de pallier au principal défaut de la diffusion homogène. Pour celà, les auteurs ont ajouté un paramètre G pour contrôler la diffusion en fonction de module du gradient de u. L'edge-enhancing diffusion [START_REF] Weickert | Theoretical Foundations Of Anisotropic Diffusion In Image Processing[END_REF] est une amélioration permettant de prendre en compte également la direction de ∇u. Afin de ne pas flouter les arêtes, on veut que la diffusion dans la direction perpendiculaire à celles-ci soit faible.

Problem 0.0.4. Trouver u dans H 1 (D) tel que, En 2005, Galić et al [START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF] proposèrent de remplacer la simple interpolation linéaire par une interpolation effectuée par inpainting, par exemple par de l'edge-enhancing diffusion [START_REF] Weickert | Theoretical Foundations Of Anisotropic Diffusion In Image Processing[END_REF].

   -div G(∇u σ ∇u T σ ) ∇u = 0, dans D \ K, u = f, dans K,
Enfin, en 2014, Schmaltz et al [START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF] proposèrent de remplacer la division en triangles par une division en rectangles et ont déterminé que les meilleurs points d'interpolation pour chaque rectangle à sauvegarder sont les quatre coins plus le centre. De plus, ils ont comparé différentes méthodes d'interpolation (i.e. inpainting) et, parmi celles testées, l'edge-enhancing diffusion (exemple 3) semblait la plus performante. Dans l'article [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], les auteurs ont étudié le cas où le problème d'inpainting est donné par la diffusion homogène (exemple 1) et où,

F(u) := 1 2 D |∇u -∇f | 2 , ∀u ∈ H 1 (D).
L'analyse de ce problème d'optimisation de forme permet de trouver la localisation optimale des points à garder, à savoir, là où l'intensité varie le plus, c'est-à-dire les arêtes de l'image. Deux méthodes ont été proposées, la première où seuls les points qui maximisent |∆f | sont gardés (figure 10

Compression par algorithmes probabilistes

En 2012, Mainberger et al proposèrent un algorithme pour la sélection des pixels qu'il nommèrent algorithme de sparsification [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF]. Ils commence par un masque contenant l'ensemble des pixels de l'image, puis à chaque itération, supprime de manière aléatoire une fraction des pixels du masque et reconstruisent l'image. Si l'erreur, calculée uniquement à chaque pixel supprimé est grande, il est remit, de sorte que soit ajouté au masque un sous-ensemble des pixels supprimés présentant l'erreur la plus importante. Ainsi, les pixels les moins significatifs sont retirés jusqu'à atteindre le nombre de pixels souhaitée pour la compression.

Data: Image f , fraction p de pixels dans l'ensemble candidat, fraction q de pixels supprimés à chaque itération, densité d souhaitée dans le masque. Result: Masque d'inpainting K. Prendre les (1 -q)|D| pixels x i qui maximisent la valeur e(x i ) et les re-mettre dans K;

8 end Algorithm 2: Algorithme de sparsification.

L'inconvénient de la méthode présentée précédemment est qu'une fois qu'un pixel est retiré du masque, il n'y retourne plus même s'il pouvait être significatif pour la reconstruction. Mainberger et al ont proposé dans le même article l'algorithme de nonlocal pixel exchange [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF][START_REF] Peter | From Optimised Inpainting with Linear PDEs Towards Competitive Image Compression Codecs[END_REF]. Celui-ci représente une étape de post-traitement de l'algorithme de sparsification. À chaque itération, on choisit au hasard une quantité fixe de pixels hors du masque. Un sous-ensemble de ceux qui présentent la plus grande erreur de reconstruction est échangé avec des pixels de masque choisis eux aussi au hasard. Si l'erreur de reconstruction pour le nouveau masque ne diminue pas, on réinitialise le masque à sa configuration précédente. Sinon, on garde le nouveau masque.

Notons que l'analyse de tels algorithmes n'est pas faite et que l'essentiel de l'approche est purement heuristique (convergence, lois de probabilité utilisées -autre que la loi uniforme-, . . . ). [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] proposèrent d'améliorer la reconstruction de l'image en changeant la valeur des pixels gardés dans un masque d'inpainting fixé. C'est ce qu'ils ont appelé de l'optimisation tonale. Plus précisément, si on note la reconstruction u f K par inpainting, on pose,

Data

δf := argmin δf ∥f -u f +δf K ∥ 2 .
Alors, on sauvegarde (f + δf )| K comme donnée de la compression.

En 2021, Chizhov et al [START_REF] Chizhov | Efficient Data Optimisation for Harmonic Inpainting with Finite Elements[END_REF] utilisèrent les éléments finis plutôt que les différences finies pour résoudre le problème d'inpainting. Cela permet d'une part de réduire le nombre d'inconnues (points rouges sur la Figure 12 (c)) lors de la discrétisation, ce qui induit un temps de calcul réduit, mais également d'avoir une reconstruction plus régulière et donc plus agréable visuellement. Estimation avec prise en compte de la variation de la luminosité

t ∈ [0, T ] et x ∈ D, D l (u) = K ρ ⋆ ∇f (x, t) • u(x, t) + ∂ t f (x, t) .
Ici, ⋆ désigne le produit de convolution et K ρ désigne le noyau de la chaleur, solution fondamentale de l'équation de la chaleur, qui, une fois convolué avec une fonction g a pour effet de lisser g. Si g est une image, cette opération est un flou gaussien de déviation standard ρ > 0. L'équation d'Euler-Lagrange nous donne en dimension 2,

K ρ ⋆ (f x ) 2 u 1 + K ρ ⋆ (f x f y ) u 2 = -K ρ ⋆ (f x f t ) , dans [0, T ] × D, K ρ ⋆ (f y f x ) u 1 + K ρ ⋆ (f y ) 2 u 2 = -K ρ ⋆ (f y f t ) , dans [0, T ] × D,
Le système linéaire précédent peut être résolu ponctuellement, ce qui présente un avantage en terme de temps de calcul.

La même année, Horn et Schunck [START_REF] Horn | Determining Optical Flow[END_REF] proposèrent la méthode globale, qui consiste à minimiser sur u une énergie associée à la contrainte fondamentale du flot optique,

D g (u) = D ∇f (x, t) • u(x, t) + ∂ t f (x, t) dx + α R(u). Si R(u) = d i=1 D |∇u i | 2 dx, l'équation d'Euler-Lagrange nous donne en dimension 2,    -α∆u 1 + (f x ) 2 u 1 + (f x f y ) u 2 = -(f x f t ) , dans [0, T ] × D, -α∆u 2 + (f y f x ) u 1 + (f y ) 2 u 2 = -(f y f t ) , dans [0, T ] × D, ∂u1 ∂n = ∂u2 ∂n = 0 , sur [0, T ] × ∂D.
En 2005, Bruhn et al [START_REF] Bruhn | Lucas/Kanade Meets Horn/Schunck: Combining Local and Global Optic Flow Methods[END_REF], proposèrent la méthode globale-locale, qui est la combinaison des deux méthodes précédentes, et ainsi de minimiser u pour tout t ∈ [0, T -δt[,

D gl (u) = D K ρ (x) ⋆ ∇f (x, t) • u(x, t) + ∂ t f (x, t) dx + αR(u). Si R(u) = d i=1 D |∇u i | 2 dx, l'équation d'Euler-Lagrange nous donne en dimension 2,    -α∆u 1 + K ρ ⋆ (f x ) 2 u 1 + K ρ ⋆ (f x f y ) u 2 = -K ρ ⋆ (f x f t ) , dans [0, T ] × D, -α∆u 2 + K ρ ⋆ (f y f x ) u 1 + K ρ ⋆ (f y ) 2 u 2 = -K ρ ⋆ (f y f t ) , dans [0, T ] × D, ∂u1 ∂n = ∂u2 ∂n = 0 , sur [0, T ] × ∂D.
Dans cette dernière méthode, on a deux paramètres à choisir : ρ et α. Le premier sert à rendre plus robuste la méthode face au bruit dans f , tandis que le second, associé à la régularisation, permet de favoriser un flot optique régulier. Ainsi, une valeur élevée de α va avoir pour effet de flouter les informations proches des arêtes et une valeur faible de α ajoute trop d'informations inutiles dans les parties homogènes. L'idéal serait d'avoir α faible lorsqu'on est proche des arêtes et élevé dans les zones homogènes. C'est pour cela qu'ont été introduites les méthodes adaptatives [START_REF] Belhachmi | Control of the Effects of Regularization on Variational Optic Flow Computations[END_REF][START_REF]An Adaptive Approach for the Segmentation and the TV-Filtering in the Optic Flow Estimation[END_REF][START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF] du choix de α. Dans celles-ci, on suppose que le paramètre de régularisation α n'est plus constant mais constant par morceaux. On utilise la méthode des éléments finis, on a α dans P 0 et si on note η K l'erreur a-posteriori sur l'élément K, on pose pour α n donné,

α n+1 | K = max   α n | K 1 + κ max η K ∥η K ∥∞ -ξ 100 , 0 , α s   .
Le paramètre κ est entre 5 et 10 et α s est un paramètre de seuil pour pas avoir une régularisation trop petite. Avec ce choix de α n+1 , si l'erreur relative est plus petite que ξ% on réduit α n+1 | K , sinon, on garde le même α n | K . On a alors la méthode itérative suivante :

Data: f 1 , f 2 , N , κ, α s .
Result: u. 1 Calcul de u 0 sur le maillage cartésien T 0 entre f 1 et f 2; 2 for n in {0, . . . , N } do Dans la pratique, on choisira α 0 constant et grand puisque le paramètre α ne peut que diminuer au cours des itérations.

On donne dans la figure 13 quelques résultats numériques pour le flot optique. On utilise la carte de coloration pour la représentation des champs de vecteurs donnée par le site de Middleburry [START_REF] Baker | A Database and Evaluation Methodology for Optical Flow[END_REF]. Comme pour dans le cas de la luminosité constante, nous devons ajouter des contraintes à l'équation fondamentale du flot optique en régularisant les inconnues u 1 , u 2 , m t et c t . De la même façon que dans [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF], on peut supposer que le coefficient de translation c t s'annule et utiliser la méthode globale-locale comme seconde contrainte [START_REF] Bruhn | Lucas/Kanade Meets Horn/Schunck: Combining Local and Global Optic Flow Methods[END_REF]. On cherche alors à minimiser (u, m t ) pour t ∈ [0, 1 -δt[,

D K ρ (x) ⋆ ∇f • u + ∂ t f -f m t dx + α d i=1 D |∇u i | 2 dx + λ D |∇m t | 2 dx.
En dimension 2, les équations d'Euler-Lagrange nous donnent,

       -α∆u 1 + K ρ ⋆ (f x ) 2 u 1 + K ρ ⋆ (f x f y ) u 2 -K ρ ⋆ (f x f ) m t = -K ρ ⋆ (f x f t ), dans [0, 1] × D, -α∆u 2 + K ρ ⋆ (f y f x ) u 1 + K ρ ⋆ (f y ) 2 u 2 -K ρ ⋆ (f y f ) m t = -K ρ ⋆ (f y f t ), dans [0, 1] × D, -λ∆m t + K ρ ⋆ (f f x ) u 1 + K ρ ⋆ (f f y ) u 2 -K ρ ⋆ (f 2 ) m t = K ρ ⋆ (f f t ), dans [0, 1] × D, ∂u1 ∂n = ∂u2 ∂n = ∂mt ∂n = 0, sur [0, 1] × ∂D.
Cette méthode populaire pour déterminer le flot optique utilise une régularisation via le laplacien sur les composantes de u et sur m t ainsi que le lissage des données sur f . Cela conduit à des solutions homogènes et denses qui peuvent contenir trop d'informations inutiles. Une autre possibilité pour modéliser la variation de la luminosité est de considérer la constance du gradient de la luminosité [START_REF] Bruhn | Variational optic flow computation: accurate modelling and efficient numerics[END_REF],

∇f (x + δx, t + δt) = ∇f (x, t).

Il existe d'autres contraintes fondamentales et d'autres régularisations, présentées dans [START_REF] Papenberg | Highly Accurate Optic Flow Computation with Theoretically Justified Warping[END_REF]. On peut également considérer le cas des grands déplacements [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF]. Puisqu'on ne peut plus utiliser un développement de Taylor comme dans le cas des petits déplacements, on a un problème de minimisation non-linéaire,

min u D K ρ ⋆ f (x + u, t + δt) -f (x, t) 2 non-linéaire +α R(u).

Organisation de la partie II

Dans le chapitre 4, nous proposons un modèle de flot optique basé sur la mécanique des fluides en utilisant l'équation de continuité et nous faisons un parallèle entre ce nouveau modèle et le problème de transport optimal grâce au théorème de Benamou-Brenier. Notre formulation inclut l'hypothèse de la variation de la luminosité sans qu'il soit nécessaire de supposer d'autres hypothèses afin de régulariser le problème du flux optique puisque l'inconnue supplémentaire, à savoir la variation de la luminosité. Contrairement à l'approche classique, la variation de la luminosité est donnée par la divergence du vecteur flot optique et traduit la "variation de volume" lors du transport de densités (intensité de l'image). Celà donne une interprétation "naturelle" de cette variation proche de ce que suggère les lois de l'optique. La comparaison des approches classiques et de celle proposée ici nous permet de tirer les premières conclusions et perspectives pour la modélisation et l'analyse de mouvement en vision par ordinateurs. The use of partial differential equations (PDEs) for image compression is a relatively recent area of research that has been gaining popularity in recent years. However, most of these techniques are actually coupled with more traditional compression methods such as JPEG [START_REF] Rabbani | Digital image compression techniques[END_REF], JPEG 2000 [START_REF] Taubman | JPEG2000: image compression fundamentals, standards, and practice[END_REF] or wavelet transform [START_REF] Boix | Wavelet Transform application to the compression of images[END_REF]. Indeed, the EDPs are rather used to carry out a filtering of the image before or after having compressed it with these codecs. One can quote for example the image smoothing or the image denoising [START_REF] Chan | Total Variation Wavelet Thresholding[END_REF][START_REF] Masnou | Level lines based disocclusion[END_REF][START_REF] Tschumperle | Vector-valued image regularization with PDEs: a common framework for different applications[END_REF][START_REF] Rotem | Image Reconstruction from Zero Crossings, Acoustics, Speech and Signal Processing[END_REF][START_REF] Adam | Denoising by Inpainting[END_REF]. The goal of image compression by inpainting is to reduce the amount of data needed to store the image, using only methods based on partial differential equations. The main objective of this field of research is to find first of all which inpainting methods to use according to the characteristics of the image to be compressed (textured images, noisy images, cartoons, ...), but also to know which are the "good" pixels to keep in order to have a satisfactory reconstruction [START_REF] Dell | Seed Points in PDE-Driven Interpolation[END_REF][START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF][START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Liu | Image Compression With Edge-Based Inpainting[END_REF]. Recently, these techniques have been applied to signals other than images, as for audio compression [START_REF] Peter | Compressing Audio Signals with Inpainting-Based Sparsification[END_REF]. In this chapter, we will make a non-exhaustive list of image inpainting compression methods. In particular, there are methods using machine learning which will not be detailed here [START_REF] Schrader | CNN-based Euler's Elastica Inpainting with Deep Energy and Deep Image Prior[END_REF][START_REF] Peter | Deep Spatial and Tonal Optimisation for Diffusion Inpainting[END_REF].

Image Inpainting

The technique of inpainting originates from the restoration of old paintings where some parts of the paintings are missing. These are repainted with the help of the surrounding colors and patterns. In image analysis, this method is also used to restore an image when it is deteriorated, but also to remove certain elements of the image [START_REF] Bertalmio | Image inpainting[END_REF][START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF]. Inpainting is an ill-posed problem in Hadamard's sense. Let K be a subset of D in which the image to be processed is not deteriorated. We call K the inpainting mask and D \ K the inpainting domain. The general model of image inpainting is the following:

Problem. Find u in V such that,    A(u) = 0, in D \ K, u = f, in K, ∂u ∂n = 0, on ∂D, (2)
where A : V → R is a given operator. In the following, we will see an example of an operator for inpainting. Other types of operators exist, such as the case where A is a neural network [START_REF] Xie | Image Denoising and Inpainting with Deep Neural Networks[END_REF][START_REF] Pathak | Context Encoders: Feature Learning by Inpainting[END_REF], but we will focus in the following on inpainting methods by PDEs.

Example 4 (Homogeneous diffusion). We give the example of homogeneous diffusion inpainting [START_REF] Weickert | Linear Scale-Space has First been Proposed in Japan[END_REF], stated as follows:

Problem 0.0.5. Find u in H 1 (D) such that,

   -∆u = 0, in D \ K, u = f, in K, ∂u ∂n = 0, on ∂D.
This inpainting is effective in reconstructing the homogeneous areas of the image, but it blurs the edges of the image.

Compression by the B-Tree Algorithm

In 1997, Distasi et al [START_REF] Distasi | Image compression by B-tree triangular coding[END_REF] proposed an algorithm allowing the decomposition of an image in triangles of increasingly small size. Once this decomposition done, they saved the value of the pixels at the vertices of each triangle. This information, coupled with a linear interpolation, made it possible to compress and decode an image in a faster way than the principal methods used until then. Moreover, since the slicing can be represented as a binary tree, this method is also extremely simple to save. In 2005, Galić et al [START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF] proposed to replace the simple linear interpolation by an interpolation performed by inpainting, for example by edge-enhancing diffusion inpainting [START_REF] Weickert | Theoretical Foundations Of Anisotropic Diffusion In Image Processing[END_REF].

Finally, in 2014, Schmaltz et al [START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF] proposed to replace the triangle division with a rectangle division and determined that the best interpolation points for each rectangle to be saved are the four corners plus the center. In addition, they compared different interpolation methods (i.e. inpainting) and, among those tested, the edge-enhancing diffusion seemed to be the most efficient.

Compression by Shape Optimization

Let D be a subset of R 2 the support of a two-dimensional grayscale image f . For a given inpainting method, the goal of image compression by inpainting is to find an inpainting mask K ⊂ R 2 so as to minimize a cost function F : V → R having as argument the solution u K of (2). Moreover, since we wish to do compression, it is necessary to add a constraint on K in order to limit its size under the form m(K) ≤ c where m is a well chosen measure of K and c > 0. The inpainting image compression problem can then be written as the following minimization problem,

min K⊂D, m(K)≤c {F(u K ) | u K solution de (2)}.
This is an ill-posed inverse problem. This is why it is common to write the cost function as the sum of a data fidelity term Q and a regularization term R, with regularization parameter α > 0,

F := Q + α R.
We can generalize this model for R N , N ∈ N * signals. In the paper [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], the authors studied the case where the inpainting problem is the homogeneous diffusion and where,

F(u) := 1 2 D |∇u -∇f | 2 , ∀u ∈ H 1 (D).
The analysis of this shape optimization problem allows to find the optimal location of the points to keep, namely, where the color varies the most, i.e. the edges of the image. Two methods have been proposed, the first one where only the points that maximize |∆f | are kept, and the second, where the density of the kept pixels increases with |∆f |.

Compression by Probabilistic Algorithms

In 2012, Mainberger et al proposed a probabilistic algorithm for pixel selection that he named the sparsification algorithm [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF]. We start with a mask containing all the pixels of the image, then at each iteration, we randomly remove a fraction of the pixels of the mask, we inpaint, we calculate the error only at each pixel removed and we put in the mask a subset of the pixels removed with the largest error. Thus, the least significant pixels are removed little by little until the desired pixel density remains.

The disadvantage of the method presented above is that once a pixel is removed from the mask, it will never be returned even if it could be significant for the reconstruction. Mainberger et al proposed in the same article the algorithm of nonlocal pixel exchange [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF][START_REF] Peter | From Optimised Inpainting with Linear PDEs Towards Competitive Image Compression Codecs[END_REF]. This one represents a post-optimization step within the iterations of the sparsification algorithm. In each iteration, a fixed amount of out-of-mask pixels are randomly selected from a set of candidates. A subset of those with the largest inpainting error is swapped with mask pixels also chosen at random. If the inpainting error for the new mask does not decrease, we reset the mask to its previous configuration. Otherwise, we keep the new mask.

In 2016, Peter et al proposed the densification algorithm [START_REF] Peter | Colour image compression with anisotropic diffusion[END_REF]. We start with an empty mask and, for each iteration, we randomly select α pixels that do not belong to the mask. We then add the single pixel that improves the global reconstruction error the most compared to the image.

Improvements

In 2010, Bae et al proposed in [START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF] the interpolation swapping. This is an additional inpainting step where the role of known and unknown pixels is swapped. That is, once the reconstruction u f K is found, we compute u u f K D\K . This results in a smoother final reconstruction. In 2012, Mainberger et al [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] proposed to improve image reconstruction by changing the value of pixels kept in a fixed inpainting mask. This is what they called tonal optimization. More precisely, if we note the reconstruction u f K by inpainting, we pose,

δf := argmin δf ∥f -u f +δf K ∥ 2 .
Then, we save (f + δf )| K as a data of the compression. In 2021, Chizhov et al [START_REF] Chizhov | Efficient Data Optimisation for Harmonic Inpainting with Finite Elements[END_REF] used finite elements rather than finite differences to solve the inpainting problem. This allows on the one hand to reduce the number of unknowns during the discretization, which induces a reduced computation time, but also to have a more regular and thus more visually pleasing reconstruction.

Organization of this Part

In the Chapter 1, we will introduce models based on shape optimization to find the best interpolation data in image compression with noise. We will consider a continuous stationary PDE model, obtained by focusing on the first iteration of the discretized time-dependent PDE which we will analyze in the Γ-convergence framework. We will obtain pointwise information about the relevance of each pixel by an asymptotic analysis. Then, we will introduce a finite dimensional framework of the continuous model based on balls with positive radius, and we will study by Γ-convergence the asymptotics when the radius tends to zero. In Chapter 2, we will extend the results obtained to a parabolic problem where the set of stored pixels depends on time. We will consider the semi-discrete dynamical system associated with the model which gives rise to an iterative method where the stored data is modified during the iterations to obtain the best results. We will perform the analysis and derive several iterative algorithms that we will implement and compare to obtain the most efficient compression and inpainting strategies for noisy images. We will present some numerical calculations to confirm the theoretical results. Finally, we will propose a modified model that allows the inpainting data to change with iteration. Finally, in Chapter 3, we propose to study the image compression problem in the case where the error is more general than the one considered in the two previous chapters. In this way, our new method, derived from the adjoint method, will be more robust to different types of noise than the previous methods.

Chapter 1

Optimal Interpolation Data for PDE-based Compression of Images with Noise

Introduction

The aim of PDE-based compression is to reconstruct a given image, by inpainting from a set of few "relevant pixels", denoted by K, with a suitable partial differential operator. The compression is a two steps process which consists of coding part, that is the choice of the set K, then the decoding phase where the image is entirely recovered. Therefore, it appears intuitively that a balance between the choice quality of the set K, with respect to constraints such as its "size", as small as possible, and the location of its pixels on one hand, and the achievable accuracy of the reconstructed image, is a major key to success of the PDE-based compression. We quote a picture from [START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF] which expresses nicely this idea : "PDE-based data compression suffers from poverty, but enjoys liberty [START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF][START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF][START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF] : Unlike in pure inpainting research [START_REF] Masnou | Level lines based disocclusion[END_REF][START_REF] Bertalmio | Image inpainting[END_REF], one has an extremely tight pixel budget for reconstructing some given image. However, one is free to choose where and how one spends this budget". Besides that, any image compression approach should take into account the nature of the considered images (e.g., noisy, textured, cartoons) and measure its impact on the selection of K.

The goal of the present chapter is to optimize the choice of such sets K and to obtain, as far as possible, an analytic criteria to build it, in the spirit of [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], but when the images are noisy. Optimizing over sets is a well-known field in shape optimization analysis, and many advanced theories and analytic works have been developed for various kinds of constraints on shapes and on differential operators. Our approach fits under this general framework and show the deep links between this field and the mathematical image analysis.

We emphasize that a comprehensive and satisfactory treatment of PDE-based compression must include both the choice of the pixels, the grey (or color) values stored and that of the inpainting operator. Actually, we know from several previous works that (e.g., [START_REF] Galić | Towards PDE-Based Image Compression, in Variational, Geometric, and Level Set Methods in Computer Vision[END_REF][START_REF] Tschumperle | Vector-valued image regularization with PDEs: a common framework for different applications[END_REF][START_REF] Bornemann | Fast Image Inpainting Based on Coherence Transport[END_REF][START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF][START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF][START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF]):

• Optimal sets, seen as optimal shapes, are not exhaustive with respect to all constraints that might be suited for image compression (e.g., easy storage, sparsity).

• The stability of an "optimal" set with respect to some perturbations, when it holds, is rather weak, as it requires topologies of convergence of sets. In particular, this stability is under investigated for the case of noisy data or when some stored values are changed.

• An optimal set, in the sens of optimal shape, is highly dependent on the inpainting operator, whereas a "good" operator may compensate a sub-optimal choice of pixels.

Nevertheless, finding an analytic optimal set remains in our opinion a very reasonable objective to enforce PDE-based compression methods.

Related Works

Several works, notably in the field of PDE image compression, were undertaken to optimize the choice of pixels to store in the coding phase to ensure high reconstruction quality with as few as possible selected points, we refer the reader to [START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF] and the references therein. In particular, in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] the authors studied the choices of "the best set" of pixels as finding an optimal shape minimizing the semi-norm H 1 between the reconstructed solution and the initial noiseless image. They obtain such optimal shape in the framework of Γ-convergence approach and they give an analytic expression to build it from topological asymptotics. In [START_REF] Hoeltgen | Optimising Spatial and Tonal Data for PDE-based Inpainting[END_REF], the authors introduced a mix of probabilistic and PDE based approach to deal with both finding optimal pixels and tonal data for discrete homogeneous harmonic inpainting. Loosely summarized, they start with a data sparsification step which consists of selecting randomly a set of pixels, then they correct this choice within an iterative procedure which consists of a nonlocal exchange of pixels. Lastly, they optimize the grey values at these inpainting points by a least squares minimization method. This procedure is more complete than the first one as it consider both the choice of pixels and the grey values. Notice that for a fixed set K, the harmonic inpainting is an elliptic problem and small perturbation of the data (grey values) leads to a small perturbation on the reconstructed solution, thus, optimizing the selection of the set K appears more critical for the final outcome. Whereas, a small perturbation of the sets is only "weakly stable" (in the sense of γ-convergence of sequences of sets, see [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]). Therefore, it seems reasonable to seek a more general problem of finding an optimal set with some stability properties.

In this paper, we consider a shape-based analysis taking into account noisy data. We study and analyze the problem of finding a fixed set K for the time harmonic linear diffusion, extending this way the approach of [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. We obtain some selection criteria which are suited to the noise level. We compare different methods proposed and existing in the related literature in the presence of noise.

Let us now give a mathematical formulation of the problem considered. Let D ⊂ R 2 the support of an image (say a rectangle) and f : D -→ R, an image which is assumed to be known only on some region K ⊂ D. There are several PDE models to interpolate f and give an approximation of the missing data. One of the basic ways is to approach f | D\K by the solution of the heat equation, having the Dirichlet boundary data f | K on K and homogeneous Neumann boundary conditions on ∂D, i.e. to solve

Problem 1.0.1. For t > 0, find u(t, •) in H 1 (D) such that      ∂ t u(t, •) -∆u(t, •) = 0, in D \ K, u(t, •) = f, in K, ∂u(t,•) ∂n = 0, on ∂D, (1.1)
u(0, •) = u 0 , in D.
We assume given f ∈ H 1 (D) and ∆f ∈ L 2 (D) with ∂f ∂n = 0, for simplicity though in practice f is a function of bounded variations with a non trivial jump set. In fact, the whole analysis in the paper extends to the case of f ∈ L 2 .

To ensure the compatibility conditions with the non-homogeneous "boundary" conditions, we take u(0, .) = f in D. Thus we may rewrite the problem with v

(t, x) = u(t, x) -f (x) Problem 1.0.2. For t > 0, find v(t, •) in H 1 (D) such that      ∂ t v(t, •) -∆v(t, •) = ∆f, in D \ K, v(t, •) = 0, in K, ∂v(t,•) ∂n = 0, on ∂D, (1.2) v(0, •) = 0, in D.
Denoting by v K = u K -f the solution of Problem 1.0.2, the question is to identify the region K which gives the "best" approximation u K , in a suitable sense, for example which minimizes some L p or Sobolev norms, e.g. in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]

D |∇u K -∇f | 2 dx,
(associated to a harmonic interpolation of f in D \ K). As we want to take into account noisy images, and at the same time to perform the inpainting with denoising, a better choice a priori is to minimize the L p -norms of u K -f and its gradient, particularly for p = 1 and p = 2, known to be good filters for a large class of noises. In this chapter, we restrict ourselves to linear time harmonic reconstruction, thus we only consider the L p -norm, p = 1 or p = 2 for the data term. The choice of the set K, that is to say the coding part, being performed at the first step, We associate a semi-implicit discrete system to solve Problem 1.0.2. Omitting the indices n ∈ N and looking for the set K at the first iteration, with the initial condition v 0 = u 0 -f = 0 in D, we are led to consider the elliptic equation :

Problem 1.0.3. Find u in H 1 (D) such that      u -α∆u = f, in D \ K, u = f, in K, ∂u ∂n = 0, on ∂D. (1.3)
for α = δt, the time step, or equivalently

Problem 1.0.4. Find v in H 1 (D) such that      v -α∆v = α∆f, in D \ K, v = 0, in K, ∂v ∂n = 0, on ∂D.
(1.4) Thus, finding the set of pixels which gives the best approximation u K in the L 2 sense is a shape analysis problem for the state equation of Problem 1.0.2 (i.e. Problem 1.0.3). We recall that if u K is the solution of Problem 1.0.3, then u K is the minimizer of

min u∈H 1 (D), u=f in K 1 2 D (u -f ) 2 dx + α 2 D |∇(u -f )| 2 dx -α D ∆f (u -f ) dx,
which is equivalent to

min u∈H 1 (D), u=f in K 1 2 D (u -f ) 2 dx + α 2 D |∇u| 2 dx.
Following [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], we develop two directions of finding that optimal set. The first is to set a continuous PDE model and search pointwise information by a topological asymptotic method. The second direction is to simulate in the continuous frame a finite dimensional shape optimization problem by imposing K to be the union of a finite number of "fat pixels". Performing the asymptotic analysis by Γ-convergence when the number of pixels is increasing (in the same time that the fatness vanishes), we obtain useful information about the optimal distribution of the best interpolation pixels.

Organization of the Chapter

In Section 1.1, we introduce a mathematical model of the compression problem and its relaxed formulation. In Section 1.2, we compute the topological gradient of our minimization problem in order to find a mathematical criterion to construct our set of interpolation points. In Section 1.3, we change our point of view, by considering "fat pixels" instead of a general set of interpolation points. Finally, in Section 1.4, we expose some numerical results.

The Continuous Model

Min-max Formulation

Let D be a bounded open subset of R 2 . We consider the shape optimization problem

min K⊆D,m(K)≤c {E p (u K ) | u K solution of Problem 1.0.3}, (1.5)
where E p , is defined by

E p (u) = 1 p D |u -f | p dx + α 2 D |∇(u -f )| 2 dx, ∀u ∈ H 1 (D) ∩ L p (D), (1.6)
m is a measure, to be chosen, and c > 0. We notice that (1.6) as a cost functional corresponds to the L p data fitting term with Tikhonov regularization [START_REF] Tikhonov | Solutions of Ill-Posed Problems[END_REF]. Hence E p is the simplest, and widely used, denoising PDE models at least for the values p = 1 or p = 2. The image compression problem aims to find an optimal set of pixels from which an accurate reconstruction of (noisy) image will be performed. Actually, the data term does not affect the Γ-convergence analysis, so we only consider the case p = 2 and we drop the index 2 by denoting E the energy. Thanks to Proposition C.1.1 in Appendix C, the analysis of the continuous model is similar to the H 1 -semi norm case in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], we give the main analysis result and the main steps of the proof in the next section. Let u K be the solution of Problem 1.0.3, it is straightforward to obtain

Proposition 1.1.1. The optimization problem (1.5) is equivalent to max K⊆D,m(K)≤c min u∈H 1 (D),u=f in K α 2 D |∇u| 2 dx + 1 2 D (u -f ) 2 dx.
Proof. The weak formulation of Problem 1.0.3 with u K -f as test function gives,

α D |∇u K | 2 dx + D (u K -f ) 2 dx = α D ∇u K • ∇f dx.
Thus,

(1.5) ⇔ min K⊆D,m(K)≤c 1 2 D (u K -f ) 2 dx + α 2 D |∇(u K -f )| 2 dx ⇔ min K⊆D,m(K)≤c 1 2 D (u K -f ) 2 dx + α 2 D |∇u K | 2 dx -α D ∇u K • ∇f dx ⇔ min K⊆D,m(K)≤c 1 2 D (u K -f ) 2 dx + α 2 D |∇u K | 2 dx -α D |∇u K | 2 dx - D (u K -f ) 2 dx ⇔ min K⊆D,m(K)≤c - 1 2 D (u K -f ) 2 dx - α 2 D |∇u K | 2 dx ⇔ max K⊆D,m(K)≤c 1 2 D (u K -f ) 2 dx + α 2 D |∇u K | 2 dx.
Since a is symmetric, by using Lax-Milgram theorem [START_REF] Evans | Partial Differential Equations: Second Edition[END_REF], we have the result.

Finally, problem (1.5) can be rewritten under the unconstrained form by penalizing the constraint m(K) ≤ c as follows :

max K⊆D min u∈H 1 (D),u=f in K α 2 D |∇u| 2 dx + 1 2 D (u -f ) 2 dx -βm(K), (1.7)
for β > 0. The well-posedness of (1.5) depends of the choice of the measure m. In [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], it has been proven that, in the laplacian case, choosing the ν-capacity as measure m leads to the existence of a relaxed formulation and the well-posedness of this optimization problem. Consequently, we will study (1.5) when m is the ν-capacity. The next section is devoted to the analysis within the γ-convergence (see Appendix C) approach follows the same lines as in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] with slight changes. Without loss of generality, we consider the capacity when ν = 1.

Analysis of the Model

The optimization problem (1.5) can be rewritten by penalizing the Dirichlet boundary condition

u = f in K max K⊆D min u∈H 1 (D) α 2 D |∇u| 2 dx + 1 2 D (u -f ) 2 dx + 1 2 D (u -f ) 2 d∞ K -β cap ν (K),
where the measure ∞ K is defined in Appendix C. It is well known that such shape optimization problems do not always have a solution (e.g. [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]), we seek a relaxed formulation, which under the capacity constraint yields a relaxed solution, that is to say, a capacity measure (see Appendix C). Thus, we consider the problem

max µ∈M0(D) min u∈H 1 (D) α 2 D |∇u| 2 dx + 1 2 D (u -f ) 2 dx + 1 2 D (u -f ) 2 dµ -β cap ν (µ),
where µ is in M 0 (D). As the L 2 -norm is continuous, referring to Proposition C.1.1 in Appendix C, we may drop from the following Γ-convergence analysis, the term

1 2 D (u -f ) 2 dx.
For every µ in M 0 (D) and u in H 1 (D), we define

F µ , from H 1 (D) into R ∪ {+∞}, by F µ (u) := α D |∇u| 2 dx + D (u -f ) 2 dµ, if |u| ≤ |f | ∞ , +∞, otherwise.
We have that F µ is equi-coercive with respect to µ, for any µ in M 0 (D). Indeed, let u be in

H 1 (D) such that |u| ∞ ≤ |f | ∞ . It is easy to see that F µ (u) ≥ α D |∇u| 2 dx -2|f | 2 ∞ µ(D).
For every µ in M 0 (D), we define E, from M 0 (D) into R, by

E(µ) := min u∈H 1 (D) F µ (u).
For a given µ in M 0 (D), E(µ) corresponds to the energy of

Problem 1.1.1. Find u in H 1 (D) such that -α∆u + µ(u -f ) = 0, in D, ∂u ∂n = 0, on ∂D. (1.8) Thus, if u is a solution of Problem 1.1.1 for a given µ in M 0 (D), then F µ (u) = E(µ)
and the function u satisfies the maximum principle |u| ≤ |f | ∞ . The existence of the relaxed optimal shape follows the same lines as in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. We sketch the proof of Theorem 1.1.4 for the existence of the relaxed solution, for details see in Appendix A.1. Since we want to include balls centered at points x 0 in D, that we do not want to be too close to the boundary of D, we introduce the following notations for δ > 0,

D -δ := {x ∈ D | d(x, ∂D) ≥ δ} ⊆ D, K δ (D) := {K ⊆ D | K closed, K ⊆ D -δ }, and M δ 0 (D) := {µ ∈ M 0 (D) | µ D\D -δ = 0} ⊆ M 0 (D). Let us consider the problem max µ∈M δ 0 (D) min u∈H 1 (D) α 2 D |∇u| 2 dx + 1 2 D (u -f ) 2 dµ -β cap(µ).
Using the compactness of M 0 (D) for the γ-convergence (Proposition C.5.4 in Appendix C) and the locality of the γ(F )-convergence (Proposition C.5.5 in Appendix C), we have the following result

Proposition 1.1.2 (γ-compactness of M δ 0 (D))
. The set M δ 0 (D) defined above is compact with respect to the γ-convergence.

We have also the density theorem (the proof is given in Appendix A.1)

Theorem 1.1.1. We have cl γ K δ (D) = M δ 0 (D), i.e., K δ (D) is dense into M δ 0 (D) with respect to the γ(F )-convergence.
Similarly to Lemma 3.4 in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], we have

Theorem 1.1.2. Let µ n ∈ K δ (D). If µ n γ-converge to µ, then cap ν (µ n ) → cap ν (µ). Theorem 1.1.3. If (µ n ) n in M δ 0 (D) γ-converges to µ, then µ is in M δ 0 (D) and F µn Γ-converges to F µ in L 2 (D).
The proof of the last theorem is also given in Appendix A.1. Finally, we can state the main result of this section (proof in Appendix A.1).

Theorem 1.1.4. We have

sup K∈K δ (D) E(∞ K ) -β cap ν (∞ K ) = max µ∈M δ 0 (D) E(µ) -β cap ν (µ) .
Replacing

F n with F n + G, G := 1 2 D (u -f ) 2
dx and with Proposition C.1.1 in Appendix C, we get the existence of an optimal solution to the relaxed formulation.

Note. In order to solve the relaxed problem

min u∈H 1 (D) α D |∇u| 2 dx + D (u -f ) 2 dx + D (u -f ) 2 d∞ K -β cap ν (K),
we may use a shape derivative with respect to the measures µ. However, such a method yields diffuse measures, thus too thick sets whereas we seek discrete sets of pixels.

In the next two sections, we aim to find an explicit characterization of the set K using topological asymptotic.

Topological Gradient

Here, we aim to compute the solution of our optimization problem (1.5) by using a topological gradientbased algorithm as in [START_REF] Larnier | The Topological Gradient Method: From Optimal Design to Image Processing[END_REF][START_REF] Garreau | The Topological Asymptotic for PDE Systems: The Elasticity Case[END_REF]. The computation of the topological gradient is different than the case of a pure Laplacian problem as it uses fundamental solution of -∆u + u = f , namely the Bessel functions of second kind (see Appendix A.2). This kind of algorithm consists in starting with K = D and determining how making small holes in K affect the cost functional to find the balls which have the most decreasing effect. To this end, let us define K ε the compact set K \ B(x 0 , ε) where B(x 0 , ε) is the ball centered in x 0 ∈ D with radius ε > 0 such that B(x 0 , ε) ⊂ K. From now, we consider the functional :

j * : A ⊂ D → min u∈H 1 (D),u=f in A 1 2 D (u -f ) 2 dx + α 2 D |∇u| 2 dx,
or equivalently,

j : A ⊂ D → min v∈H 1 (D),v=0 in A 1 2 D v 2 dx + α 2 D |∇v| 2 dx - D gv dx,
where g := α∆f . Finally, we denote by v ε the minimizer of j(K ε ). Then, we have Proposition 1.2.1. With notations from above, we have when ε tends to 0,

j(K ε ) -j(K) = π 2 g(x 0 ) 2 ε 2 ln(ε) + O(ε 2 ). Proof. j(K ε ) -j(K) = α 2 B(x0,ε) |∇v ε | 2 dx + 1 2 B(x0,ε) v 2 ε dx - B(x0,ε) gv ε dx.
The weak formulation of Problem 1.0.3 leads to

j(K ε ) -j(K) = 1 2 B(x0,ε) gv ε dx - B(x0,ε) gv ε dx = - 1 2 B(x0,ε) gv ε dx.
We have g(x) = g(x 0 ) + ∥x -x 0 ∥O(1), and hence

j(K ε ) -j(K) = - 1 2 g(x 0 ) B(x0,ε) v ε dx + ε O(1) B(x0,ε) v ε dx.
It is enough to compute the fundamental term in the asymptotic development of the expression B(x0,ε) v ε dx. This is done by using Proposition A.2.1 in Appendix A.

Since for ε < 1, ln ε < 0, the result above suggests to keep the points x 0 where |∆f (x 0 )| 2 is maximal, when ε small enough. From a practical point of view, this is the main result of our local shape analysis. In practice, we compute the quantity |∆f | and we apply a hard-thresholding to select the maximal points x 0 in one single step. In the next section, we will see that such a strict threshold rule might be relaxed.

Optimal Distribution of Pixels : The "Fat Pixels" Approach

In this section, we change our point of view by considering "fat pixels" instead of a general set of interpolation points. In the sequel, we will follow [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Buttazzo | Asymptotics of an optimal compliancelocation problem[END_REF]. We restrict our class of admissible sets as an union of balls which represent pixels. For m > 0 and n ∈ N, we define

A m,n := D ∩ n i=1 B(x i , r) x i ∈ D r , r = mn -1/2 ,
where D r is the r-neighborhood of D. The following analysis remains unchanged in R d , but for the sake of simplicity we restrict ourselves to the case d = 2. We consider problem (1.5) for every K ∈ A m,n i.e.

min K∈Am,n 1 2 D (u K -f ) 2 dx + α 2 D |∇u K -∇f | 2 dx u K solution of Problem 1.0.3 .
Like in the previous section, we set v K := u K -f . This last optimization problem can be reformulated as a compliance optimization problem :

min K∈Am,n 1 2 D g v Kn dx u K := v K + f solution of Problem 1.0.3 , (1.9)
where g := α∆f , like in the previous sections. Here, we do not need to specify a size constraint on our admissible domains. Indeed, imposing K ∈ A m,n implies a volume constraint and a geometrical constraint on K since K is formed by a finite number of balls with radius mn -1/2 . We deal with Neumann boundary conditions on D. However, it is possible to cover the boundary with 2C D m n 1/2 balls so that we have formally homogeneous Dirichlet boundary conditions on D. The well-posedness of such a problem has been studied in the Laplacian case in [START_REF] Buttazzo | Asymptotics of an optimal compliancelocation problem[END_REF]. Without significant change we have

Theorem 1.3.1. If D is an open bounded subset of R 2 and if g ≥ 0 is in L 2 (D)
, then the problem (1.9) admits a unique solution.

If we denote by K opt n the solution, then we have that ∞ K opt n γ-converge to ∞ D as n tends to +∞. However, the number of pixels x 0 in D to keep goes also to infinity. Thus, it gives no relevant information on the distribution of the points to retain. As pointed out in [START_REF] Bucur | Variational methods in shape optimization problems[END_REF], the local density of K opt n can be obtained by using a different topology for the Γ-convergence of the rescaled energies. In this new frame, the minimizers are unchanged but their behavior is seen from a different point of view. We define the probability measure µ K for a given set K in A m,n by

µ K := 1 n n i=1 δ xi .
We define the functional F n from P( D) into [0, +∞] by

F n (µ) := n D gv K dx, if ∃K ∈ A m,n , s.t. µ = µ K , +∞, otherwise.
The following Γ-convergence of F n theorem is similar to the one given in Theorem 2.2. in [START_REF] Buttazzo | Asymptotics of an optimal compliancelocation problem[END_REF].

Theorem 1.3.2. If g ≥ 0, then the sequence of functionals F n , defined above, Γ-converge with respect to the weak ⋆ topology in P( D) to As a consequence of the Γ-convergence stated in the theorem above, the empirical measure µ K opt n → µ opt weak ⋆ in P(R d ) where µ opt is a minimizer of F . Unfortunately, the function θ is not known explicitly. We establish here after that θ is positive, non-increasing and vanish after some point which will be enough for practical exploration. The next theorem gives an estimate of the function θ defined above. The proof is given in Section A.3.

F (µ) := D g 2 µ a θ(mµ 1/2 a )
Theorem 1.3.3. We have, for m in (0, t 1 ),

C 1 (α)| ln(m)| -C 2 (α) ≤ θ(m) ≤ C 3 (α)| ln(m)|,
where C 1 , C 2 and C 3 are constants depending on α.

Note. We can extend the results above to any g since we may formally split the discussion on the sets {g ≥ 0} and {g < 0}.

These estimates on θ suggest that to minimize F , when |g| is large, µ a should be large in order for θ to be close to its vanishing point, while when |g| is small µ a could be small. Formal Euler-Lagrange equation and the estimates on θ give the following information : to minimize

F (µ) := D g 2 µ a θ(mµ 1/2 a ) dx, one have to take µ 2 a |1 -log µ a | ≈ c m,f g 2 .
This introduces a soft-thresholding with respect to the first approach. To sum up, we can choose the interpolation data such that the pixel density is increasing with |g| = |∆f |. This soft-thresholding rule can be enforced with a standard digital halftoning. According to [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Ulichney | Digital Halftoning[END_REF][START_REF] Adler | The mathematics of halftoning[END_REF], digital halftoning is a method of rendering that convert a continuous image to a binary image, for example black and white image, while giving the illusion of color continuity. This color continuity is simulated for the human eye by a spacial distribution of black and white pixels. Two different kinds of halftoning algorithms exist : dithering and error diffusion halftoning. The first one is based on a so-called dithering mask function, while the other one is an algorithm which propagate the error between the new value (0 or 1) and the old one (in the interval [0, 1]). An ideal digital halftoning method would conserves the average value of gray while giving the illusion of color continuity.

Numerical Results

In this section, we present some numerical simulations to validate the previous theoretical analysis and we compare to other commonly used methods of image compression. We discretize the PDEs with a standard implicit finite difference scheme on a quasi-uniform mesh in order to make the comparisons easy. We have considered the method presented in this chapter that we will denote by L 2 -methods, more precisely we call L2-T the algorithm based on hard thresholding with the criteria obtained in Section 1.2, L2-H the algorithm based on the fat pixels variant (soft thresholding) and each algorithm is used with, respectively without, the halftoning based on Floyd-Steinberg dithering algorithm [START_REF] Floyd | Adaptive algorithm for spatial greyscale[END_REF]. The methods that we use for comparison purposes are the B-Tree algorithm [START_REF] Distasi | Image compression by B-tree triangular coding[END_REF] and a random mask selection. Next we discuss and present some extensions of the method in several ways : first, we allow a data modification on the compression set K to test how under the same framework and analysis the selected masks may be eventually improved. Secondly, we consider images corrupted with Salt and Pepper noise, though the L 2 -norms based reconstruction are less efficient. Finally, we consider the case of color images. We will denote f the initial image, f δ its noisy version and u the reconstructed one.

Numerical Simulations and Comparisons

For the L 2 -methods, respectively, H 1 based methods, we implement the hard threshold criteria, namely we select the pixels where |∆f | is maximum and the soft threshold algorithm of the fat pixels approach, where the selected pixels are chosen according to the distribution of |∆f |. The last algorithm uses a dithering procedure [START_REF] Floyd | Adaptive algorithm for spatial greyscale[END_REF].

In Table 1.1, Table 1.2 and Table 1.3, we give the L 2 -errors between the images f and u, as a function of the noise level for each method. We notice that the L 2 -errors are better than with B-Tree and random choices when the noise magnitude of the data is not too high whereas it deteriorates increasingly with the noise. In fact, the locations where |∆f | is high includes more noisy pixels which is reflected in the mask selection. This effect of taking more noisy pixels is amplified with compression ratio. We emphasize that our comparisons are only concerned with the influence of noise on the coding phase in compression and are by no means exhaustive. In particular, when the noise level is too high the criterion based on the locations where the Laplacian is maximum appears less efficient with respect to B-Tree (which include by construction an amount of denoising) or even the random choice of pixels, we will see how to improve the criterion in these cases. We can observe that the hard-thresholding method gives higher error without noise than with noisy image. This might by due to the laplacian in the mask criterium that allows a better distribution of the pixels inside the mask in the presence of noise.

In Figure 1.2, Figure 1.3 and Figure 1.4, we present various masks obtained and the corresponding reconstructed images. We notice that with no noise or low level ones, the masks consist of pixels located on, and close to, the edges which is intuitively expected. The soft threshold method includes few pixels from the homogeneous areas leading to a better reconstruction results. As the noise magnitude grows, increasingly noisy pixels are selected in the mask leading to poor reconstructions. (e) Mask with B-TREE method.

Noise

(f) Reconstruction with B-TREE method.

(g) Mask with RAND method.(h) Reconstruction with RAND method.

Figure 1.2: Masks and reconstructions for Table 1.2 when the input image is noiseless (σ = 0). (e) Mask with B-TREE method.

(f) Reconstruction with B-TREE method.

(g) Mask with RAND method.(h) Reconstruction with RAND method. (e) Mask with B-TREE method.

(f) Reconstruction with B-TREE method.

(g) Mask with RAND method.(h) Reconstruction with RAND method.

Figure 1.4: Masks and reconstructions for Table 1.2 when the input image is affected by gaussian noise (σ = 0.05).

Comparison with B-Tree

B-Tree algorithms seem in some examples to perform slightly better in terms of the L 2 -error. Actually, this is not surprising as B-Tree approach build the masks for compression by optimizing with respect to this norm. However, this is not a disadvantage to our approach when we compare with respect to some other constraints, e.g.

• the cost of the compression is higher than with our method in term of CPU time. This becomes worst with images of high resolution,

• B-Tree works only with regular grids, which is a serious limitation for images where features of importance (e.g. edges) are located outside the grid. For images with high anisotropy this shortcoming is more critical,

• in B-Tree algorithms refinement are necessary such as the choice of the parameters α which make them more image dependent.

Our approach gives an analytic criteria which allows to overcome most of these difficulties. We added more comparisons elements between the two approaches in the revised version to give a more complete image on their outcomes

Improving the Selection Criteria

The issue raised from the above experiments and analysis is how to improve the mask selection as |∆f | appears to be very sensitive to the noise magnitude? A way considered by [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF][START_REF] Hoeltgen | Optimising Spatial and Tonal Data for PDE-based Inpainting[END_REF] is to resort to tonal optimization where the data is simultaneously modified on K. In this paper we investigate first a more basic idea on how to modify the criterion under the same analysis presented in the previous sections. It is clear that any change in the data on the Dirichlet condition on K will causes a modification (e.g. a correction) on the final criterion. Intuitively, taking u = g on K where g is either less noisy than f or a copy of f with enhanced edges, it would lead a best pixels selection. The simplest ways to this are presented now.

Sharpening the Edges

We replace f by f := f -β∆f , β > 0. Then the criterion become : We notice that sharpening the edges lead to a slight improvement of the accuracy of the reconstruction, however this effect decreases as the noise level increases. This is due to the action of the operators ∆ and ∆ 2 which enforce the edges but also amplify the noise.

max |∆ f | ⇔ max |∆f -β∆ 2 f |.

(Pre)-Filtering the data

The idea here is to perform a small amount of filtering of the initial data. This may be performed on coarse mesh with the goal of reducing slightly the noise level. Thus, we replace

f by f ∈ H 1 (D) solution of f -β∆ f = f in D. The criterion become : max |∆ f | ⇔ max | f -f |.
We notice a significant improvement in the accuracy and the obtained mask. It is also important to notice that there is no need of blind and strong denoising as the linear filter is applied on coarse mesh with the aim of small reduction of the noise in the homogeneous areas, where intuitively we expect few pixels in the mask, and the similar action near the edges, with even some amount of blurring which do not affect too much the selection criterion.

We emphasize that others possible improvements within the same framework may be considered but clearly, a more systematic study in the spirit of tonal optimization is certainly a better choice in this direction.

Impulse Noise

We consider now images corrupted with impulse noise. In Figure 1.11, Figure 1.12 and Figure 1.13 we make some experiments with 2% of salt and pepper noise, respectively 1% of only salt noise and 1% of only pepper noise. These numerical simulations show that L 2 -methods do not give a satisfying reconstruction with this sort of noise. In fact, the Laplacian takes large values at the noisy pixels. Thus such pixels are selected in the inpainting mask, whereas linear diffusion denoising as it is well known, do not perform well (e.g. large stains in Figure 1.11 (c)). This suggests to minimize the L 1 -errors (instead of L 2 [START_REF] Nikolova | Minimizers of Cost-Functions Involving Nonsmooth Data-Fidelity Terms. Application to the Processing of Outliers[END_REF][START_REF]A Variational Approach to Remove Outliers and Impulse Noise[END_REF]) to remove the impulse noise like salt and pepper noise as shown in the figures.

Colored Images

A colored image can be modeled by a function

f from D to [0, 1] 3 , x → f R (x), f G (x), f B (x)
T , where functions f R , f G and f B are from D to R, represent red channel, green channel and blue channel respectively (Figure 1.14). Our strategy is to create three masks, one for each channel. This is done in Figure 1.15 where (a) is the original image and (c) is the reconstruction by keeping 10% of total pixels for each mask.

Since we compute a mask with a fixed number of pixels for each channel, the final mask, where the three masks are combined, may not have the same number of pixels. In fact, the three masks may not have common pixels or only some common pixels. More efficient strategies that use YCbCr color space instead of RGB space, have been investigated in [START_REF] Peter | Colour image compression with anisotropic diffusion[END_REF][START_REF] Peter | Turning Diffusion-Based Image Colorization Into Efficient Color Compression[END_REF][START_REF] Mohideen | Compressing Colour Images with Joint Inpainting and Prediction[END_REF].

Summary and Conclusions

We have considered the problem of finding the best interpolation data in PDE-based compression problems for images with noise. We aim to have a unified framework for both compression and denoising since it is not clear that doing this two tasks separately leads to satisfying results. We introduced a geometric variational model to determine a set K which minimizes the L p -distance between the initial image and its reconstruction from the datum in K. We extended the shape optimization approach introduced in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] based on the analysis in the framework of Γ-convergence. In particular, we studied the two approaches considered there which differ in the way a single pixel in K is taken. Both theoretical findings emphasize the importance of the Laplacian of appropriate data and highlight the deep connection between the geometric set and the inpainting operator (in our case time harmonic). We have performed several numerical tests and comparisons which demonstrate the efficiency of the approach in handling images with noise. Besides, ongoing research addresses on one hand, a systematic study of tonal optimization techniques as a further step towards a drastic reduction of the "size" of K without loss of accuracy. Secondly, extending the shape analysis methods to nonlinear reconstruction operators will open some exciting perspectives in the fields of PDE based image compression. This work may have several application like compression of "real world" images (since they always contain noise), video compression using only variational methods [START_REF] Andris | A proof-of-concept framework for PDE-based video compression[END_REF], microscopy imaging or denoising by inpainting [START_REF] Adam | Denoising by Inpainting[END_REF]. We consider some iterative methods for finding the best interpolation data in the images compression with noise. The interpolation data consists of the set of pixels and their grey/color values. The aim in the iterative approach is to allow the change of the data dynamically during the inpainting process for a reconstruction of the image that includes the enhancement and denoising effects. The governing PDE model of this approach is a fully parabolic problem where the set of stored pixels is time dependent. We consider the semi-discrete dynamical system associated to the model which gives rise to an iterative method where the stored data are modified during the iterations for best outcomes. Finding the compression sets follows from a shape-based analysis within the Γ-convergence tools developed in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF], in particular well suited topological asymptotic and a "fat pixels" approach are considered to obtain an analytic characterization of the optimal sets in the sense of shape optimization theory. We perform the analysis and derive several iterative algorithms that we implement and compare to obtain the most efficient strategies of compression and inpainting for noisy images. Some numerical computations are presented to confirm the theoretical findings. Finally, we propose a modified model that allows the inpainting data to change with the iteration and compare the resulting new method to the "probabilistic" ones from the state-of-the-art.

Introduction

Image compression and inpainting aim to reconstruct missing parts of an image from a chosen set of few known pixels, called inpainting mask [START_REF] Masnou | Level lines based disocclusion[END_REF][START_REF] Bertalmio | Image inpainting[END_REF]. PDE-based models have emerged among the most efficient methods in this field as they allow high quality reconstruction even from small set of pixels (masks) [START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF][START_REF] Galić | Towards PDE-Based Image Compression, in Variational, Geometric, and Level Set Methods in Computer Vision[END_REF] and the references therein. Actually, diffusion-based models [START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF][START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF][START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] are known to be efficient in image processing, particularly in image and video compression [START_REF] Andris | A proof-of-concept framework for PDE-based video compression[END_REF][START_REF] Andris | Inpainting-based Video Compression in FullHD[END_REF], and similar problems such as zooming or denoising [START_REF] Adam | Denoising by Inpainting[END_REF][START_REF] Lenzen | Partial Differential Equations for Zooming, Deinterlacing and Dejittering[END_REF].

It is commonly admitted in image compression problems, that both a well chosen inpainting operator and mask play a crucial role on the quality of the reconstruction and the efficiency of the compression strategy [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF][START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF][START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF]. In fact, one aims to use a simple differential operator (e.g. laplacian) for easy and cheap reconstruction, but without sacrificing important features of the image at hand (e.g. singularities -edges-). This may appears somehow contradictory (because of the regularizing effects of the operator) or at least calls for finding a good balance between the mentioned simplicity of the differential operator and the necessary care about too strong regularization. Now, fixing the operator, the main question is the following : is a good "choice" of the mask possible? and what is a good choice? Many studies show that apart from noise or textures, good mask candidates should include pixels from contours of objects in the image. A mathematical theory addressing such questions from the shape optimization point of view may be found in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], adapted to noisy images in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]. In particular, it is proven there that an optimal mask under "size constraints" exists and is easily characterized by an analytical criterium. The most significant advantage then being the selection of the mask for general meshes and without any cost (other than the storage of the pixels).

Recently, many research works ( [START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF][START_REF] Chizhov | Efficient Data Optimisation for Harmonic Inpainting with Finite Elements[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]) noticed that choosing the mask at once may be less efficient than improving it somehow iteratively, however without giving a clear and sound justified strategy for the iterative process.

In this chapter, we consider the linear heat equation as the inpainting operator and study the selection of a "time-dependent" set of optimal pixels using shape optimization tools, extending this way the results in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]. We present several strategies combining the shape optimization approach giving analytic criteria for masks selection and an enhancement process allowing to enrich/adapt such choice of pixels as well as the modification of the data on this points (tonal optimization). This turns to be a nice tool for image compression, particularly those with noise.

Related works

There exists important literature and several works addressing the problem of images compression (see [START_REF] Distasi | Image compression by B-tree triangular coding[END_REF][START_REF] Dell | Seed Points in PDE-Driven Interpolation[END_REF][START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF][START_REF] Hoeltgen | An Optimal Control Approach to Find Sparse Data for Laplace Interpolation[END_REF][START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF] and the references therein). Most of these methods require a significant amount of computation time for the masks selection as the set of pixels selected are built upon a process based on local choices at the scale of each pixel. Moreover, mostly, the notion of optimality of the selection criteria, in the mathematical sense, is barely considered, though some of these methods give very good results and may include powerful features such as a low storage cost, handling complex images (e.g. with noise or textures). Beside finding an optimal mask, [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] introduced a data optimization strategy allowing to modify the values stored on the inpainting mask to improve the reconstructed images. Loosely speaking, they optimize the spatial distribution of the inpainting data, with a probabilistic data sparsification followed by a nonlocal pixel exchange (randomly remove and add pixels in the mask to avoid being trapped in a local minimizer) and then they optimize the grey values in these inpainting points using a least squares approach. Other data optimization approaches have been proposed in [START_REF] Chizhov | Efficient Data Optimisation for Harmonic Inpainting with Finite Elements[END_REF] by using finite element method instead of finite differences method and deep learning techniques for both choosing the inpainting mask and values [5].

In this chapter, we aim to propose some iterative methods using both the mathematical results in the spirit of [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] and an iterative process to enhance the quality of the mask within a data optimization approach for images with noise. We study and analyze the problem of finding a set K for the time harmonic linear diffusion that is "time-dependent", in the sense of allowing mask's changes (by exchanging, removing, or adding pixels) and changes of the stored values during the process. We propose a deterministic all-in-one strategy for the mask choice and the tonal optimization. The enhancement of the mask selection is encoded in the criterium which is dependent on the previous values of the reconstructed image and the tonal optimization is performed by replacing the original values of the noisy image with those given by the iterative reconstruction. We compare different methods proposed here and those existing in the related literature, particularly in the presence of noise.

The standard PDE-based compression problem reads : let D ⊂ R 2 the support of an image (say a rectangle) and f : D -→ R, be an image which is assumed to be known only on some region K ⊂ D. There are several PDE models to interpolate f in D \ K, the simplest being the use of the linear elliptic equation, with Dirichlet boundary data f | K on K and homogeneous Neumann boundary conditions on ∂D. In our approach, we consider the iterative system of equations

Problem 2.0.1. For n ∈ N, given u n , find u n+1 in H 1 (D) such that      u n+1 -α∆u n+1 = u n , in D \ K n , u n+1 = f, in K n , ∂u n+1 ∂n = 0, on ∂D, (2.1)
with the initial conditions u 0 and K 0 . The data f in K n may be replaced during the iteration by a function h n , possibly depending on n, for tonal optimization and which in our case might be a "smoothed" version of f upon the iterations. Formally, the family of Problems 2.0.1, with α = δt, the time step, is a semi-implicit discrete system to solve

Problem 2.0.2. For t > 0, find u(t, •) in H 1 (D) such that      ∂ t u(t, •) -∆u(t, •) = 0, in D \ K t , u(t, •) = f, in K t , ∂u(t,•) ∂n = 0, on ∂D, (2.2)
u(0, •) = u 0 , in D,
It might be possible and interesting to make precise the word "formally" by providing a well suited topology of sets and addressing the question of convergence of the semi-discrete system to Problem 2.0.2 but this is a quite deep question beyond the scope of this chapter.

Problem 2.0.1 with a fixed K has been considered in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF] and may appears as a particular case of the iterative process where one look for an optimal inpainting mask once and for all. The goal in solving Problem 2.0.1 is to modify K n according to the change of the data (we notice that u n is less noisy than f ) while preserving the optimality at each step n. Thus, the iterative approach leads to adaptive improvement of the whole data with : topological changes in K n and stored values changes that is h n | Kn which may differ from f (tonal optimization).

We assume given f ∈ H 1 (D) and ∆f ∈ L 2 (D) with ∂f ∂n = 0, for simplicity though in practice f is a function of bounded variations with a non trivial jump set. In fact, the whole analysis in the paper extends to the case of f ∈ L 2 (D).

To ensure the first compatibility condition for the full parabolic system, with the non-homogeneous "boundary" condition, we take u(0, .) = f in D. Note that this choice is not in contradiction with image compression since the entire image is available during the encoding step. Denoting by u Kn the solution of Problem 2.0.1, the question is to identify the region K n which gives the "best" approximation u Kn , in a suitable sense, for example which minimizes some L p or Sobolev norms, e.g. in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] D |∇u Kn -∇f | 2 dx, For noisy images, a well suited choice for the reconstruction is to minimize the L p -norms of u Kn -f , particularly for p = 1 and p = 2, which are known to be good filters for a large class of additive noises. In this chapter, we will take p = 2 for easy computations of the topological gradient but the main analysis holds for p = 1.

Following [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], we develop at each step n > 0, two methods of finding an optimal shape. The first is based on a topological asymptotic (a gradient method) which gives pointwise information on the set of pixels to select and yields a hard thresholding approach. The second method consists in a finite dimensional shape optimization problem, where K n is taken as a union of small balls, i.e. a finite number of "fat pixels". Then, performing the asymptotic analysis by Γ-convergence when the number of pixels is increasing (in the same time that the fatness vanishes), we obtain useful information about the optimal distribution of the best interpolation pixels as a density function leading to soft thresholding approach.

In all cases, we obtain an optimal mask, in the sense mentioned above, and the values to be stored within the iterative method.

Organisation of the Chapter

In Section 2.1, we recall the mathematical model of the compression problem and we summarize the analysis steps and results referring interested readers to [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF] for details and recall the two methods proposed to construct our set of interpolation points at each step n. In Section 2.2, we propose three different algorithms based on the hard/soft-thresholding criterium stated in the previous section. In Section 2.3 we numerically compare the proposed algorithms for both image compression and image denoising. Finally, in Section 2.4, we propose a modified model that allows the inpainting data to change with the iteration and compare the resulting new methods with the so-called sparsification and densification algorithm [START_REF] Adam | Denoising by Inpainting[END_REF][START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF].

Review of the Continuous Model

In this section, we mainly recall and adapt results found in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF] in the case of the non-homogeneous linear diffusion inpainting.

Min-max Formulation

Let D be a smooth bounded open subset of R 2 . The shape optimization problem we study is, for a given n ∈ N, min Kn⊆D, cap(Kn)≤c

1 2 D |u Kn -f | 2 dx + α 2 D |∇(u Kn -f )| 2 dx u Kn solution of Problem 2.0.1 , (2.3)
where cap(E) is the capacity of a subset E in D i.e.

cap(E) = inf D |∇u| 2 dx + D u 2 dx u ∈ H 1 0 (D), u ≥ 1 a.e. in E ,
and c > 0. The image compression problem aims to find an optimal set of pixels from which an accurate reconstruction of the (noisy) image will be performed.

α 2 D |∇u| 2 dx + 1 2 D (u -u n ) 2 dx -β cap(K n ), (2.4)
for β > 0.

The next section is devoted to the analysis within the γ-convergence approach follows the same lines as in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF] with slight changes.

Analysis of the Model

It is well known that such shape optimization problems do not always have a solution (e.g. [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]), we seek a relaxed formulation, which yields a relaxed solution, that is to say, a capacity measure. Thus, we consider the relaxed problem

max µn∈M0(D) min u∈H 1 (D) α 2 D |∇u| 2 dx + 1 2 D (u -u n ) 2 dx + 1 2 D (u -f ) 2 dµ n -β cap(µ n ), (2.5)
where M 0 (D) is the set of all non negative Borel measures µ on D, such that

• µ(B) = 0, for every Borel set B subset of D with cap(B) = 0,

• µ(B) = inf µ(U ) U quasi-open, B ⊆ U , for every Borel subset B of D,
and cap(µ) is the measure capacity i.e. for µ in M 0 (D), cap(µ) := inf

u∈H 1 0 (D) D |∇u| 2 dx + ν D u 2 dx + D (u -1) 2 dµ.
Next we give a natural way to identify a set to a measure of M 0 (D). Let E be a Borel subset of D. We denote by ∞ E the measure of M 0 (D) defined by

∞ E (B) := +∞, if cap(B ∩ E) > 0, 0, otherwise.
, for all B Borel subset of D.

Formally, when µ n = ∞ A in (2.5), we penalize the functional which is equal to +∞ until u = f in A. Somehow, we embed the Dirichlet condition into the min-max problem thanks to this penalization. For technical reasons, we want to include balls centered at points x 0 in D, that we do not want to be too close to the boundary of D, we introduce the following notations for δ > 0,

D -δ := {x ∈ D | d(x, ∂D) ≥ δ} ⊆ D, K δ (D) := {K ⊆ D | K closed, K ⊆ D -δ }, and
M δ 0 (D) := {µ ∈ M 0 (D) | µ D\D -δ = 0} ⊆ M 0 (D).
We have that (2.5) is the relaxed formulation of the optimization problem (2.4) in the sense of the γ-convergence (Theorem 1.4 in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]) :

Theorem 2.1.1. We have, sup K∈K δ (D) E(∞ K ) -β cap(∞ K ) = max µ∈M δ 0 (D) E(µ) -β cap(µ) ,
where E(µ) := min

u∈H 1 (D) F µ (u), and
F µ (u) := α D |∇u| 2 dx + D (u -f ) 2 dµ, if |u| ≤ |f | ∞ , +∞, otherwise.
This result gives us the existence of a relaxed solution which γ-converges to the "solution" of our shape optimization problem. In order to solve the relaxed problem, we may use a shape derivative with respect to the measures µ n . However, such a method yields diffuse measures, thus too thick sets whereas we seek discrete sets of pixel.

Topological Gradient

Here, we aim to compute the solution of our optimization problem (2.3) by using a topological gradientbased algorithm as in [START_REF] Larnier | The Topological Gradient Method: From Optimal Design to Image Processing[END_REF][START_REF] Garreau | The Topological Asymptotic for PDE Systems: The Elasticity Case[END_REF]. This kind of algorithm consists in starting with K n = D and determining how making small holes in K n affect the cost functional to find the balls which have the most decreasing effect. To this end, let us define K n ε the compact set K n \ B(x 0 , ε) where B(x 0 , ε) is the ball centered in x 0 ∈ D with radius ε > 0 such that B(x 0 , ε) ⊂ K n . From now, we consider the variable v Kn := u Kn -f , with u Kn solution of Problem 2.0.1. Let us denote by j the functional

j : A ⊂ D → min v∈H 1 (D), v=0 in A α 2 D |∇v| 2 dx + 1 2 D v 2 dx - D g n v dx,
where g n := u n -f + α∆f . We denote by v n ε the minimizer of j(K n ε ) and we have Proposition 2.1.2. With notations from above, we have when ε tends to 0,

j(K n ε ) -j(K n ) = π 2 g n (x 0 ) 2 ε 2 ln(ε) + O(ε 2 ).
Since for ε < 1, ln ε < 0, the result above suggests to keep the points x 0 where |u n (x 0 ) -f (x 0 ) + α∆f (x 0 )| 2 is maximal, when ε small enough. In the next section, we will see that such a strict threshold rule might be relaxed.

Optimal Distribution of Pixels :

The "Fat Pixels" Approach

In this section, we change our point of view by considering "fat pixels" instead of a general set of interpolation points. In the sequel, we will follow [START_REF] Buttazzo | Asymptotics of an optimal compliancelocation problem[END_REF][START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]. We restrict our class of admissible sets as an union of balls which represent pixels. For m > 0 and k ∈ N, we define

A m,k := D ∩ k i=1 B(x i , r) x i ∈ D r , r = mk -1/2 ,
where D r is the r-neighborhood of D. We consider problem (2.3) for every

K n ∈ A m,k i.e. min Kn∈A m,k 1 2 D (u Kn -f ) 2 dx + α 2 D |∇u Kn -∇f | 2 dx u Kn solution of Problem 2.0.1 . (2.6)
By setting v Kn := u Kn -f , this last optimization problem can be reformulated as a compliance optimization problem. We set g n := u n -f + α∆f like in the previous section. Here, we do not need to specify a size constraint on our admissible domains. Indeed, imposing K n ∈ A m,k implies a volume constraint and a geometrical constraint on K n since K n is formed by a finite number of balls with radius m k -1/2 . The well-posedness of such a problem has been studied in the laplacian case in [START_REF] Buttazzo | Asymptotics of an optimal compliancelocation problem[END_REF]. As pointed out in [START_REF] Bucur | Variational methods in shape optimization problems[END_REF], the local density of K n,opt k , the optimal solution, can be obtained by using a different topology for the Γ-convergence of the rescaled energies. In this new frame, the minimizers are unchanged but their behavior is seen from a different point of view. We define the probability measure µ K for a given set K in A m,k by

µ K := 1 k k i=1 δ xi .
We define the functional F n k from P( D) into [0, +∞] by

F n k (µ) := k D g n v Kn dx, if ∃K n ∈ A m,k , s.t. µ = µ Kn , +∞, otherwise.
The following Γ-convergence of F n k theorem is similar to the one given in Theorem 2.2. in [START_REF] Buttazzo | Asymptotics of an optimal compliancelocation problem[END_REF].

Theorem 2.1.2. Then the sequence of functionals F n k , defined above, Γ-converge when k tends to +∞ with respect to the weak ⋆ topology in P( D) to

F n (µ n ) := D (g n ) 2 µ n a θ m(µ n a ) 1/2 dx, (2.7)
where µ n = µ n a dx + ν n is the Radon-Nikodym-Lebesgue decomposition of µ n ([62], Theorem 3.8) with respect to the Lebesgue measure and

θ(m) := inf K k ∈A m,k lim inf k→+∞ k D g n v K k dx, v Kn := u Kn -f , u Kn solution of Problem 2.0.1.
As a consequence of the Γ-convergence stated in the theorem above, the empirical measure µ K n,opt k → µ n,opt weak ⋆ in P(R d ) where µ n,opt is a minimizer of F n . Unfortunately, the function θ is not known explicitly. Formal Euler-Lagrange equation and the estimates on θ [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF] give the following information : to minimize (2.7) one have to take

(µ n a ) 2 |1 -log µ n a | ≈ c m,f (u n -f + α∆f ) 2 .
This introduces a soft-thresholding with respect to the first approach. To sum up, we can choose the interpolation data such that the pixel density is increasing with

|u n -f + α∆f |.

The Iterative Methods

With the model proposed in previous sections it is clear that we do need the complete sequence of optimal set (K n ) n in order to reconstruct the solutions (u n ) n . While it does not represent a problem for denoising only purpose, it is not conceivable to store the complete sequence of inpainting mask for compression purpose. To overcome this issue, we propose in this section three algorithms, with on one side the hard-threshold criteria, namely we select the pixels where |u n -f + α∆f | is maximum and on the other side, the soft-threshold criteria of the fat pixels approach, where the selected pixels are chosen according to the distribution of |u n -f + α∆f |.

L2-INSTA

Encoding. During the encoding step, the original image is known on the whole domain D. We can thus set u 0 = f in D. We provide the input image f and the desired pixel density 0 < c < 1, and the algorithm produces the "optimal" mask K. We notice that K is only optimal in the sense that it is a limit of optimal sets K n . At each iteration, we compute and use a new mask without preserving the previous set. The stopping criterium is a given integer N corresponding to the level of error on the reconstruction we want to achieve. We note that with this algorithm, K 0 is the same set as in the stationary case [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]. The complexity of the encoding is O(N ). We give the algorithm of L2-INSTA in Algorithm 6. Decoding. During the decoding step, the data are only available on K. Therefore, we must not use the image f in D \ K for the inpainting problem. We propose to put u 0 to zero in D \ K. However, doing this choice leads to a reconstruction u which is near zero in the unknown set when computing the homogeneous heat equation for small time t. Since we want to compute the reconstruction at the same time as in the encoding step, we have to choose t = N α. Thus, to have large t, we can either have a large number of iteration N , either a large time-step α. But, for large α, the criterium will be close to |∆f | and the resulting mask will not depends on u n anymore. Thus, a good choice would be to have a small time-step α and a large iteration number N in the encoding step. Note that for the decoding step, we can directly compute the reconstruction at time t = N α by performing only one iteration.

Data

L2-DEC

Encoding. In their article, Mainberger et al proposed a probabilistic algorithm to compute an inpainting mask for a given inpainting method [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF]. This sparsification algorithm is described as follow : we start with a mask containing all the pixels of the image, then at each iteration, we randomly delete a fraction of the pixels of the mask, we inpaint, we calculate the local error at each deleted pixel and we put back in the mask a subset of the deleted pixels presenting the most important error. We propose a modified algorithm based on the sparsification one that we call L2-DEC. The difference here is that, instead of selectionning a small random candidate set of pixels for each iteration, we directly choose an optimal set with respect to the criterion stated in this chapter for the current iteration. Using this strategy eliminate the probabilistic nature of the algorithm. The complexity of the encoding is O c q , with q the fraction of finally deleted pixel at the end of the iteration. Despite we give the algorithm of L2-DEC in Algorithm 7 for completness, we believe that L2-DEC is not pertinent. Indeed, for every point x 0 in K n , u n (x 0 ) = f (x 0 ) and the criterion becomes

|u n (x 0 ) -f (x 0 ) + α∆f (x 0 )| = |f (x 0 ) -f (x 0 ) + α∆f (x 0 )| = α|∆f (x 0 )|.
The algorithm will remove pixel with the lowest values |∆f | and produce the same mask as the optimal one for the homogeneous diffusion inpainting [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. We propose this theoretical algorithm for completeness purpose, but we will not realize numerical computations.

Data: Original (noisy) image f , parameter (time-step) α > 0, fraction q of pixel removed, desired pixel density c ∈ (0, 1). Result: Inpainting mask K ⊂ D, last encoding reconstruction u N .

1 u 0 ← f ; 2 K ← D; 3 n ← 0; 4 while |K| > c |D| do 5
Keep in K the |K| -q |D| pixel in K by using the hard/soft-thresholding criterium i.e.

|u n -f + α∆f |;

6 Compute u n+1 , solution of Problem 2.0.1;

7 n ← n + 1;
8 end Algorithm 7: L2-DEC.

Decoding. As described in the original paper of the sparsification algorithm [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF], we should use the same inpainting (with the same parameters) as the one used in the encoding iterations, namely the discretized heat equation. However, as explained in the previous section, in order to have a pertinent reconstruction we should take the time-step α large enough. Such a choice will lead to a constant inpainting mask with respect to the iterations, which is not the purpose of this paper. We propose instead to use the homogeneous diffusion inpainting [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] to reconstruct the image from data in K.

L2-INC

Encoding. Peter et al proposed the densification algorithm [START_REF] Peter | Turning Diffusion-Based Image Colorization Into Efficient Color Compression[END_REF][START_REF] Adam | Denoising by Inpainting[END_REF]. We start with an empty mask and, for each iteration, we randomly choose α pixels that do not belong to the mask. We then add only the single pixel that improves the global reconstruction error with respect to the image. In order to make the comparison possible with the following proposed algorithm, we propose to not only add one pixel but to add the fraction q of pixels that improves the most the global reconstruction error with respect to the image. With our proposed algorithm, we directly choose an optimal candidate set with respect to the criterion stated in this chapter for the current iteration instead of choosing a small random candidate set of pixel for each iteration. The complexity of the encoding is O c q . We give the algorithm of L2-INC in Algorithm 8.

Data: Original (noisy) image f , parameter (time-step) α > 0, fraction q of pixel added, desired pixel density c ∈ (0, 1). Result:

Inpainting mask K ⊂ D, last encoding reconstruction u N . 1 u 0 ← f ; 2 K ← ∅; 3 n ← 0; 4 while |K| < c |D| do 5
Add the q |D| pixels in D \ K by using the hard/soft-thresholding criterium i.e.

|u n -f + α∆f |, and add them to K; Decoding. With the same reasoning as the decoding step of the L2-DEC algorithm, we propose to use the homogeneous diffusion inpainting to reconstruct the image from data in K.

Numerical Comparison of the Iterative Methods

In this section, we will present numerical results and comparisons between the presented methods from Section 2.2. The soft-thresholding rule from the "fat pixel" point of view can be enforced with a standard digital halftoning. Digital halftoning is a method of rendering that convert a continuous image to a binary image while giving the illusion of color continuity [START_REF] Ulichney | Digital Halftoning[END_REF][START_REF] Adler | The mathematics of halftoning[END_REF]. This color continuity is simulated for the human eye by a spacial distribution of black and white pixels. An ideal digital halftoning method would preserves the average value of gray while giving the illusion of color continuity. For the experiment using the soft-thresholding rule, we use the Floyd-Steinberg dithering [START_REF] Floyd | Adaptive algorithm for spatial greyscale[END_REF] except for L2-INCfor reasons that will be discussed in the related section. We use the notation "name-of-the-algorithm-T " and "name-of-the-algorithm-H " to distinguish the hard-and soft-thresholding criteria used.

Image Compression

As discussed in the previous section, for L2-STA-algorithms, we take for α = 0.05 (a small value). For L2-INC-H, we cannot use the Floyd-Steinberg algorithm since it is biased by the error propagation when the number of pixel demanded is to small (here, we choose to add 50 pixels per iteration). This leads to select pixel localised in the bottom-right part of the image. As an alternative, we propose to use a halftoning method based on the Lloyd's method instead of error propagation [START_REF] Secord | Weighted Voronoi stippling[END_REF]. Algorithms H1-T and H1-H correspond to the methods described in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], namely, the hard/soft-thresholding of the absolute value of the laplacian of the input image f δ i.e. |∆f δ |. These two methods have the advantage to not require any reconstructions during the encoding phase. However, since our input image may contain noise, the laplacian will be highly perturbed and the information given by the edges will be lost. It will lead to a poor reconstructions for images that contain noise. In most of the case, L2-INC-T gives greater or similar reconstruction quality than the other methods. It can be explained by the fact that, for each iteration, we add to the mask a small amount of best pixels for the current iteration. Thus, we keep important pixels for previous iterations and somehow store the full sequence of optimal sets (K n ) n containing a few number of pixels. Contrasting with them, the L2-INSTA-methods "forget" at each iteration the optimal pixel set from the previous iterations. This leads to a poorer visual quality in the reconstruction. It is also interesting to notice that our model and then our analytical criteria are more robust to noise than the one using the homogeneous diffusion as inpainting operator, namely the H1-methods. It confirm the pertinence of our model to handle image with gaussian noise.

In Table 2.1 and Table 2.2, we give the L 2 -errors between the image f and the reconstruction u (we write L 2 in the tables), as a function of the gaussian noise standard deviation for each method for different size of mask. In Figure 2.2, Figure 2.3 and Figure 2.4 (Section 2.5), we present various masks obtained and the corresponding reconstructed images. In Figure 2.1 we see in particular that, in order to reconstruct an homogeneous part of the image, L2-INC-T select a few amount of pixels (here 4 pixels) whereas an halftoning algorithm way more redundant pixels. It leads to more pixels available to spend near the edges in L2-INC-T and then, a better reconstruction. (f) Zoom.

Noise H1-T H1-H L2-INSTA-T L2-INSTA-H L2-INC-T L2-INC-H L 2 L 2 N L 2 N L 2 α L 2 α L 2 0
Noise H1-T H1-H L2-INSTA-T L2-INSTA-H L2-INC-T L2-INC-H L 2 L 2 N L 2 N L 2 α L 2 α L 2 0
(g) Edges with L2-STA-H method.

(h) Zoom.

Image Denoising

We start by making the hereafter observation : for well chosen parameters, the error between the original image f and the solution u n decreases during the encoding step and becomes lower than the error between the original image f and the noised one f δ . In fact, this error on u n is lower than the one on f δ from the first iteration. We propose then to use the last encoding reconstruction u N of algorithms L2-INSTA and L2-INC, Algorithm 6 and Algorithm 8 respectively, as denoised version of f δ . For every noise level σ, we take take 1% of the total pixel in the mask for L2-INSTA-and 2% for L2-INC-methods except when σ = 0.2, we take 4% for the L2-INC-methods. In any case, we set α = 0.01. It appears that L2-INC-are almost as efficient as the linear diffusion filter, which gives the lowest error, but are more edges preserving than the linear diffusion filter. As expected, every of the proposed methods perform noise removing and we will exploit this feature in the next section.

We give in Table 2.3 the L 2 -error between f and u N with respect to noise level in f δ for the methods proposed in this paper and for the linear diffusion filter of parameter η, which is known to remove gaussian noise, and the resulting images in Figure 2.5 (Section 2.6).

Noise ∥f -

f δ ∥ L 2 (D) Lin. Filter L2-INSTA-T L2-INSTA-H L2-INC-T L2-INC-H η L 2 N L 2 N L 2 L 2 L 2 0.

Numerical Comparison with the "Probabilistic" Methods

In this section, we present numerical results and comparisons with some stat-of-the-art compression by inpainting methods for image with noise. In the following we denote by SPAR the sparsification algorithm without the nonlocal pixel exchange post-optimization (step within every sparsification's iteration to avoid source locality due to local error computation) from [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] and by DENS a modified version of the original densification algorithm from [START_REF] Adam | Denoising by Inpainting[END_REF], that we will describe in the sequel. The knowledge of the previous section motives us to replace f by u n as Dirichlet boundary condition in the inpainting mask K, and thus, to replace f by u n in the shape optimization problem (2.3) : for a given n ∈ N, min Kn⊆D, cap(Kn)≤c

1 2 D |u Kn -u n | 2 dx + α 2 D |∇(u Kn -u n )| 2 dx , (2.8)
with u Kn solution of Problem 2.4.1. For n ∈ N, given u n , find u n+1 in H 1 (D) such that

     u n+1 -α∆u n+1 = u n , in D \ K n , u n+1 = u n , in K n , ∂u n+1 ∂n = 0, on ∂D, (2.9)
Since the analysis remains the same as in Section 2.1, these changes yield to a new criterion, namely |∆u n | for both hard-and soft-thresholding. This tonal optimization avoid brutal smoothing of the image during the first iterations. Tonal optimization consists in changing the value of pixel in a given inpainting mask in order to improve the overall image's reconstruction quality [START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF]. Like for the previous algorithms, we take u 0 = f in D for the encoding step since the entire noisy image is available, but we set u 0 to zero on D \ K during the decoding step.

As suggested by the authors in the original paper of the SPAR algorithm, the candidate set have 2% of the pixel in D, and we choose the finally removed numbers of pixel to be 50 pixels from the candidate set. To make the comparison possible, we propose to remove/add a fixed number of pixel (we choose 50 pixels) at each iteration for the appropriate algorithms. Then, we have to modify the DENS algorithm, since it originally add one single pixel per iteration. This modification induces lower visual quality for the reconstruction with a high gain for the computation time. Also, we choose the number of randomly selected candidates per iteration to be 100 which still require a lot of computation time. Therefore, we have 100 reconstructions to compute at each iteration. We name the method from this new model combined with Algorithm 8 and hard-thresholding L2-INC-T-E.

L2-INC-T-E seems to efficiently denoise the input image while compressing and outperform the SPAR method and the DENS method for high level of noise. However, our new model is designed to handle input image with gaussian noise and then, perform worst than the previous model when the image does not contain noise.

We give in Table 2.3 the L 2 -error between f and u N with respect to noise level in f δ for the L2-INC-T-E method proposed in this section and the "probabilistic" methods from the state-of-the-art and we give in Figure 2

Summary and Conclusions

In this chapter, we have considered a new fully parabolic model based on the heat equation for PDE images compression and formulate an associated shape optimization problem for the best choice of data interpolation choice. By using the results found in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF], we proved that it has a relaxed solution in the framework of the γ-convergence and we proposed two points of view for choosing an optimal inpainting mask : a first one that use an asymptotic development similar to the topological gradient, and a second one by considering the sets formed by a finite number of balls that we called "fat pixels". Unlike the stationary case, the iterative approach include the results of the previous steps in the analytic criterion giving the best choice which is now depending on the iterations. Next, we proposed and implemented three algorithms to construct the sequences of inpainting mask (K n ) n : L2-INSTA, L2-DEC and L2-INC, and we performed several simulations with different compression rates and different amounts of noise for grayscale images. It appears that in most cases, masks issued form L2-INC-T outperforms the other ones.

Finally, we performed a tonal optimization within the same method by changing the Dirichlet boundary conditions on the mask, which appears to give better results for denoising while compressing an image with noise than the sparsification and the densification algorithms [START_REF] Adam | Denoising by Inpainting[END_REF][START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] for high level of noise. 2.2 when the input image is affected by gaussian noise (σ = 0.05).

Reconstructions for

Abstract

We consider a shape optimization based method for finding the best interpolation data in the compression of images with noise. The aim is to reconstruct missing regions by means of minimizing a data fitting term in an L p -norm between original images and their reconstructed counterparts using linear diffusion PDE inpainting. Reformulating the problem as a constrained optimization over sets (shapes), we derive the topological asymptotic expansion of the considered shape functionals with respect to the insertion of small ball (a single pixel) using the adjoint method. Based on the achieved distributed topological shape derivatives, we propose a numerical approach to determine the optimal set and present numerical experiments showing, the efficiency of our method. Numerical computations are presented that confirm the usefulness of our theoretical findings for non-stationary PDE-based image compression.

keywords image compression -shape optimization -adjoint method -image interpolation -inpainting -PDEs -image denoising

Introduction and Related Works

PDE-based methods have attracted growing interest by researchers and engineers in image analysis field during the last decades [START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF][START_REF] Catté | Image Selective Smoothing and Edge Detection by Nonlinear Diffusion[END_REF][START_REF] Weickert | Theoretical Foundations Of Anisotropic Diffusion In Image Processing[END_REF][START_REF] Masnou | Level lines based disocclusion[END_REF][START_REF] Weickert | Linear Scale-Space has First been Proposed in Japan[END_REF][START_REF] Bertalmio | Image inpainting[END_REF][START_REF] Scherzer | Variational Methods in Imaging[END_REF][START_REF] Lenzen | Partial Differential Equations for Zooming, Deinterlacing and Dejittering[END_REF][START_REF] Larnier | The Topological Gradient Method: From Optimal Design to Image Processing[END_REF][START_REF] Adam | Denoising by Inpainting[END_REF]. Actually, such methods have reached their maturity both from the point of view of modeling and scientific computing allowing them to be used in modern image technologies and their various applications. Image compression is one of the domain where they appear among the state-of-the-art methods [START_REF] Chan | Nontexture Inpainting by Curvature-Driven Diffusions[END_REF][START_REF] Galić | Image Compression with Anisotropic Diffusion[END_REF][START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF][START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF][START_REF] Peter | Colour image compression with anisotropic diffusion[END_REF][START_REF] Andris | A proof-of-concept framework for PDE-based video compression[END_REF][START_REF] Mohideen | Compressing Colour Images with Joint Inpainting and Prediction[END_REF]. In fact, the aim for such problems is to store few pixels of a given image (coding phase) and to recover/restore the missing part in an accurate way (decoding). The PDE-based methods use a diffusion differential operator for the inpainting of missed parts from a available data (boundary or small parts of the initial image) therefore their efficiency for decoding is guaranteed/encoded in the operator without any pre-or post-treatment. The question then is how to ensure with these methods a good choice, if it exists, of the "best" pixels to store for high quality reconstruction of the entire image? An answer to this question is given in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF] for the harmonic or the heat equation, where its reformulation as a constrained (shape) optimisation problem permitted to exhibit an optimal set of pixels to do the job. In addition, analytic selection criteria using topological asymptotics were derived. Due to the simple structure of the shape functionals considered in these previous works, the topological expansion is easily derived (more or less with formal computations) and gives an analytic criterion to characterize the optimal set in compression. The limitation in obtaining the topological expansion this way is twofold : the criterion gives pointwise information on the importance of the location (pixel) to store which results in hard thresholding selection strategy not robust with respect to the noise. Second, the technique is limited to simple functionals, namely an L 2 data-fitting term and a linear diffusion operator.

In this chapter, we consider the compression problem in the same framework but we introduce a new approach to the characterization of the set of pixels to store based on the use of the adjoint method [START_REF] Guillaume | The Topological Asymptotic Expansion for the Dirichlet Problem[END_REF][START_REF] Garreau | The Topological Asymptotic for PDE Systems: The Elasticity Case[END_REF][START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF][START_REF] Belhachmi | Topology optimization method with respect to the insertion of small coated inclusion[END_REF]. This approach to obtain the topological expansion is more general than the one previously studied, in the sense that it may be used for other diffusion operators and nonlinear data-fitting term, moreover it allows a better stability with respect to noise for the selection criteria. In particular, when the accuracy of the reconstruction (fidelity term) is measured with an L p -norm, p > 1 and p ̸ = 2, the adjoint problem is still linear and no further complexity is added to the considered problem. Thus, the main results in the chapter includes the rigorous derivation of the topological expansion based on the adjoint problem. We follow mainly the approaches developed by [START_REF] Garreau | The Topological Asymptotic for PDE Systems: The Elasticity Case[END_REF] and [START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF], however, the Dirichlet boundary in the inclusion itself and te form of the elliptic operator, prevents from a direct transposition of their adjoint method based on a local perturbation of the material properties. Therefore, we extend the sensibility analysis to the problem under consideration and we perform the asymptotic expansion of the proposed shape functional using non-standard perturbation techniques combined with a truncation technique. The asymptotic expansion allows us to deduce a gradient algorithm.

Organization of the Chapter

The chapter is organized as follows : in Section 3.1, we introduce the compression problem that takes the form of a constrained optimization problem of finding the best set of pixels to store, denoted K. Section 3.2 is devoted to describe the adjoint method to compute the topological derivative of the cost functionals considered. In Section 3.3, we perform the computations to obtain the topological expansion and the "shape" derivatives which involve the direct and adjoint states. Finally, in Section 3.4, we describe the resulting algorithm and we give some numerical results to confirm the usefulness of the theory. Some of the technical proofs and auxiliary estimates are given in appendices for ease of readability.

Problem Formulation

Let D ⊂ R 2 and f : D → R d , d ≥ 1 a
given image in some region K ⊂⊂ D. We consider the mixed elliptic boundary problem for a given u 0 in L 2 (D),

Problem 3.1.1. Find u in H 1 (D) such that      u -α∆u = u 0 , in D \ K, u = f, in K, ∂u ∂n = 0, on ∂D. (3.1)
where the available data f is a Dirichlet "boundary" condition and with homogeneous Neumann boundary condition on ∂D. This PDE corresponds to the first term in the time discretization of the homogeneous heat equation, where we assume that the initial condition is u 0 . For compatibility condition with the "boundary" data on K, we take as u 0 the image f ∈ H 1 (D), with ∆f ∈ L 2 (D) and such that ∂f ∂n = 0 on ∂D. Setting v = u -f , we can write equivalently

Problem 3.1.2. Find v in H 1 (D) such that      v -α∆v = α∆f, in D \ K, v = 0, in K, ∂v ∂n = 0, on ∂D. (3.2)
Denoting by v K = u K -f the solution of Problem 3.1.2, the question is to identify the region K which gives the "best" approximation u K , in a suitable sense, that is to say which minimizes some L p -norm. The constrained optimization problem for the compression reads [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], for p > 1, min K⊆D, m(K)≤c

1 p D |u K -f | p dx u K solution of Problem 3.1.1 , (3.3)
where m is a "measure". We notice that because of the non differentiability of the functional when p = 1, we may apply the following analysis by regularizing in an usual way the function v → |v|. The optimization problem (3.3) is studied in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF] and the existence of an optimal set is established when m is the capacity of sets [START_REF] Ziemer | Extremal length and p-capacity[END_REF]. To characterize this set K, we aim to compute the topological gradient [START_REF] Cea | Quelques resultats sur l'identification de domaines[END_REF][START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF] of the shape functional. Let x 0 ∈ D and K ε = K ∪ B(x 0 , ε) (B(x 0 , ϵ) denotes the ball centred at x 0 with radius ε), then we look for an expansion of the form

J(u Kε ) -J(u K ) = ρ(ε) G(x 0 ) + o ρ(ε) .
where ρ is a positive function going to zero with ε and G is the so called topological gradient [START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF][START_REF] Belhachmi | Topology optimization method with respect to the insertion of small coated inclusion[END_REF][START_REF] Garreau | The Topological Asymptotic for PDE Systems: The Elasticity Case[END_REF]. Therefore, to minimize the cost functional J, one has to create small holes at the locations x where G(x) is the most negative. For the compression problem this amount to select the location where the pixel is the most important to keep.

Topological Derivative with Adjoint Method

We introduce the following abstract result which describes an adjoint method for the computation of the first variation of a given cost functional (see for instance [START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF]). Let V be a Hilbert space. We recall the involved norms in Section B.1 in Appendix B. For ε ∈ [0, ζ], ζ > 0, we consider a symmetric bilinear form a ε : V × V → R and a linear form l ε : V → R such that the following assumptions are fulfilled :

• |a ε (v, w)| ≤ M 1 ∥v∥∥w∥, ∀(v, w) ∈ V × V (continuity of the bilinear form), • a ε (v, v) ≥ α∥v∥ 2 , ∀v ∈ V (uniform coercivity), • |l ε (w)| ≤ M 2 ∥w∥, ∀w ∈ V (continuity of the linear form),
with α, M 1 , M 2 > 0 independent of ε. Moreover, we suppose that there exists a continuous bilinear form δa : V × V → R, a continuous linear form δl : V → R and a function ρ : R + → R + such that, for all ε ≥ 0,

• ∥a ε -a 0 -ρ(ε) δa∥ L2(V ) = o ρ(ε) , • ∥l ε -l 0 -ρ(ε) δl∥ L(V ) = o ρ(ε) , • lim ε→0 ρ(ε) = 0.
We emphasis that δa and δl do not depend on ε. Finally, for all ε ∈ [0, ζ], consider a functional J ε : V → R, Fréchet-differentiable at the point v 0 . Assume further that there exists a number δJ(v 0 ) such that

J ε (w) -J 0 (v) = DJ 0 (v)(w -v) + ρ(ε) δJ(v) + o ∥w -v∥ + ρ(ε) , ∀(v, w) ∈ V × V.
Then we have [START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF] Theorem 3.2.1. Let v ε ∈ V be the solution of the following problem : find v ∈ V such that,

a ε (v, φ) = l ε (φ), ∀φ ∈ V.
Let w 0 be the solution of the so-called adjoint problem : find w ∈ V such that

a 0 (w, φ) = -DJ 0 (v 0 )φ, ∀φ ∈ V. Then, J ε (v ε ) -J 0 (v 0 ) = ρ(ε) δa(v 0 , w 0 ) -δl(w 0 ) + δJ(v 0 ) + o ρ(ε) .
To be more specific, for x 0 ∈ D and r > 0, we denote by B r the open ball centred at x 0 and of radius r. We set

V ε := {v ∈ H 1 (D \ B ε ) | v = 0 on ∂B ε }.
Then we consider the boundary value problem :

Problem 3.2.1. Find v ε in V ε such that      -α∆ v ε + v ε = h, in D \ B ε , v ε = 0, in B ε , ∂ n v ε = 0, on ∂D. (3.4)
with h := α∆f , but h can be any L 2 (D) function. We denote v 0 the solution of the problem

Problem 3.2.2. Find v 0 in H 1 (D) such that -α∆ v 0 + v 0 = h, in D, ∂ n v 0 = 0, on ∂D. (3.5)
The dependency of the space V ε on ε prevents us from using Theorem 3.2.1 directly, therefore, we introduce a truncation technique [START_REF] Guillaume | The Topological Asymptotic Expansion for the Dirichlet Problem[END_REF], which consists of inserting a ball B R , for a fixed R > ζ and splitting Problem 3.2.1 into two sub-problems that we glue at their common boundary (see Figure 3.1). More precisely, we consider the sub-problems : an internal problem

     -α∆v ε,R + v ε,R = h, in B R \ B ε , v ε,R = 0, on ∂B ε , v ε,R = v ε , on ∂B R ,
and an external problem As the two sub-problems transform the initial one into a transmission problem. We have Proposition 3.2.1. We have,

     -α∆v ε + v ε = h, in D \ B R , ∂ n v ε = ∂ n v ε,R , on ∂B R , ∂ n v ε = 0, on ∂D. D \ B ε B ε v ε (a) Before splitting. D \ B R B R \ B ε B ε v ε v ε,R (
v ε = v ε , in D \ B R , v ε,R , in B R \ B ε .
For the internal problem, we introduce the notation v h,ϕ ε instead of v ϵ,R , the solution of the more general problem

Problem 3.2.3. Find v h,ϕ ε in {v ∈ H 1 (B R \ B ε ) | v = 0 on ∂B ε } such that      -α∆v h,ϕ ε + v h,ϕ ε = h, in B R \ B ε , v h,ϕ ε = 0, on ∂B ε , v h,ϕ ε = ϕ, on ∂B R . (3.6) Therefore, v ε,R = v h,ϕ ε , when ϕ = v ε . We also notice that, v h,ϕ ε = v h,0 ε + v 0,ϕ ε . We remind the Dirichlet-to-Neumann operator T ε : H 1/2 (∂B R ) → H -1/2 (∂B R ) by T ε (ϕ) := ∇v 0,ϕ ε • n. and we set h ε := -∇v h,0 ε • n ∈ H -1/2 (∂B R ). Hence, setting V R = H 1 (D \ B R ),
we can rewrite the external problem using this operator as following (we still denote by v ε the solution) :

Problem 3.2.4. Find v ε in V R such that      -α∆v ε + v ε = h, in D \ B R , -∂ n v ε + T ε v ε = h ε , on ∂B R , ∂ n v ε = 0, on ∂D. (3.7) For ε ∈ [0, ζ], R > ζ, and v, φ in V R := H 1 (D \ B R ), we define a ε (v, φ) := α D\B R ∇v • ∇φ dx + α ∂B R T ε v φ dσ + D\B R v φ dx, l ε (φ) := D\B R h φ dx + α ∂B R h ε φ dσ.
So that the associated variational formulation reads : find v ∈ V R , such that

a ε (v, φ) = l ε (φ), ∀φ ∈ V R .
It is easily checked that Proposition 3.2.2. We have,

• a ε is symmetric,

• l ε is continuous.

In the sequel we write the cost functional in a slightly more general form, in particular to cope with the lack of differentiability for p = 1. We take as cost function,

J ε ( v) := D\Bε g(x, v(x)) dx, ∀ v ∈ V ε ,
where g is such that : (H1) for all x ∈ D, s → g(x, s) is C 1 (R) and we denote its derivative by g s , (H2) for all x ∈ D, s → g s (x, s) is M -Lipschitz continuous,

(H3) x → g s (x, 0) is in L 2 (D) and x → g(x, 0) is in L p (D), p > 1.
Under these assumptions, it is readily checked that Proposition 3.2.3. For all (x, s, t) ∈ D × R × R, we have

• |g(x, s)| ≤ |g(x, 0)| + |g s (x, 0) s| + M 2 s 2 , • |g s (x, s)| ≤ |g s (x, 0)| + M |s|, • g(x, t) -g(x, s) ≤ g s (x, s)(t -s) + θ(x, s, t)(t -s) 2 , with |θ(x, s, t)| ≤ M 2 .
We define now the cost functional on V R as follows :

for v ∈ V R , we set v ε ∈ V ε the extension of v in D \ B ε such that, • v ε | D\B R = v, • v ε | B R \Bε = v h,ϕ ε , ϕ = v.
We notice that v ε do not satisfy Problem 3.2.1 except if v is the solution of Problem 3.2.4. Then, we may define the restriction of J ε to V R by :

J ε (v) := J ε ( v ε ), ∀v ∈ V R .

The Adjoint Problem and Related Estimates

We state now the adjoint problem associated to Problem 3.2.4 when ε = 0 : we denote by w 0 the weak solution in V R of a 0 (w 0 , φ) = -DJ 0 (v 0 ) φ, ∀φ ∈ V R , where v 0 is the solution of Problem 3.2.4. The adjoint state w 0 is then the solution of Problem 3.2.5. Find w 0 in V R such that

     -α∆w 0 + w 0 = -g s •, v 0 (•) , in D \ B R , -∂ n w 0 + T 0 w 0 = h 0 , on ∂B R , ∂ n w 0 = 0, on ∂D. (3.8)
We aim to find δa, δl and δJ from the adjoint method, Theorem 3.2.1. Let h ∈ L 2 (D) and ϕ ∈ H 1/2 (∂B R ).

We consider the solution v h,ϕ ω of the following exterior problem,

     -α∆v h,ϕ ω + v h,ϕ ω = 0, in R 2 \ B 1 , v h,ϕ ω = v h,ϕ 0 (x 0 ), on ∂B 1 , v h,ϕ ω = 0, at ∞. Since v h,ϕ ω is a radial function, we can explicitly compute it : for x ∈ R 2 \ B 1 , v h,ϕ ω (x) = 1 K 0 (α -1/2 ) v h,ϕ 0 (x 0 ) K 0 (α -1/2 |x -x 0 |),
where K 0 is the modified Bessel function of the second kind [START_REF] Oldham | An Atlas of Functions[END_REF]. We extend this solution to R 2 \ {x 0 } (we still denote by v h,ϕ ω this extension in the sequel) by setting for

x ∈ R 2 \ {x 0 }, v h,ϕ ω (x) := 1 K 0 (α -1/2 ) v h,ϕ 0 (x 0 ) K 0 (α -1/2 |x -x 0 |).

Variations of the Bilinear Form

We start by giving the asymptotic development of the variations of the bilinear form in the following proposition :

Proposition 3.2.4. Let δT : H 1/2 (∂B R ) → H -1/2 (∂B R ) such that for all ϕ in H 1/2 (∂B R ), δT ϕ = -∇v 0,ϕ ω • n. Let v, w be in V R , we set, δa(v, w) := α ∂B R δT v w dσ.
Then, for ε small enough, we have,

∥a ε -a 0 -ε 1/2 δa∥ L2(V R ) = O(ε 1/2 ). Proof. Let v, w ∈ V R , then, a ε (v, w) -a 0 (v, w) = α D\B R ∇v • ∇w dx + D\B R v w dx + α ∂B R T ε v w dσ -α D\B R ∇v • ∇w dx - D\B R v w dx -α ∂B R T 0 v w dσ = α ∂B R (T ε -T 0 )v w dσ.
To be able to conclude, we need to use Proposition 3.2.5.

Proposition 3.2.5. For ε small enough, we have,

∥T ε -T 0 -ε 1/2 δT ∥ L H 1/2 (∂B R ),H -1/2 (∂B R ) = O ε 1/2 . Proof. We set for x ∈ R 2 \ B ε , Ψ 0,ϕ ε := v 0,ϕ ε -v 0,ϕ 0 + ε 1/2 v 0,ϕ ω . Thus, Ψ 0,ϕ ε is the solution of      -α∆Ψ 0,ϕ ε + Ψ 0,ϕ ε = 0, in B R \ B ε , Ψ 0,ϕ ε = ε 1/2 v 0,ϕ ω -v 0,ϕ 0 , on ∂B ε , Ψ 0,ϕ ε = ε 1/2 v 0,ϕ ω , on ∂B R .
To apply Proposition B.4.3 in Appendix B, we have to verify that (ε

1/2 v 0,ϕ ω -v 0,ϕ 0 ) is in H 1/2 (∂B ε ) and that ε 1/2 v 0,ϕ ω is in H 1/2 (∂B R ). ∥ε 1/2 v 0,ϕ ω ∥ 1/2,∂B R = C ε 1/2 v 0,ϕ 0 (x 0 ) K 0 α -1/2 | • -x 0 | 1/2,∂B R = C ′ ε 1/2 |v 0,ϕ 0 (x 0 )|.
We use the maximum principle for v 0,ϕ 0 , we have |v 0,ϕ 0 (x 0 )| ≤ ∥ϕ∥ 1/2,∂B R , and then,

∥ε 1/2 v 0,ϕ ω ∥ 1/2,∂B R ≤ C ′′ ε 1/2 ∥ϕ∥ 1/2,∂B R .
Next,

∥ε 1/2 v 0,ϕ ω (ε •) -v 0,ϕ 0 (ε •)∥ 1/2,∂B1 ≤ ∥ε 1/2 v 0,ϕ ω (ε •) -v 0,ϕ 0 (x 0 )∥ 1/2,∂B1 + ∥v 0,ϕ 0 (x 0 ) -v 0,ϕ 0 (ε •)∥ 1/2,∂B1
.

∥ε 1/2 v 0,ϕ ω (ε •) -v 0,ϕ 0 (x 0 )∥ 1/2,∂B1 ≤ ∥ε 1/2 v 0,ϕ ω (ε •)∥ 1/2,∂B1 + ∥v 0,ϕ 0 (x 0 )∥ 1/2,∂B1 ≤ ε 1/2 ∥v 0,ϕ ω (ε •)∥ 1/2,∂B1 + C|v 0,ϕ 0 (x 0 )| ≤ ε 1/2 ∥v 0,ϕ ω (ε •)∥ 1,B1\B 1/2 + C∥ϕ∥ 1/2,∂B R ≤ ε 1/2 ∥v 0,ϕ ω (ε •)∥ 1,B1 + C∥ϕ∥ 1/2,∂B R ≤ ε 1/2 ∥v 0,ϕ ω (ε •)∥ 0,B1 + |v 0,ϕ ω (ε •)| 1,B1 + C∥ϕ∥ 1/2,∂B R ≤ ε 1/2 ε -1/2 ∥v 0,ϕ ω ∥ 0,Bε + ε 1/2 |v 0,ϕ ω | 1,Bε + C∥ϕ∥ 1/2,∂B R ≤ ∥v 0,ϕ ω ∥ 0,B1 + ε|v 0,ϕ ω | 1,B1 + C∥ϕ∥ 1/2,∂B R ≤ C∥ϕ∥ 1/2,∂B R + Cε∥ϕ∥ 1/2,∂B R + C∥ϕ∥ 1/2,∂B R ≤ C ∥ϕ∥ 1/2,∂B R . And ∥v 0,ϕ 0 (x 0 ) -v 0,ϕ 0 (ε •)∥ 1/2,∂B1 = ε ε -1 v 0,ϕ 0 (x 0 ) -v 0,ϕ 0 (ε •) 1/2,∂B1 ≤ C ε ∥v 0,ϕ 0 ∥ C 1 (B R/2 ) ≤ C ε ∥ϕ∥ 1/2,∂B R .
We can now use Proposition B.4.3 in Appendix B,

∥Ψ 0,ϕ ε ∥ 1,B R \B R/2 ≤ C ∥ε 1/2 v 0,ϕ ω ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ε 1/2 v 0,ϕ ω (ε •) -v 0,ϕ 0 (ε •)∥ 1/2,∂B1 ≤ C ′ ε 1/2 ∥ϕ∥ 1/2,∂B R .
To finish, Proposition B.1.2 in Appendix B gives,

∥(T ε -T 0 -ε 1/2 δT )ϕ∥ -1/2,∂B R = ∥∇ v 0,ϕ ε -v 0,ϕ 0 + ε 1/2 v 0,ϕ ω • n∥ -1/2,∂B R = ∥∇Ψ 0,ϕ ε • n∥ -1/2,∂B R ≤ C ∥Ψ 0,ϕ ε ∥ 1,B R \B R/2 ≤ C ′ ε 1/2 ∥ϕ∥ 1/2,∂B R .

Variations of the Linear Form

Then, we give the asymptotic development of the variations of the linear form in the following proposition :

Proposition 3.2.6. We set δh = ∇v h,0 ω • n. let w be in V R , we set, δl(w) := α ∂B R δh w dσ.
Then, for ε small enough, we have,

∥l ε -l 0 -ε 1/2 δl∥ L(V R ) = O(ε 1/2 ). Proof. Let w ∈ V R , then, l ε (w) -l 0 (w) = D\B R hw dx + α ∂B R h ε w dσ - D\B R hw dx -α ∂B R h 0 w dσ = α ∂B R (h ε -h 0 ) w dσ.
To be able to conclude, we need to use Proposition 3.2.7. Proposition 3.2.7. For ε small enough, we have,

∥h ε -h 0 -ε 1/2 δh∥ -1/2,∂B R = O ε 1/2 . Proof. We set for x ∈ R 2 \ B ε , Ψ h,0 ε := v h,0 ε -v h,0 0 + ε 1/2 v h,0 ω . Thus, Ψ h,0 ε is the solution of      -α∆Ψ h,0 ε + Ψ h,0 ε = 0, in B R \ B ε , Ψ h,0 ε = ε 1/2 v h,0 ω -v h,0 0 , on ∂B ε , Ψ h,0 ε = ε 1/2 v h,0 ω , on ∂B R .
To apply Proposition B.4.3 in Appendix B, we have to verify that (ε

1/2 v h,0 ω -v h,0 0 ) is in H 1/2 (∂B ε ) and that ε 1/2 v h,0 ω is in H 1/2 (∂B R ). ∥ε 1/2 v h,0 ω ∥ 1/2,∂B R = C ε 1/2 |v h,0 0 (x 0 )| ≤ C ′ ε 1/2 ∥h∥ L 2 (D) .
Then,

∥ε 1/2 v h,0 ω (ε •) -v h,0 0 (ε •)∥ 1/2,∂B1 ≤ ∥ε 1/2 v h,0 ω (ε •) -v h,0 0 (x 0 )∥ 1/2,∂B1 + ∥v h,0 0 (x 0 ) -v h,0 0 (ε •)∥ 1/2,∂B1 . ∥ε 1/2 v h,0 ω (ε •) -v h,0 0 (x 0 )∥ 1/2,∂B1 ≤ ε 1/2 ∥v h,0 ω (ε •)∥ 1/2,∂B1 + ∥v h,0 0 (x 0 )∥ 1/2,∂B1 ≤ ε 1/2 ∥v h,0 ω (ε •)∥ 0,B1\B 1/2 + ε 1/2 |v h,0 ω (ε •)| 1,B1\B 1/2 + C |v h,0 0 (x 0 )| ≤ ε 1/2 ∥v h,0 ω ∥ 0,Bε\B ε/2 + |v h,0 ω | 1,Bε\B ε/2 + C |v h,0 0 (x 0 )| ≤ ε 1/2 ∥v h,0 ω ∥ 0,B R + |v h,0 ω | 1,B R + C |v h,0 0 (x 0 )| ≤ C |v h,0 0 (x 0 )| ≤ C ∥h∥ L 2 (D) .
And

∥v h,0 0 (x 0 ) -v h,0 0 (ε •)∥ 1/2,∂B1 = ε ε -1 v h,0 0 (x 0 ) -v h,0 0 (ε •) 1/2,∂B1 ≤ C ε ∥v h,0 0 ∥ C 1 (B R/2 ) ≤ C ε ∥h∥ L 2 (D) .
We can now apply Proposition B.4.3 in Appendix B,

∥Ψ h,0 ε ∥ 1,B R \B R/2 ≤ C ∥ε 1/2 v h,0 ω ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ε 1/2 v h,0 ω (ε •) -v h,0 0 (ε •)∥ 1/2,∂B1 ≤ C ε 1/2 ∥h∥ L 2 (D) .
To conclude, Proposition B.1.2 in Appendix B gives,

∥h ε -h 0 -ε 1/2 δh∥ -1/2,∂B R = ∥∇ v h,0 ε -v h,0 0 + ε 1/2 v h,0 ω • n∥ -1/2,∂B R = ∥∇Ψ h,0 ε • n∥ -1/2,∂B R ≤ C ∥Ψ h,0 ε ∥ 1,B R \B R/2 ≤ C ε 1/2 ∥h∥ L 2 (D) .

Variations of the Cost Function

To finish, we give the asymptotic development of the variations of the cost function. We start, by giving an estimate of the variations of the solution with the proposition below : Proposition 3.2.8. We set δv h,ϕ := -v h,ϕ ω . Then, for ε small enough, we have,

∥v h,ϕ ε -v h,ϕ 0 -ε 1/2 δv h,ϕ ∥ 0,B R \Bε = o(ε 1/2 ). Proof. We set for x ∈ R 2 \ B ε , Ψ h,ϕ ε := v h,ϕ ε -v h,ϕ 0 + ε 1/2 v h,ϕ ω . Thus, Ψ h,ϕ ε is the solution of      -α∆Ψ h,ϕ ε + Ψ h,ϕ ε = 0, in B R \ B ε , Ψ h,ϕ ε = ε 1/2 v h,ϕ ω -v h,ϕ 0 , on ∂B ε , Ψ h,ϕ ε = ε 1/2 v h,ϕ ω , on ∂B R .
To apply Proposition B.4.3 in Appendix B, we need to check that (ε

1/2 v h,ϕ ω -v h,ϕ 0 ) is in H 1/2 (∂B ε ) and that ε 1/2 v h,ϕ ω is in H 1/2 (∂B R ). ∥ε 1/2 v h,ϕ ω ∥ 1/2,∂B R ≤ C ε 1/2 ∥ϕ∥ 1/2,∂B R + ∥h∥ L 2 (D) .
Then,

∥ε 1/2 v h,ϕ ω (ε •) -v h,ϕ 0 (ε •)∥ 1/2,∂B1 ≤ C ∥ϕ∥ 1/2,∂B R + ∥h∥ L 2 (D) . Therefore, we can use Proposition B.4.3 in Appendix B, ∥Ψ h,ϕ ε ∥ 0,B R \Bε ≤ C ∥ε 1/2 v h,ϕ ω ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ε 1/2 v h,ϕ ω (ε •) -v h,ϕ 0 (ε •)∥ 1/2,∂B1 ≤ C ε 1/2 ∥ϕ∥ 1/2,∂B R + ∥h∥ L 2 (D) .
Now we can state the estimate of the variations of the cost function.

Proposition 3.2.9. We set for v in V R ,

δJ(v) := B R g s (x, v 0 ) δv h,v dx -α ∂B R ∂ n w 0 δv h,v dσ.
Then, for ε small enough, we have,

J ε (v) -J 0 (v) -ε 1/2 δJ(v) = o(ε 1/2 ).
Proof. Let v ∈ V R , we consider its extension in D, namely v 0 , and in D \ B ε , namely v ε . We remind that v 0 and v ε are not necessarily a solution of Problem 3.2.2 or of Problem 3.2.1, since v is not necessarily a solution of Problem 3.2.4.

I ε := J ε (v) -J 0 (v) -ε 1/2 δJ(v) = J ε ( v ε ) -J 0 ( v 0 ) -ε 1/2 δJ(v) = D\Bε g(x, v ε ) dx - D g(x, v 0 ) dx -ε 1/2 B R g s (x, v 0 ) δv h,v dx + ε 1/2 α ∂B R ∂ n w 0 δv h,v dσ. Since v ε = v 0 on D \ B R , I ε = B R \Bε g(x, v ε ) -g(x, v 0 ) dx - Bε g(x, v 0 ) dx -ε 1/2 B R g s (x, v 0 ) δv h,v dx + ε 1/2 α ∂B R ∂ n w 0 δv h,v dσ.

Using Proposition 3.2.3,

I ε = B R \Bε g s (x, v 0 )( v ε -v 0 ) dx + B R \Bε θ(x, v 0 , v ε )( v ε -v 0 ) 2 dx - Bε g(x, v 0 ) dx -ε 1/2 B R g s (x, v 0 ) δv h,v dx + ε 1/2 α ∂B R ∂ n w 0 δv h,v dσ = B R \Bε g s (x, v 0 )( v ε -v 0 -ε 1/2 δv h,v ) dx + ε 1/2 B R \Bε g s (x, v 0 ) δv h,v dx + B R \Bε θ(x, v 0 , v ε )( v ε -v 0 ) 2 dx - Bε g(x, v 0 ) dx -ε 1/2 B R g s (x, v 0 ) δv h,v dx + ε 1/2 α ∂B R ∂ n w 0 δv h,v dσ = B R \Bε g s (x, v 0 )( v ε -v 0 -ε 1/2 δv h,v ) dx -ε 1/2 Bε g s (x, v 0 ) δv h,v dx + B R \Bε θ(x, v 0 , v ε )( v ε -v 0 ) 2 dx - Bε g(x, v 0 ) dx + ε 1/2 α ∂B R ∂ n w 0 δv h,v dσ. Thus, |I ε | ≤ B R \Bε g s (x, v 0 )( v ε -v 0 -ε 1/2 δv h,v ) dx + ε 1/2 Bε g s (x, v 0 ) δv h,v dx + M 2 B R \Bε ( v ε -v 0 ) 2 dx + Bε |g(x, v 0 )| dx + ε 1/2 α ∂B R ∂ n w 0 δv h,v dσ.
and

• B R \Bε g s (x, v 0 )( v ε -v 0 -ε 1/2 δv h,v ) dx ≤ C ε 1/2 . • ε 1/2 Bε g s (x, v 0 ) δv h,v dx ≤ ε 1/2 B R g s (x, v 0 ) δv h,v dx ≤ C ε 1/2 . • B R \Bε ( v ε -v 0 ) 2 dx = B R \Bε ε 1/2 δv h,v + o(ε 1/2 ) 2 dx = o(ε 1/2 ) B R \Bε dx ≤ o(ε 1/2 ) B R dx ≤ C ε 1/2 . • Bε |g(x, v 0 )| dx ≤ Bε g(x, v 0 ) 2 dx 1/2 Bε 1 2 dx 1/2 ≤ B R g(x, v 0 ) 2 dx 1/2 Bε dx 1/2 ≤ C ε. • ε 1/2 ∂B R ∂ n w 0 δv h,v dσ = C ε 1/2 .
Finally,

|I ε | ≤ C ε 1/2 .
Proposition 3.2.10. We have that J 0 is differentiable on V R and for v, w in V R , we have, for ε small enough,

J ε (w) -J 0 (v) = ε 1/2 δJ(v) + DJ 0 (v)(w -v) + o(ε 1/2 + ∥w -v∥ V R ).
Proof. By definition, J 0 is differentiable on H 1 (D) and for all φ in H 1 (D),

D J 0 ( v 0 )φ = D g s (x, v 0 ) φ dx.
Then, J 0 is differentiable on V R and if we note φ the extension on

H 1 (D) of φ ∈ V R such that -α∆ φ+ φ = 0 in B R , we have DJ 0 (v 0 ) φ = D J 0 ( v 0 ) φ.
Using the previous proposition, we get for v, w in V R ,

J ε (w) -J 0 (v) = J ε (w) -J 0 (w) + J 0 (w) -J 0 (v) = ε 1/2 δJ(w) + o(ε 1/2 ) + DJ 0 (v)(w -v) + o(∥w -v∥ V R ) = ε 1/2 δJ(w) + ε 1/2 δJ(v) -ε 1/2 δJ(v) + DJ 0 (v)(w -v) + o(ε 1/2 + ∥w -v∥ V R ) = ε 1/2 δJ(v) + DJ 0 (v)(w -v) + ε 1/2 δJ(w) -δJ(v) + o(ε 1/2 + ∥w -v∥ V R ).
To conclude, it remains to show that

ε 1/2 δJ(w) -δJ(v) = o(ε 1/2 + ∥w -v∥ V R ). δJ(w) -δJ(v) = - B R g s (x, w 0 ) v h,w ω dx + α ∂B R ∂ n w 0 v h,w ω dσ + B R g s (x, v 0 ) v h,v ω dx -α ∂B R ∂ n w 0 v h,v ω dσ = - B R g s (x, w 0 ) v h,w ω dx + B R g s (x, v 0 ) v h,w ω dx - B R g s (x, v 0 ) v h,w ω dx + α ∂B R ∂ n w 0 v h,w ω dσ + B R g s (x, v 0 ) v h,v ω dx -α ∂B R ∂ n w 0 v h,v ω dσ = B R (g s (x, v 0 ) -g s (x, w 0 )) v h,w ω dx + B R g s (x, v 0 ) (v h,v ω -v h,w ω ) dx + α ∂B R ∂ n w 0 (v h,w ω -v h,v ω ) dσ.
Then,

|δJ(w) -δJ(v)| ≤ B R |(g s (x, v 0 ) -g s (x, w 0 )) v h,w ω | dx + B R |g s (x, v 0 ) (v h,v ω -v h,w ω )| dx + α ∂B R |∂ n w 0 (v h,w ω -v h,v ω )| dσ ≤ B R M | v 0 -w 0 | |v h,w ω | dx + B R M | v 0 | |v h,v ω -v h,w ω | dx + α ∂B R |∂ n w 0 (v h,w ω -v h,v ω )| dσ.
Finally,

• B R M | v 0 -w 0 | |v h,w ω | dx ≤ C ∥v h,w ω ∥ L 2 (B R ) ∥ v 0 -w 0 ∥ L 2 (B R ) ≤ C ∥v -w∥ V R . • B R M | v 0 | |v h,v ω -v h,w ω | dx ≤ C ∥v h,v ω -v h,w ω ∥ L 2 (B R ) ≤ C ′ ∥v -w∥ V R . • ∂B R |∂ n w 0 (v h,w ω -v h,v ω )| dσ ≤ C ∥v h,w ω -v h,v ω ∥ L 2 (∂B R ) ≤ C ′ ∥w -v∥ V R .
We have the result.

Algorithm and Numerical Results

We consider the adjoint problem of Problem 3.2.2 :

Problem 3.3.1. Find w 0 in H 1 (D) such that -α∆ w 0 + w 0 = -g s •, v 0 (•) , in D, ∂ n w 0 = 0, on ∂D. (3.9)
Then, we have the following proposition, proved in Section B.2 in Appendix B, Proposition 3.3.1. w 0 , solution of Problem 3.2.5, is the restriction of w 0 to D \ B R .

From now, we have everything we need to compute the topological gradient using the adjoint method : Proposition 3.3.2. For ε small enough, we have,

j(K ε ) -j(K) = c ε 1/2 v 0 (x 0 ) w 0 (x 0 ) + o(ε 1/2 ),
with v 0 solution of Problem 3.2.2 and w 0 solution of Problem 3.3.1.

Proof. Unlike in previous proofs, we have that v 0 and w 0 are the solutions of Problem 3.2.2 and Problem 3.3.1 respectively and are the extensions of v 0 , solution of Problem 3.2.4, and w 0 , solution of Problem 3.2.5, respectively. Since the conditions for the adjoint method are fulfilled, we have,

j(ε) = j(0) + δa(v 0 , w 0 ) -δl(w 0 ) + δJ(v 0 ) ε 1/2 + o(ε 1/2 ). Using that v h,v0 ω = v h,0 ω + v 0,v0 ω , δj(x 0 ) = δa(v 0 , w 0 ) -δl(w 0 ) + δJ(v 0 ) = -α ∂B R ∂ n v 0,v0 ω w 0 dσ -α ∂B R ∂ n v h,0 ω w 0 dσ - B R g s (x, v 0 ) v h,v0 ω dx + α ∂B R ∂ n w 0 v h,v0 ω | ∂B R dx = -α ∂B R ∂ n v h,v0 ω w 0 dσ - B R g s (x, v 0 ) v h,v0 ω dx + α ∂B R ∂ n w 0 v h,v0 ω dx.
With Proposition 3.2.1 and Proposition 3.3.1,

δj(x 0 ) = -α ∂B R ∂ n v h,v0 ω w 0 dσ - B R g s (x, v 0 ) v h,v0 ω dx + α ∂B R ∂ n w 0 v h,v0 ω dx. Since -α∆ w 0 + w 0 = -g s •, v 0 (•) , δj(x 0 ) = -α ∂B R ∂ n v h,v0 ω w 0 dσ + B R (-α∆ w 0 + w 0 )v h,v0 ω dx + α ∂B R ∂ n w 0 v h,v0 ω dx = -α ∂B R ∂ n v h,v0 ω w 0 dσ -α B R ∆ w 0 v h,v0 ω dx + B R w 0 v h,v0 ω dx + α ∂B R ∂ n w 0 v h,v0 ω dx = -α ∂B R ∂ n v h,v0 ω w 0 dσ + α B R ∇ w 0 • ∇v h,v0 ω dx -α ∂B R ∂ n w 0 v h,v0 ω dσ + B R w 0 v h,v0 ω dx + α ∂B R ∂ n w 0 v h,v0 ω dx = -α ∂B R ∂ n v h,v0 ω w 0 dσ + α B R ∇ w 0 • ∇v h,v0 ω dx + B R w 0 v h,v0 ω dx = -α ∂B R ∂ n v h,v0 ω w 0 dσ -α B R w 0 ∆v h,v0 ω dx + α ∂B R ∂ n v h,v0 ω w 0 dσ + B R w 0 v h,v0 ω dx = -α B R w 0 ∆v h,v0 ω dx + B R w 0 v h,v0 ω dx = B R (-α∆v h,v0 ω + v h,v0 ω ) w 0 dx = 1 E(1) v h,v0 0 (x 0 ) B R -α∆E(x -x 0 ) + E(x -x 0 ) w 0 dx = 1 E(1) v h,v0 0 (x 0 ) B R δ x0 w 0 dx = 1 E(1) v h,v0 0 (x 0 ) w 0 (x 0 ).
Finally, using Proposition 3.3.1, we have v h,v0 0 (x 0 ) = v 0 (x 0 ), and We get the final result. L1-ADJ-methods, we can distinguish the edges of the image in the L2-ADJ-masks, while we can not with the H1-methods.

Noise L1-ADJ-T L1-ADJ-H H1-T H1-H

Salt Pepper α ∥f -u∥ 1 α ∥f -u∥ 1 ∥f -u∥ 1 ∥f -
Again, we give in Figure 3.8, Figure 3.9 and Figure 3.10 the resulting masks and reconstructions for different level of noise.

Noise L2-ADJ-T L2-ADJ-H H1-T H1-H σ α ∥f -u∥ 2 α ∥f -u∥ 2 ∥f -u∥ 2 ∥f -

Conclusion

In this paper, we have formulated the compression problem as a shape optimization one, and we have performed the topological expansion for the optimality condition by the adjoint method.Adapting the approach of [START_REF] Amstutz | Sensitivity analysis with respect to a local perturbation of the material property[END_REF] and [START_REF] Garreau | The Topological Asymptotic for PDE Systems: The Elasticity Case[END_REF], we compute the asymptotic development for variations of the functional which leads to a soft threshold criterion for the choice of the relevant pixels to keep in the mask. Lastly, we present some numerical experiments in the case of the L 2 -error and of a regularized L 1 -error. In addition, it appears that this new method for selecting the mask outperform the other expansions when the image to compress contains gaussian noise or impulse noise and is easy to implement. In this chapter, we propose an implementation of the compression method described by Belhachmi et al together with the homogeneous diffusion inpainting on GPU [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. Using this technology may allow in the future faster video encoding/decoding with variational methods. Notice that this a work in progress and there is still much to do before achieving a real-time codec by GPU within the framework of PDEs-based methods.

Introduction

Despite inpainting-based compression methods are serious alternatives to the traditional compression standard mainly based on transforms, they suffer from the high computational cost of both the inpainting mask creation step and the inpainting step. More especially, the inpainting mask creation step may involves many inpainting during the process. This limitation prevents them from being applicable to real-time coding/decoding of images.

Several attempts to achieve real-time image inpainting have been proposed over years. Among them, a multigrid solver in case of linear homogeneous diffusion inpaiting implemented on a PlayStation™ 3 have been presented in [START_REF] Köstler | PDE based Video Compression in Real Time[END_REF]. To sum up their method, they proposed to solve the inpainting PDE on many coarse grids where the data are smoothed in order to separated the different feature's level, (similar to scale spaces). In 2007, Bornemann and März proposed in [START_REF] Bornemann | Fast Image Inpainting Based on Coherence Transport[END_REF] a fast inpaiting method base on a non-iterative algorithm that traverses the inpainting domain by the fast marching method while propagating along the way, image values in a coherence direction. The principal common point between these methods is that the algorithm are executed on the CPU.

On the other hand, the use of GPU for scientific computing are becoming more and more popular over years. Indeed, highly parallel solver have been proposed and implemented on GPU for the Navier-Stokes equations or for some optimal transport problem [START_REF] Thibault | CUDA Implementation of a Navier-Stokes Solver on Multi-GPU Desktop Platforms for Incompressible Flows[END_REF][START_REF] Ryu | Unbalanced and Partial L1 Monge-Kantorovich Problem: A Scalable Parallel First-Order Method[END_REF]. In particular, Kämper and Weickert proposed in 2022 to use domain decomposition methods to paralleling the solver of the PDE-inpaiting problem. Since GPU have way more processing core than CPU, they proposed to split the problem's domain into many small domains of size 32 × 32 and to solve each smaller problem in each GPU's core. This way, they achieved to inpaint in real-time 4K images using homogeneous diffusion inpaiting.

The main contribution here is to also use GPU to create the optimal inpainting mask thanks to dithering methods.

Domain Decomposition : The Schwarz's Method

Domain decomposition methods solve boundary value PDE problems by fragmenting the domain Ω into several sub-domains Ω n , which lead to several sub-problems to solve. To finish, we combine the n solutions of the sub-problems to reconstruct the global solution on Ω. The most known domain decomposition method is the Schwarz's method. For example we consider the following elliptic problem :

Lu = f, in Ω, u = g, in ∂Ω. (3.10)
A version said "without overlapping" have been proposed by Lions in 1990 [START_REF] Lions | On the Schwarz alternating method. III: a variant for nonoverlapping subdomains[END_REF]. It is stated as follow : we divide Ω into Ω 1 and Ω 2 such that Ω 1 ∩ Ω 2 = ∅ (non overlapping) and we denote by Σ 1,2 is the common boundary between Ω 1 and Ω 2 (see Figure 3.11 (a)). It follows an iterative algorithm to solve the sub-problems which have an additional compatibility condition on the common boundary between Σ.

     Lu n i = f, in Ω i , u n i = g, on ∂Ω i \ Σ i,j , ∂ ni u n i + λ i u n i = ∂ ni u n j + λ i u n j , on Σ i,j , (3.11)
where λ i > 0 is a parameter. A version said "additive with overlapping" where

Ω 1 ∩ Ω 2 ̸ = ∅ =: Σ [55]. We denote by Γ 1 (resp. Γ 2 )
the part of the border of Ω 1 (resp. Ω 2 ) that is in

• Ω 2 (resp.
• Ω 1 ) (see Figure 3.11 (b)). Unlike the nonoverlapping method, the systems of equations have an additional equality condition of the sub-solutions on their common domain Σ. It is possible to solve these non-coupled equations with an iterative algorithm.

     Lu n i = f, in Ω i , u n i = g, on ∂Ω i \ Γ i , u n i = u n-1 j , in Σ i , and
     Lu n j = f, in Ω j , u n j = g, on ∂Ω j \ Γ j , u n j = u n-1 i , in Σ j . (3.12)
We give in Figure 3.11 an illustration of the non-overlapping and overlapping domain decomposition. There exist other domain decomposition methods [START_REF] Cai | A Restricted Additive Schwarz Preconditioner for General Sparse Linear Systems[END_REF][START_REF] Lions | Résolution d'EDP par un schéma en temps < pararéel[END_REF][START_REF] Gilliocq-Hirtz | A massively parallel multi-level approach to a domain decomposition method for the optical flow estimation with varying illumination[END_REF].

The main property of these methods is that, every sub-problem can be solved separately and then simultaneously. In order to use parallel computing, the Message Passing Interface (MPI) standard have been designed in 1993 for high-performance scientific computing that allows the use of multiple computers. It was made for the passage of messages between remote computers or in a multiprocessor computer. Nowadays, the most used implementation of this standard is the Open MPI project https: //www.open-mpi.org/ which is available on many platforms and programming languages.

GPU Programming

Graphics processing unit (GPGPU) programming is the use of a graphics processing unit (GPU) to perform calculations in applications traditionally handled by the central processing unit (CPU). Essentially, a GPGPU pipeline is a type of parallel processing between one or more GPUs and CPUs that analyzes data as if it were an image. Although GPUs operate at lower frequencies, they typically have several times the number of cores. Thus, GPUs can process much more graphics data per second than a traditional CPU. Migrating the data into graphical form, and then using the GPU to analyze it, can create a significant speedup.

In computing, a compute kernel is a routine compiled for GPUs, separate from but used by a main program running on a CPU.

Some of the operations we use to code our videos can be parallelized and thus programmed as a computational kernel. The computation of the Laplacian, the halftoning method (using dithering rather than error propagation which is by nature sequential [START_REF] Bayer | An Optimum Method for Two-Level Rendition of Continuous-Tone Pictures[END_REF][START_REF] Ulichney | Digital Halftoning[END_REF][START_REF] Adler | The mathematics of halftoning[END_REF]) and other elementary operations such as addition or matrix multiplication. We also use methods for numerical solution of linear systems that can be encoded on GPU [START_REF] Patil | Survey on GPU Based Linear Solver[END_REF].

Dithering Algorithm

Digital halftoning (or dithering) is a method of rendering the illusion of continuous-tone pictures on displays that are capable of only producing binary picture elements. More precisely, if we denote by F = [f ij ] the matrix representing the image and we if give us a dithering mask M = [f kl ] which have smaller size than F , then we obtain the binary image (halftoned image) G = [g ij ] by

g ij := 1, if f ij > m kl ,
where k := i mod n and l := j mod m, 0, otherwise.

We give some examples of dithering mask :

• Threshold : M is a 1 × 1 matrix with the desired threshold t ≥ 0 i.e. M = (t),

• Random : M is a matrix of size m × n such that each coefficients are randomly chosen between 0 and 1,

• Bayer matrix : M is constructed as follow : we first fill each slot with a successive integers, then reorder them such that the average distance between two successive numbers in the map is as large as possible [START_REF] Bayer | An Optimum Method for Two-Level Rendition of Continuous-Tone Pictures[END_REF].

The dithering technique is known to create periodic pattern in the halftoned image G, also called dithering artifacts. To avoid this, dithering masks are generally constructed so that the product n × m is much larger than the number of distinct threshold levels. Particularly popular dithering masks which respect this rule are blue noise masks [START_REF] Ulichney | Dithering with blue noise[END_REF]. Hereafter is an example of dithering mask : We propose to use this halftoning technique instead of the Floyd-Steinberg error propagation dithering algorithm [START_REF] Floyd | Adaptive algorithm for spatial greyscale[END_REF] since the two loops over the pixels i and j may be processed by the GPU.

M = 1 16      0

Numerical Results

We propose Figure 3.12 the computational time required to encode/decode intra frames as a function of the number of pixels in the image for the Belhachmi method et al [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. For the method CPU we use only one CPU's core for the calculations and for the method GPU one will use mainly the GPU. We will use mainly the GPU because the solver of linear systems uses the CPU for the calculation of the incomplete LU decomposition of the matrix and uses the GPU for the final resolution of the system of equations. For the GPU programming we use the library python cupy using CUDA.

The use of the GPU allows to greatly accelerate the computations for the creation of the mask as well as for the resolution of the linear system. On the other hand, in our tests, the creation of the linear system is performed by the CPU for both methods. In the case of the GPU, the A matrix representing the linear system is transferred to the GPU, which explains the difference in computation time for the CPU and GPU methods. Knowing in advance the number of non-zero elements in A, it would be possible to assemble the matrix with the GPU and thus save even more computing time. Here, we have performed tests in the case of intra frames but we could also apply it to inter frames for the calculation of the optical flow and for the calculation of the prediction.

Conclusion

We proposed an implementation of the compression method based on the soft-thresholding of |∆f | as described by Belhachmi et al together with the homogeneous diffusion inpainting on GPU [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. The inpaiting is solved using the CUDA sparse linear solver on GPU proposed by Nvidia while the inpaiting mask is created by the use of GPU kernel. Despite the assembling of the sparse linear system is slower than the CPU-only method due to data migration from CPU to GPU memory, the gain of time computation is significant when the number of pixel in the image increase. The most spectacular gain of computation time is in the mask creation step. Indeed, since this step is fully parallelized, it is processed by the GPU in just one time. To obtain a real-time video codec, it might be interesting to apply this GPU solver on optical flow problems to speed up the motion estimation step of the encoder. The optical flow is a field of vectors giving the displacement of the intensity of the pixels of an animated image over time. In the case of a video, when there is no change of scene, two successive images are visually very similar and therefore, the optical flow will be very homogeneous. This is why, rather than saving the two images independently, the authors of [START_REF] Adam | Denoising by Inpainting[END_REF] propose to compute the optical flow and to sub-sample it. This last step should not have a great influence on the quality of the reconstruction thanks to the regularity of the optical flow.

Classical Formulations of the Optical Flow in Small Displacements

In this chapter, we will see some classical methods for computing the optical flow.

Fundamental Constraint of the Optical Flow with Constant Luminosity

We define a function f from an image domain D ⊂ R d , d = 2, 3, to R representing the intensity of a pixel x at an instant t by

f : D × [0, 1] → R (x, t) → f (x, t).
The estimation of the optical flow consists in finding the vector field u = (u i ) d i=1 , called the optic flow, describing the motion of each pixel between two frames of a given sequence. The fundamental constraint of the optical flow is the main assumption for the estimation of the optical flow. We will see only the case where the luminosity is assumed to remain constant over time. The constant luminosity translates into,

f (x + δx, t + δt) = f (x, t).
Note that there are other fundamental constraints of the optical flow. Moreover, we only assume the case of small displacements, i.e. when δx is small. We use the Lagrangian coordinates. Since we are in the case of constant luminosity, we assume that the intensity of a point remains constant along its trajectory, i.e. for (x 0 , t 0 ), there exists a trajectory t → (x(t), t), such that (x(t 0 ), t 0 ) = (x 0 , t 0 ) and for all t > 0, f (x(t), t) = f (x 0 , t 0 ). In small displacements, it is reasonable to assume that f is differentiable, hence by differentiating with respect to t and taking t = t 0 , we have,

∂ t f (x 0 , t 0 ) + ∂ t x(t 0 ) • ∇f (x 0 , t 0 ) = 0.
By setting u(x 0 ) := ∂ t x(t 0 ), and since the above equation holds for all (x 0 , t 0 ), we obtain the fundamental constraint of the optical flow, ∇f (x, t) • u(x, t) + ∂ t f (x, t) = 0.

Variational Formulations

Using only the fundamental constraint of the optical flow is not enough to determine the components of the optical flow u. This problem is called the aperture problem and we have to add a second constraint.

In 1981, Lucas and Kanade [108] proposed the local method, which seeks to minimize u, for any t ∈ [0, T ] and x ∈ D,

D l (u) = K ρ ⋆ ∇f (x, t) • u(x, t) + ∂ t f (x, t) .
Here, ⋆ denotes the convolution product and K ρ denotes the heat kernel, fundamental solution of the heat equation, which, when convolved with a function g has the effect of smoothing g. If g is an image, this operation is a Gaussian blur of standard deviation ρ > 0. The Euler-Lagrange equation gives us in dimension 2,

K ρ ⋆ (f x ) 2 u 1 + K ρ ⋆ (f x f y ) u 2 = -K ρ ⋆ (f x f t ), in [0, T ] × D, K ρ ⋆ (f y f x ) u 1 + K ρ ⋆ (f y ) 2 u 2 = -K ρ ⋆ (f y f t ), in [0, T ] × D,
The previous linear system can be solved pointwise, which has an advantage in terms of computation time.

The same year, Horn and Schunck proposed the global method, which consists in minimizing on u an energy associated to the fundamental constraint of the optical flow,

D g (u) = D ∇f (x, t) • u(x, t) + ∂ t f (x, t) dx + α R(u). If R(u) = d i=1 D |∇u i | 2 dx, the Euler-Lagrange equation gives us in dimension 2,      -α∆u 1 + (f x ) 2 u 1 + (f x f y ) u 2 = -(f x f t ), in [0, T ] × D, -α∆u 2 + (f y f x ) u 1 + (f y ) 2 u 2 = -(f y f t ), in [0, T ] × D, ∂u1 ∂n = ∂u2 ∂n = 0, on [0, T ] × ∂D.
In 2005, Bruhn et al [START_REF] Bruhn | Lucas/Kanade Meets Horn/Schunck: Combining Local and Global Optic Flow Methods[END_REF], proposed the global-local method, which is the combination of the two previous methods, and thus minimize u for all t ∈ [0, T -δt[,

D gl (u) = D K ρ (x) ⋆ ∇f (x, t) • u(x, t) + ∂ t f (x, t) dx + α R(u). If R(u) = N i=1 D |∇u i | 2 dx, the Euler-Lagrange equation gives us in dimension 2,      -α∆u 1 + K ρ ⋆ (f x ) 2 u 1 + K ρ ⋆ (f x f y ) u 2 = -K ρ ⋆ (f x f t ), in [0, T ] × D, -α∆u 2 + K ρ ⋆ (f y f x ) u 1 + K ρ ⋆ (f y ) 2 u 2 = -K ρ ⋆ (f y f t ), in [0, T ] × D, ∂u1 ∂n = ∂u2 ∂n = 0, on [0, T ] × ∂D.
In this last method, we have two parameters to choose from: ρ and α. The first one is used to make the method more robust to the noise in f , while the second one, associated to the regularization, allows to favor a smooth optical flow. Thus, a high value of α will have the effect of blurring the information close to the edges and a low value of α adds too much useless information in the homogeneous parts. The ideal would be to have α low when we are close to the edges and high in the homogeneous zones. This is why the adaptive methods of the choice of α have been introduced [START_REF] Belhachmi | Control of the Effects of Regularization on Variational Optic Flow Computations[END_REF][START_REF]An Adaptive Approach for the Segmentation and the TV-Filtering in the Optic Flow Estimation[END_REF][START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF]. In these, we assume that the regularization parameter α is no longer constant but piecewise constant. We use the finite element method, we have α in P 0 and if we note η K the a-posteriori error on the element K, we set for α n given,

α n+1 | K = max   α n | K 1 + κ max η K ∥η K ∥∞ -ξ 100 , 0 , α s   .
The parameter κ is between 5 and 10 and α s is a threshold parameter to avoid having a too small regularization. With this choice of α n+1 , if the relative error is smaller than ξ% we reduce α n+1 | K , otherwise, we keep the same α n | K .

In practice, we will choose α 0 constant and large since the parameter α can only decrease during the iterations.

Optic Flow Formulation with Varying Illumination

In this section, we recall the classical optic flow formulation with luminosity variations. An approach suggested by Gennert and Negahdaripour [START_REF] Gennert | Relaxing the Brightness Constancy Assumption in Computing Optical Flow[END_REF] for the determination of u are based on the assumption that the intensity of a pixel is linearly varying between two successive frames. This assumption introduce a new unknown namely the luminosity variation. More precisely, the conservation law is as follows f (x + δx, t + δt) = M (x, t)f (x, t) + C(x, t).

(3.13)

For small displacements and in many physical situations this assumption is reasonable and coherent with the laws of the optic. Moreover, we can suppose that C(x, t) is close to zero and that M (x, t) is close to the identity. We write M = I d + δm and C = δc, where I d is the identity, and δm, δc represent a "small" variation of the illumination. We suppose that δc = 0. Under these new assumptions, equation (3.13) reads, f (x + δx, t + δt) = I d + δm(x, t) f (x, t).

Using Taylor expansion on the left hand side, we obtain

∇f • δx + ∂ t f δt -f δm + o(t) = 0.
By dividing by δt and let δt tends to zero, we have the optic flow fundamental constraint with luminosity variations for small displacements i.e.

∇f • u + ∂ t f -f m t = 0,
with u i := lim δt→0 δxi δt and m t := lim δt→0 δm δt . Like without luminosity variations, we need to add constraints to the optic flow fundamental equation by regularizing the unknowns u 1 , u 2 and m t . We use the global-local method and we aim to minimize over (u, m t ) for t ∈ [0, 1 -δt[,

D K ρ (x) ⋆ ∇f • u + ∂ t f -f m t dx + α d i=1 D |∇u i | 2 dx + λ D |∇m t | 2 dx.
In dimension 2, Euler-Lagrange equations leads to the following PDEs system

         -α∆u 1 + K ρ ⋆ (f x ) 2 u 1 + K ρ ⋆ (f x f y ) u 2 -K ρ ⋆ (f x f ) m t = -K ρ ⋆ (f x f t ), in [0, 1] × D, -α∆u 2 + K ρ ⋆ (f y f x ) u 1 + K ρ ⋆ (f y ) 2 u 2 -K ρ ⋆ (f y f ) m t = -K ρ ⋆ (f y f t ), in [0, 1] × D, -λ∆m t + K ρ ⋆ (f f x ) u 1 + K ρ ⋆ (f f y ) u 2 -K ρ ⋆ (f 2 ) m t = K ρ ⋆ (f f t ), in [0, 1] × D, ∂u1 ∂n = ∂u2 ∂n = ∂mt ∂n = 0, on [0, 1] × ∂D.
This popular method to determine the optic flow uses a smoothing regularization (laplacian) on the components of u and on m t along with smoothing the data on f . This leads to homogeneous and dense solutions which may contains too much useless information.

An other way to model the variation of the luminosity is to add a constraint on the constancy of the gradient of luminosity [START_REF] Bruhn | Variational optic flow computation: accurate modelling and efficient numerics[END_REF],

∇f (x + δx, t + δt) = ∇f (x, t).

There are other fundamental constraints and regularizations, presented in [START_REF] Papenberg | Highly Accurate Optic Flow Computation with Theoretically Justified Warping[END_REF].

As another improvement, we notice that in case of large displacements [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF], as can no longer use Taylor expansion, we have to solve a non-linear problem :

min u D K ρ ⋆ f (x + u, t + δt) -f (x, t) 2 non-linear +α R(u).

Introduction

The optimal mass transport problem seeks the most efficient way of transforming one distribution of mass to another, relative to a given cost function. The first optimal mass transport problem first arose due to Monge [START_REF] Monge | Mémoire sur la théorie des déblais et des remblais[END_REF]. It was later expanded by Kantorovich [START_REF] Kantorovich | On a Problem of Monge[END_REF], and found applications in several scientific areas, e.g. operations research and economics. A significant portion of the theory of the optimal mass transport problem was developed in the Nineties and reaches its maturity for use in a large number of applications. Starting with Brenier's seminal work on characterization, existence, and uniqueness of optimal transport maps [START_REF] Brenier | Polar factorization and monotone rearrangement of vector-valued functions[END_REF], followed by Caffarelli's work on regularity conditions of such mappings [START_REF] Caffarelli | The regularity of mappings with a convex potential[END_REF], Gangbo and McCann's work on geometric interpretation of the problem [START_REF] Gangbo | The geometry of optimal transportation[END_REF], and Evans and Gangbo's work on formulating the problem through partial differential equations and specifically the p-Laplacian equation [START_REF] Evans | Differential equations methods for the Monge-Kantorovich mass transfer problem[END_REF]. A more thorough history and background on the optimal mass transport problem can be found in Villani's book "Optimal Transport: Old and New" [START_REF] Villani | Topics in optimal transportation[END_REF], and Santambrogio's book "Optimal transport for applied mathematicians" [START_REF] Santambrogio | Optimal transport for applied mathematicians: calculus of variations, PDEs, and modeling[END_REF].

The significant contributions in mathematical foundations of the optimal transport problem together with recent advancements in numerical methods [START_REF] Benamou | A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem[END_REF], have spurred the recent development of numerous data analysis techniques for modern estimation and detection (e.g. classification) problems. In image analysis and vision the application of transport-based techniques to numerous problems including: image retrieval, registration and morphing, color and texture analysis, image denoising and restoration, morphometry, super resolution, and machine learning [START_REF] Papadakis | Optimal Transport for Image Processing[END_REF][START_REF] Bonneel | Optimal Transport for Computer Graphics and Temporal Coherence of Image Processing Algorithms[END_REF][START_REF] Santambrogio | Optimal transport for applied mathematicians: calculus of variations, PDEs, and modeling[END_REF][START_REF] Torres | A Survey on Optimal Transport for Machine Learning: Theory and Applications[END_REF].

In the last decades, the estimation of the optical flow gained more and more attention in image processing field [START_REF] Barron | Performance of optical flow techniques[END_REF][START_REF] Bruhn | Lucas/Kanade Meets Horn/Schunck: Combining Local and Global Optic Flow Methods[END_REF][START_REF] Grossauer | Inpainting of Movies Using Optical Flow[END_REF][START_REF] Fassold | A qualitative investigation of optical flow algorithms for video denoising[END_REF]. Optical flow may found its application in almost all the movies compression processes, via motion compensation, or for computer vision applications [START_REF] Smith | ASSET-2: Real-Time Motion Segmentation and Object Tracking[END_REF][START_REF] Kirisits | Optical Flow on Evolving Surfaces with an Application to the Analysis of 4D Microscopy Data[END_REF][START_REF] Andris | A proof-of-concept framework for PDE-based video compression[END_REF]. The problem of motion's detection in an image sequence under constancy assumption on the pixels intensity is an ill-posed problem and involve numerous difficulties like the aperture problem, occlusions or large displacements [START_REF] Weickert | Variational Optic Flow Computation: From Continuous Models to Algorithms[END_REF]. So far, there exist efficient methods for the optical flow estimation using Partial Differential Equations (PDEs). Particularly, they offer a complete mathematical framework and a large number of numerical methods [108, [START_REF] Horn | Determining Optical Flow[END_REF][START_REF] Weickert | Variational Optic Flow Computation: From Continuous Models to Algorithms[END_REF][START_REF] Wedel | Statistical and Geometrical Approaches to Visual Motion Analysis[END_REF][START_REF] Pérez | Robust Optical Flow Estimation[END_REF][START_REF] Gilliocq-Hirtz | A massively parallel multi-level approach to a domain decomposition method for the optical flow estimation with varying illumination[END_REF]. These methods deal with the ill-posedness of the optic flow problem by including regularization techniques like the Tikhonov regularization [START_REF] Tikhonov | Solutions of Ill-Posed Problems[END_REF]. The regularization techniques aim to circumvent the ill-posedness by adding priors as assumptions on the solution ensuring for example some smoothness, or sparsity.

In this framework, most of the classical optical flow models assume constant illumination of the scene [108,[START_REF] Horn | Determining Optical Flow[END_REF]. The violation of this constraint affect negatively the optic flow estimation by introducing a "false" motion due to the varying illumination. Among the responses to fix this problem, Gennert and Negahdaripour proposed to relax the constancy assumption on the intensity, by adding linear variations of the illumination [START_REF] Gennert | Relaxing the Brightness Constancy Assumption in Computing Optical Flow[END_REF]. In [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF], this idea was implemented in the framework of PDEs methods for optic flow estimation by considering small varying illumination as a supplementary variable with the optic flow components.

In this chapter, we introduce a new optimal transport-based model for optical flow estimation with varying illumination. The standard methods in the optic flow estimation field are based on the transport of particles (pixels) along characteristics (loosely speaking a "Boltzmann-Liouville" framework). The constancy assumption is expressed by a non-conservative transport equation where the unknown is the flow vector. The new model that we introduce in this article consists of a "kinetic" formulation where instead of considering a transport of particles, we rather consider a "density" (optimal) transport (loosely speaking a fluid mechanics framework). the motion, i.e. transport, of densities (number of particles and intensities in a small unit volume) are expressed via conservation equations, that is to say, conservative transport equations. The varying illumination is intimately linked to the variation of the considered volume expressed with the (divergence of) flow vector and not as an external variable.

We hope that the new model give us a quite deep understanding of motion analysis in computer vision and the optimal transportation formulation, thanks to Benamou-Brenier's characterisation, offer a complete theoretical to computational framework to solve the optical flow estimation problem. We emphasise that the optimal transport formulation avoid any regularization technique, handles naturally the sparsity constraint (the vector fields is a gradient of convex function given by an eikonal equation), and the variation of the illumination corresponds to a "physical" constraint. In addition, thanks to the rapid development of accurate and low cost numerical methods in the numerical optimal transport theory, many improvements remain open to investigate.

Organisation of the Chapter

In Section 4.1, we propose a new optical flow model based on the continuous fluid mechanics equations. In Section 4.2, we briefly remind the optimal transportation model and the famous Benamou-Brenier formula. In Section 4.3, we recall the Benamou-Brenier algorithm to solve the continuity equation where the periodic boundary conditions are replaced by homogeneous Neumann boundary conditions. Finally, in Section 4.4, we present numerical results to confirm the pertinence of our proposed model.

Optimal Transport Based Model

Let consider a general flow equation with a velocity u, eventually depending on time, given by

χ(t, x) = u(t, χ(t, x)), χ(0, x) = x (4.1)
Instead of taking a constancy assumption on the intensity values of the pixels, let us consider a small volume U t := χ(t, U 0 ) containing a number of particles and associate a continuous density function ρ(t, x(t)) representing the mass (i.e. the number of particles) per unit volume at the point x(t). Then, it is standard to derive a continuity equation for the mass conservation under local form in [0, 1] × D,

∂ t ρ + div (ρ u) = 0. (4.2)
We notice that if f is quantity to be preserved in the transport along the characteristics then df dt = 0 along such curves. Then, we set

F(t) := Ut ρ(t, x) f (t, x) dx = U0 ρ t, χ(t, x) f t, χ(t, x) |det J(t, x)| dx,
where J(t, x) := ∂χ(t,x) ∂x is the Jacobian matrix of χ. If we make the assumption that, by following the characteristic given by χ, the value ρ f inside the moving small volume remains the same over the time i.e.

dF(t) dt = 0, (4.3)
then we have that,

Ut ρ(t, x) f (t, x) dx = U0 ρ(0, x) f 0, x)|det J(0, x) = I d | dx = U0 ρ(0, x) f 0, x) dx.
Thus, the continuity equation holds for (ρf, u) in [0, 1] × D, ∂ t (ρf ) + div (ρf u) = 0.

Using (4.2), a straightforward calculation and the mass conservation, we get in [0, 1] × D,

∂ t f + u ∇f = 0. (4.4)
Now, in the case of varying illumination, mimicking the optic laws we may assume that :

d dt f t, χ(t, x) := m t, χ(t, x) f t, χ(t, x) ,
where m acts as an attenuation factor on the intensity f . Now, let

f (t, x) := f (t, x)e -t 0 m(s,x) ds .
Thus d f dt = 0 along the characteristics, and we may derive that : by choosing m = -div(u) and with the "boundary conditions",

F(t) = Ut ρ(t, x) f (t, x) dx = U0 ρ t, χ(t, x) f t, χ(t, x) |det J(t, x)| dx,
f (0, •) = f 0 , f (1, •) = f 1 . (4.6)
We notice that this computations use

∂ t |det J(t, x)| = div u t, χ(t, x) |det J(t, x)|, |det J(0, x)| = 1. (4.7)
In other words, |det J(t, x)| = e t 0 div (u(s,χ(s,x))) ds .

Before giving an interpretation to this conservative form, we notice that in case of constant mass density ρ and constant illumination, we retrieve the standard model

∂f (t, χ(t, x)) ∂t = 0 ⇐⇒ ∂ t f + u • ∇f = 0.
Thus, the equation (4.4)

∂ t f + u • ∇f + div (u)f = 0,
with m := -div (u) turns to be an assumption on how the variation of the illumination modify the conservation of the intensity, per unit volume, and may be interpreted as taking into account light pixels entering the volume U t instantly and changing the intensity map. That is to say the variation of the illumination acts on the volume as a heating effect on all the pixels of U t and not pixel-wise as in [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF]. In addition, such an interpretation appears close to the optic laws for light propoagation. We emphasise that in case div (u) = 0, then it means that the volume is preserved and in our case the illumination is constant, however, we do not retrieve the standard model in this case, as this one do not assume any divergence free motion.

The Benamou-Brenier Formula

Let us recall the framework of the Monge-Kantorovich problem which is as follows. Two density functions ρ 0 > 0 and ρ 1 > 0 in R d , that we assume to be bounded with total mass one

O ρ 0 (x) dx = O ρ 1 (x) dx = 1.
Let X, Y be two measures spaces. Denoting the measures with densities µ = ρ 0 dx and ν = ρ 1 dx, Monge's optimal transportation problem is to find a measurable map T : X → Y that transport (pushes) µ onto ν and minimizes the following objective function,

C(µ, ν) := inf T ∈Tr (µ,ν) X c(x, T (x))ρ 0 (x) dx,
where c : X × Y → R + is the cost function and Tr (µ, ν) = {T : X → Y | T ♯ µ = ν}, where T ♯ µ represents the pushforward of measure µ and is characterized as,

ν(A) = µ(T -1 (A)), for any measurable A ⊂ Y.
The Kantorovich formulation of the transportation problem consists of optimizing over transportation plans, where a transport plan is a probability measure γ ∈ P(X × Y ) with marginals µ and ν. One can think of γ as the joint distribution of ρ 0 and ρ 1 describing how much "mass" (or number of particles) is being moved to different coordinates. Let γ be a plan with marginals µ and ν, i.e.

(π X ) ♯ γ = µ, (π Y ) ♯ γ = ν,
where π X : X × Y → X, resp π Y : X × Y → Y are the canonical projections. Let Marg(µ, ν) be the set of all such plans, then the Kantorovich's formulation can then be written as, C(µ, ν) = min γ∈Marg(µ,ν) X×Y c(x, y) dγ(x, y).

For any transport map T : X → Y there is an associated transport plan, given by

γ = (I d × T ) ♯ µ,
that is to say γ(A, B) = µ({x ∈ A; T (x) ∈ B}). The so-called L p -Kantorovich (or Wasserstein) distance between µ and ν, which admit the densities ρ 0 and ρ 1 is defined by : p ≥ 1,

W p (µ, ν) p = min γ∈Marg(µ,ν) X×Y |x -y| p dγ(x, y) = inf T ∈Tr(µ,ν) X×Y |x -T (x)| p ρ 0 (x) dx. (4.8)
In [START_REF] Benamou | A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem[END_REF][START_REF] Villani | Topics in optimal transportation[END_REF] the following characterization of the 2-Wasserstein distance is proved : Proposition 4.2.1. (Benamou-Brenier Formula). The square of the L 2 -Wasserstein distance is equal to the infimum

inf (ρ,v) 1 0 O ρ(t, x)|v(t, x)| 2 d xdt, (4.9)
among all pairs (ρ, v) satisfying (4.4) and (4.6).

Moreover, formal optimality conditions give :

v(t, x) = ∇ψ, ψ t + 1 2 |∇ψ| 2 = 0. (4.10)
Note. The result of Benamou-Brenier is given for O = R d , other versions in bounded domains may be found for example in Villani [START_REF] Villani | Topics in optimal transportation[END_REF][START_REF] Figalli | An Invitation to Optimal Transport, Wasserstein Distances, and Gradient Flows[END_REF].

Let us normalize our images f 0 and f 1 in the optic flow problem to be probability densities. Then, minimizing (4.8) for p = 2, allows us to formulate the optimal transport model for the optic flow estimation with varying illumination as : finding

inf (f,u) 1 0 O f (t, x)|u(t, x)| 2 dx dt, (4.11)
under the constraints

∂ t f + div (u f ) = 0. (4.12) and f (0, x) = f 0 (x), f (1, x) = f 1 (x). (4.13)
and the (infinitesimal) illumination m(t, x) = -div u(t, x).

In this model, the illumination do not appear as supplementary variable (see [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF]) and there is no need of regularization as in the standard non conservative transport model. In fact, the transport model gives more than an optic flow estimation that is interpolation functions f (t, x) and u(t, x) before the final time, i.e. for t < 1.

The Numerical Method

In their paper, Benamou and Brenier proposed to use the augmented Lagrangian method in order to solve (4.11) under constraints (4.12) and (4.13) [START_REF] Benamou | A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem[END_REF][START_REF] Fortin | Augmented Lagrangian Methods: Applications to the Numerical Solution of Boundary-Value Problems[END_REF]. They solves the involving equations in R d and for numerical constraints they add periodic boundary conditions in space. Here, we work in a bounded domain D and we impose Neumann boundaries condition in space. We gives the modified Benamou-Brenier algorithm which is based on relaxed Uzawa iterations :

For (ϕ n-1 , q n-1 , µ n ) givens,

• Find ϕ n , solution of

         -r∆ t,x ϕ n = ∇ t,x • (µ n -rq n-1 ), in [0, 1] × D, r∂ t ϕ n (0, •) = f 0 -f n (0, •) + ra n-1 (0, •), in D, r∂ t ϕ n (1, •) = f 1 -f n (1, •) + ra n-1 (1, •), in D, ∂ n ϕ n = 0, on [0, 1] × ∂D, (4.14)
with µ n := (f n , (f u) n ) and q n-1 := (a n-1 , b n-1 ).

• Find

q n := (a n , b n ) such that inf (a n ,b n )∈K (a(t, x) -α n (t, x)) 2 + |b(t, x) -β n (t, x)| 2 ,
with p n (t, x) := (α n (t, x), β n (t, x)) = ∇ t,x ϕ n (t, x) + µ n (t,x) r and

K := a : R × R d → R, b : R × R d → R d a(t, x) + |b(t, x)| 2 2 ≤ 0, ∀(t, x) ∈ R × R d .
This turns out to be a simple one dimensional projection problem. It is important to notice that this minimization can be performed pointwise in space and time. The analytical solution can be found analytically by using Cardano's formula.

• Do the pointwise update

µ n+1 = µ n + r(∇ t,x ϕ n -q n ),
where r > 0 is the parameter of the augmented Lagrangian.

The stopping criterium is when the quantity

1 0 D f n |res n | dxdt 1 0 D f n |∇ x ϕ n | 2 dxdt
, is small enough, where

res n := ∂ t ϕ n + |∇ x ϕ n | 2 2 .

Numerical Results

We discretize the time interval [0, 1] using a uniform subdivision t 1 = 0 < t 2 < . . . < t N = 1. We solve the equation on ϕ n by using finite differences on a regular mesh where every node represents a pixel of the images. We use the same grid for the projection problem and the pointwise update from the Benamou-Brenier algorithm. By solving the continuity equation, we obtain an interpolation in time between f 1 and f 2 , an optic flow u and a luminosity variation m which are time-dependent. However, we wish to remove this time dependency. To this end, we set u : R This add a trajectory reconstruction step to our method in order to retrieve the optic flow. With this optic flow and luminosity variation we have

f 2 x + u(x) = 1 + m(x) f 1 (x).
We give in Figure 4.1 the starting and ending image along with the true optical flow without luminosity variations for several examples from [START_REF] Baker | A Database and Evaluation Methodology for Optical Flow[END_REF]. In Figure 4.2, we present the numerical illustrations of the method developed in this paper N t = 4 points for the time's discretization and r = 2 in (4.14). Since the luminosity variation m is between -1 and 1, we re-scaled it to be between 0 and 1 in Figure 4.2, thus the grey color means that m vanishes.

In Figure 4.3, we give the results for the classical optical flow formulation with varying luminosity assumption and with the global-local method with ρ = 0.4, α = 0.1 and λ = 0.5 [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF].

The first observation is that the resulting optical flow and the luminosity variations are concentrated on the edges and then are very sparse which is a nice property for compression purpose. It means that, on common homogeneous parts between the images, the is no need to have nor spatial nor luminosity movements. This characteristic is what differs from previous approach where the optic flow vector is smoothed by the regularization, add non-pertinent movement and may introduce error in homogeneous parts. Here however, there seems to have no reconstruction error in the homogeneous parts. The error is more presents near the edges, where the movements exists. This is due to the regularization effect of r in (4.14). In addition, adding more points in the time discretization gives a more accurate optic flow and luminosity variations.

We give in Table 4.1 the computation time needed to compute the optical flow for both the classical formulation and the optimal transport model. In fact, the time required to process an iteration of the modified Benamou-Brenier algorithm is almost the same as solving the whole classical optical flow problem. Indeed, the first one need to solve a N t × N x × N y linear system and the second solves a 3 × N x × N y , where N t is the number of points for the time discretization and N x , N y are the numbers of points for the space discretization. However, the optimal transport approach needs many iterations to converge to the solution (around 20).

Video Classical

Conclusion

In this chapter, we formulated a new model to handle the optical flow computing problem. This new model deals with brightness variations like several state-of-the-art approaches, but differ from them by not needing any regularization technique to have a well-posed problem. This absence of smoothness assumption leads to a resulting sparse optical flow as well as a sparse brightness variation, where all the information are concentrated around the moving edges. This property may be useful for video compression purpose which use motion compensation methods. To numerically solve our new model, we use optimal transport theory along with the Benamou-Brenier theorem and numerical algorithm. Finally, we present numerical results for determining the optical flow and the brightness variations, for predicting the frames and for comparing this resulting prediction to the original images. It appears that the information given by the optical flow and the error are concentrated near the edges (where the movement belongs) but almost vanishes inside the common homogeneous regions of the images. The counterpart of this property is a longer computation time than classical optical flow model computation.

Part III

Application to Video Compression

Introduction

In 2016, Andris et al proposed to use a video compression codec using mainly variational methods [START_REF] Andris | A proof-of-concept framework for PDE-based video compression[END_REF]. As with more traditional codecs, the frames that compose a video are separated into two categories: intra frames and inter frames. The intra frames are decoded using an inpaiting compression method (Part I) while the inter frames are decoded using optical flow methods (Part II). Thus, an inter frame needs the previous frame (or frames) to be reconstructed. Then, the frames of the video are grouped into groups of pictures (GOPs) so that only the first frame of a group is an intra frames and the following ones are inter frames. The first step, shown in blue on the Figure 5.1, is to determine these GOPs. For a given GOP, the second step, in red on the Figure 5.1, consists in applying the adequate compression method to the type of the considered frame (inpainting or optical flow) and to calculate the residual data by subtracting the reconstruction with the original image. Saving the residual data adds the possibility of having a lossless compression codec and avoiding the propagation of errors from one frame to the next. In this chapter, we will not consider the residual data. Finally, the last step, in yellow on the Figure 5.1, saves the data produced by the previous steps and applies a symbol coding in order to eliminate the redundancies due to the coding of the data.

Choice for the Coding Step

The first step is to determine the type of image being processed. To do this, we calculate the error L 2 between the current image f n and the previous image f n-1 . If this error is less than a certain threshold, we consider that the two images are close enough to be treated as an inter frame i.e. by optical flow. Thus, we add f n to our current GOP. If the error is greater than the threshold, it is considered as an intra frame i.e. it is compressed with an inpainting method and a new GOP is started. Moreover, since our codec does not take residual data into account, we want to add a constraint on the size of our GOPs so as not to propagate errors too widely.

For the human visual system, errors in the Cr and Cb chrominance channels (color information) have a smaller impact on perceived quality than errors in the Y luminance component (visual sensation of brightness) [START_REF] Peter | Colour image compression with anisotropic diffusion[END_REF]. We then choose to convert each frame of the video to the YCrCb format rather than using the RGB (Red, Green and Blue) format directly. Since the Y luminescence channel is the most important, it is this one that will allow us to create an inpainting mask for the intra frames and to estimate the optical flow for the inter frames. In this way we will obtain a single mask/optical flow for each colored image.

Finally, as in [START_REF] Andris | A proof-of-concept framework for PDE-based video compression[END_REF], we choose to sub-sample the optical flow when storing it.

File Format

For a video streaming application, we want to send information about the methods used for each block to each frame. This choice allows to add the possibility to change quality, size or computing power on the fly. For a video storage application, we can put this information once at the beginning of the file since it will not change during decompression.

Coding of an Intra Frame

For the coding of an intra frame, we choose to be inspired by the Run Length Encoding [START_REF] Robinson | Results of a prototype television bandwidth compression scheme[END_REF]. We go through the inpainting mask from left to right and from top to bottom and we count the number of pixels located between two consecutive pixels in the mask. Once the data sequence has been constructed, a symbol encoder is applied to remove the encoding redundancy. Here is the format chosen to encode a intra frame :

• Type of frame (1 byte) : For example 1 for an intra frame.

• Size of the frame (4 bytes) : 2 bytes for its width and 2 bytes for its height. We can have a maximum resolution of 65536 × 65536.

• Data size (4 bytes or more): The size of this field will depend on the resolution of the image.

• Data with symbolic coding (variable size): For each pixel selected in the inpainting mask:

-Counter (variable size) : counter value between two consecutive pixels in the inpainting mask.

-Luminance channel Y (1 byte).

-Chrominance channel Cr (1 byte).

-Chrominance channel Cb (1 byte).

We could reduce the size of the data of a frame by encoding the type of the frame on 1 bit, but for technical constraints due to python, we choose here 1 byte.

Coding of an Inter Frame

Contrary to the encoding of intra frames, it is not necessary to save the dimensions of the image since these must be constant within a GOP. The main difficulty here comes from the fact that the u 1 and u 2 components of the optical flow can be arbitrarily large. However, in the case of small displacements, we can assume that these components are not too large. We can then transform the value of u 1 and u 2 in order to store them on a byte. Moreover, we will not consider the methods taking into account the variations of luminosity and thus we have only u 1 and u 2 to store. Once the data sequence is built, we apply a symbol encoder to remove the encoding redundancy. Here is the format chosen to encode an inter frame:

• Type of frame (1 byte): For example 0 for an inter frame.

• Data size (4 bytes): The size of this field will depend on the resolution of the image and the homogeneity of the movement.

• Data with symbolic coding (variable size): For each pixel in the optical flow sub-sample:

-Component u 1 of the optical flow (1 signed byte).

-Component u 2 of the optical flow (1 signed byte).

Numerical Results

We propose to compare the "blocks" of our video codec with existing video compression methods. In this section, we will use finite differences for solving the partial differential equations in the inpainting methods and the optical flow, unless otherwise specified. When we use the finite element method, we will use the scikit-fem [START_REF] Gustafsson | scikit-fem: A Python package for finite element assembly[END_REF] package of python for inpainting and FreeFem++ [START_REF] Hecht | New development in FreeFem++[END_REF] for optical flow resolution with adaptive control of the regularization parameter [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF].

Comparison of Symbol Encoders

Before we can compare the compression methods for the inter frames and the intra frames, we start by comparing the coding compression methods. As these are lossless, the use of one method rather than another has no influence on the quality of the decoded data. In this section, we will compare the methods bzip2, LZMA and PAQ. PAQ uses a context mixing algorithm which is a type of data compression algorithm in which predictions of the following symbol use different statistical models and are combined to produce a prediction that is often more accurate than any of the individual predictions. LZMA uses a dictionary compression algorithm. Finally, the algorithm bzip2 uses the Burrows-Wheeler transform [START_REF] Burrows | A block-sorting lossless data compression algorithm[END_REF] with the Huffman coding. The most expensive storage in terms of data size in our video codec being the storage of the inpainting masks of the intra frames, we choose to make simulations only on the storage of these ones. We choose to do the tests on the following mask creation strategies: random (RAND) and mask from Belhachmi et al with hard/soft-thresholding (respectively H1-T and H1-H ) [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF]. Our tests are carried out on the database of color images from Kodak (http://r0k.us/graphics/kodak/ and Section 5.4) of size 768 × 512. We give in Figure 5.2 (and Section 5.5) the number of bytes needed to store the inpainting mask compared to the pixel density in the inpainting masks.

It appears that the PAQ method allows a better compression of the data of the inpainting mask and this, whatever the strategy of creation of the mask and the density of pixels in it. This is why in the following sections, we will carry out numerical simulations only with the PAQ compression.

Comparisons of the Blocks of Intra Frame

Now, we propose numerical simulations to compare the different combinations of blocks in our codec. As said in the previous section, we will use PAQ as a symbol encoder. We propose to compare the following algorithms: H1-H, L2-INC-T and L1-ADJ-H. As for the previous section, we will perform the numerical simulations on the database of color images of Kodak (http://r0k.us/graphics/kodak/ and Section 5.4). In order to make the calculation time reasonable, we choose to resize the images to 384 × 256. For L2-INC-T we choose α = 0.01 and q = 50, and for L1-ADJ-H we choose α = 1.

In most cases, the use of finite elements does not improve the quality of the image reconstruction. On the other hand, finite elements allow to significantly reduce the number of unknowns in the linear system and thus to reduce the computation time needed for the reconstruction. Moreover, L1-ADJ-H seems to give the best reconstructions for intra frames whatever the density of pixels in the inpainting mask. This is the reason why we choose this method in the rest of this chapter.

Comparisons of the Blocks of Inter Frame

We will perform our tests on the following video database: https://media.xiph.org/video/derf/. We choose videos of size 352 × 288 of different natures (homogeneous zones, textures, camera movements, object movements, ...).

Here and thanks to the numerical results of the previous section, we choose as mask creation strategy L1-ADJ-H coupled with linear diffusion inpainting, which offers the best reconstruction quality in terms of MSE. We propose to compare the optical flow computed with the local (L), global-local (GL), adaptive (ADA) and global-local with coarse-to-fine (CGL) method [START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF]. We take for the local method ρ = 5, for the global-local method ρ = 5 and α = 2 and for the coarse-to-fine we make 5 iterations and we take α = 0.2 and ρ = 1. The sub-sampling is done with blocks of size 16 × 16 and we take 8% of the pixels for the intra frames.

As expected, the error is propagated between inter frames within a GOP. We see on the images given in the Section 5.7 that the images predicted by the optical flow show more blurring effect than the original ones. Moreover, due to the sub-sampling of the optical flow, we have the appearance of visual artifacts similar to those of the block matching methods. Although the local (L) optical flow induces a larger error at the beginning of the GOPs, it also seems to propagate the error less. Thus, for the chosen videos, it seems that the optical flow of the local (L) method is the most suitable among those tested and with the chosen parameters. Finally, the assumption of constancy of brightness does not seem to be really adapted to real videos because it does not take into account the variations of brightness in the video.

To summarise, we give in the following Figure 5.4 an idea of how the inpainting error are propagated by the optic flow for the methods chosen.

Comparison with Some Existing Standards

We propose to compare one of our variational video compression methods with the video codecs Motion JPEG2000 and MPEG-4 Part 2. Unlike MPEG-4 Part 2 as well as our codec, Motion JPEG2000 does not use motion compensation for video encoding. We propose to carry out our tests on the same videos as the preceding section. We use the software ffmpeg in its version 3.4.11 for the conversion of the videos in the standard formats. Before that, we choose to modify our codec because Motion JPEG2000 and MPEG-4 Part 2 are optimized for the storage of videos. We thus propose to carry out the stage of coding of symbols on the whole of the video rather than for each frame. This has the effect of considerably reducing the size of the final file without affecting the quality of the reconstructions. Our codec will use the L1-ADJ-H method with α = 1 for the coding of the intra frames and the local L method with α = 5 for the inter frames. Finally, the symbolic coding will be done with PAQ.

We give Figure 5.5 the MSE error as a function of the image number with as final file size for the three codecs 500Kb, 2.5M b and 1.5M b. For the videos waterfall_cif.y4m and hall_monitor_cif.y4m we will use blocks of size 8 × 8 for the sub-sampling of the optical flow and of size 16 × 16 for the video akiyo_cif.y4m. Very clearly, we see that in all cases, the coding of the intra frames gives less good reconstruction than for the two other codecs. Moreover, the error propagates very quickly within the GOPs with the optical flow methods implemented in this thesis.

Conclusion

In this chapter, we first described a codec using only variational methods for video reconstruction. This codec is composed of "blocks" performing independent compression tasks: a block for encoding intra frames, a block for encoding inter frames and a block for encoding symbols. We then determined which blocks are the best among the methods studied in this thesis. The combination of L1-ADJ-H with the optical flow method and the PAQ compression seems to be the best for the tested videos. We then compared our codec to the Motion JPEG2000 and MPEG-4 Part 2 codecs. Although a fully variational codec seems promising for video compression, it still lacks maturity. It could be interesting to add residue saving during motion compensation in order to avoid the propagation of errors within a GOP which is very important at the moment. Another way to reduce this propagation would be to use more accurate optical flow calculation methods. Concerning the intra frames, we could also add the tonal optimization and the interpolation swapping to reduce the reconstruction error [START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF]. Moreover one could reduce the cost of storage of the value of the pixels thanks to a resampling of the data (brightness rescaling [START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF]) and thus to be able to store more pixels without modifying the size of the final file.

Images Used from the Kodak Database

Our numerical simulations are performed on some images from the Kodak color image database (http: //r0k.us/graphics/kodak/).

Symbol Encoder Comparison Graphics

Comparison Graphs of the Encoders of Intra Frames

Conclusion and Perspectives

In this thesis, we have proposed models and variational methods based on partial differential equations to compress images and videos taking into account the presence of noise in them. The objective is to be able to remove a part of these deteriorations from the image via the action of the compression rather than to carry out a step of pre-filtering on the image to be compressed. For that, this manuscript is cut in three distinct parts. In Part I, we focused on the optimization of the set of pixels to keep in the case where the image to compress is noisy. In Part II, we focused on the estimation of the motion within a video. Finally, in Part III, we implemented a functional codec using the results found in the two previous parts.

In Chapter 1, we considered the problem of finding the best interpolation data in PDE-based compression problems for images with noise. We introduced a geometric variational model to determine a set K that minimizes the distance L 2 between the initial image and its reconstruction from the data in K.

In particular, we have studied two points of view to choose an optimal inpainting mask K: a first one using an asymptotic development similar to the topological gradient, and a second one considering sets formed by a finite number of balls called "fat pixels". Both theoretical results underline the importance of the Laplacian of the data and highlight the deep link between the geometric set and the inpainting operator (in our case, the linear diffusion). We have performed several numerical tests and comparisons that demonstrate the effectiveness of the approach in processing images with noise.

In Chapter 2, we studied a new fully parabolic model based on the heat equation for PDE image compression and formulated an associated shape optimization problem for the best choice of data interpolation. Using the results found in Chapter 1, we proved that this model has a relaxed solution under γ-convergence and studied the same two views as in Chapter 1 to choose an optimal inpainting mask. Unlike the stationary case, the iterative approach includes the results of the previous steps in the analytical criterion giving the best choice which now depends on the iterations. Then, we proposed and implemented three algorithms to build the sequence of inpainting masks (K n ) n : L2-INSTA, L2-DEC and L2-INC, and we performed several simulations with different compression rates, different amounts of noise for grayscale images. It appears that in most cases, the masks from the L2-INC-T algorithm perform better than the others. Finally, we performed a tonal optimization within the same method by allowing the Dirichlet condition on the mask to change with the iterations. This modification appears to give better results for denoising while compressing an image with noise than the sparsification and densification algorithms [START_REF] Adam | Denoising by Inpainting[END_REF][START_REF] Mainberger | Optimising Spatial and Tonal Data for Homogeneous Diffusion Inpainting[END_REF] when the noise level is high.

In Chapter 3, we formulated the image compression problem as a shape optimization problem which we reformulated using the so-called Dirichlet-to-Neumann operator so that it can be treated by the adjoint method. We have given the adjoint problem and computed the asymptotic development of the variations of the functional. Finally, we presented some numerical results in the case of L 2 error and an approximation of L 1 error. These simulations favored the use of the inpainting mask where the pixel density increases with the analytical criterion obtained with the adjoint method. Moreover, it appeared that our new methods are more efficient in terms of reconstruction quality than the existing ones when the image to be compressed contains Gaussian noise or impulse noise. Moreover, our new methods are easy to implement.

In Chapter 4, we have formulated a new model to deal with the problem of optical flow computation. This new model takes into account luminosity variations like several state-of-the-art approaches, but it differs from them in that it does not require any regularization technique to obtain a well-posed problem. This absence of regularity assumption leads to an optical flow and a luminosity variation that vanish in homogeneous areas and all information is concentrated around the edges. This property can be useful for Chapter 5. Conclusion and Perspectives video compression that uses motion compensation methods. To solve numerically our new model, we use the optimal transport theory and the Benamou-Brenier theorem and their numerical algorithm. Finally, we present numerical results where we determine the optical flow and brightness variations, reconstruct the images and compare them to the original images. It appears that the error is concentrated near the edges (where there is motion) but vanishes within the homogeneous regions common between the images. The counterpart of this property is a longer computation time than classical optical flow model computation.

Finally, in Chapter 5, we described a variational video codec, composed of "blocks" independent from each other. We have determined which are the best blocks among the methods studied in this thesis and the combination L1-ADJ-H with the local optical flow method and the compression PAQ seems to be the best for now. We then compared our codec to the JPEG2000 and MPEG-4 Part 2 codecs. Although it seems promising, our codec still lacks maturity. It could be interesting to add residue saving during motion compensation in order to avoid the propagation of errors within a GOP which is very important for the moment.

Among the perspectives considered, we can use the iterative methods proposed in Chapter 2 with the results found in the framework of the adjoint method of Chapter 3. Another direction of research would be to use an inpainting problem minimizing the L p error (its energy), rather than a model minimizing the L 2 error as developed in this thesis. Finally, we could also look for analytical criteria for inpainting problems using nonlinear PDEs, such as the edge-enhancing diffusion. Moreover, there are other types of numerical noises that would be interesting to consider (speckle noise, Poisson noise, ...). In the same way, it could be interesting to propose an optical flow model more robust to the noise contained in an image sequence.

Finally, we could run the codec in real time by systematically using the finite element method, in order to reduce the number of unknowns when solving the linear system as well as to use domain decomposition methods to be able to process videos in high resolutions. It could also be interesting to make the codec lossless by adding the residuals and to see the impact that this addition has on the final file size. We get the Γ-lim inf.

• lim sup : Let u be in H 1 (D), such that the maximum principle is fulfilled, i. Since ũ is fixed, we let ε tends to 0 and extract by a diagonal procedure a subsequence u εn n converging in L 2 (D δ ) to ũ i.e. As M δ 0 (D) is a compact with respect to the γ-convergence (Proposition 1.1.2 in Chapter 1), we can extract, from (∞ Kn ) n ⊂ M δ 0 (D) a γ-convergent subsequence. We denote by µ lim this γ-limit. We denote by G(µ lim ) the value G(µ lim ) := lim n→+∞ E(∞ Kn ) -β cap ν (∞ Kn ).

By definition of the γ-convergence, we have Γ -lim n→+∞ F ∞ Kn = F µ lim . Since F ∞ Kn is equicoercive, we can apply Theorem 7.8 in [START_REF]An Introduction to Γ-Convergence[END_REF]. Thus E(µ lim ) := min Using the same substitution for the remaining integrals, we got the result.

And we finish by computing the second part of Proposition A.2.2. dy.

According to [START_REF] Oldham | An Atlas of Functions[END_REF], K 0 is an increasing function. Thus, for y in B(x 0 , ε),

K 0 1 √ α | • -y| L ∞ ∂B(x0,ε) := sup x∈∂B(x0,ε) K 0 1 √ α |x -y| ,
is attained where |x -y| := r 2 x + r 2 y -2r x r y cos (θ x -θ y ) is maximal, i.e. when cos (θ x -θ y ) = -1, i.e. for θ x = π + θ y . In that case, |x -y| = ε 2 + r 2 y + 2εr y = ε + r y . Thus,

∥G p (•, y)∥ L ∞ ∂B(x0,ε) = 1 2π K 0 1 √ α (ε + r y ) .
Then, we have

I 0 ≤ g(x 0 )πε 2 ε 0 r y K 0 1 √ α (ε + r y ) dy + O(ε 2 ) ε 0 r 2 y K 0 1 √ α (ε + r y ) dy ≤ g(x 0 ) π 2 ε 4 K 0 2ε √ α + O(ε 5 )K 0 2ε √ α .
Again, we use that, when z tends to 0, A.3 Bounds for the density θ in the "Fat Pixels" Approach

We aim to give some estimate of the function θ defined in Theorem 1.3.2 (Chapter 1). In the sequel, we denote by v K the solution of Problem 1.0.4, g := α∆f and t 1 := √ 2/2. We will widely use the following maximum principle (See [START_REF] Evans | Partial Differential Equations: Second Edition[END_REF] Theorem 2 in Section 6.4).

Theorem A.3.1 (Weak maximum principle). We assume that v K is in C 2 (D) ∩ C 0 ( D). If g ≥ 0 in D \ K, then v K ≥ 0 in D.

Moreover, using the weak formulation, Poincaré inequality and Hölder inequality, we have Note. If D ⊂ R 2 is convex we have, according to [START_REF] Payne | An optimal Poincaré inequality for convex domains[END_REF],

∥v K ∥ L 2 (D) ≤ 1 + απ 2 diam(D) -2 -1 ∥g∥ L 2 (D) . ∥v K ∥ L 1 (D) ≤ |D| 1/2 (1 + απ 2 diam(D) -2 -1 ∥g∥ L 2 (D) .
Moreover, if g = 1, we have ∥v K ∥ L 1 (D) ≤ (1 + απ 2 diam(D) -2 -1 |D|.

Lemma A.3.2. We have, for m in (0, t 1 ), θ(m) ≤ C 1 (α) ln m -1 + C 2 (α),

where C 1 and C 2 are constants depending on α.

Proof. We consider a particular family of sets K n in A m,n . We choose an integer k such that n = k 2 and we suppose K n ∈ A m,n are composed of n balls of radius m/k, with their centers superposing the centers of the k 2 squares of side 1/k of a regular lattice partitioning the square I 2 . Integrating over [m 1 , m 2 ] ⊂ (0, t 1 ) yields to

2π 2 α -1 2πα 2 (1 + 2π 2 α) ln m 2 m 1 - m 2 -m 1 α 2 + nF m2 ≤ nF m1 .
Taking inf over x i and passing to lim inf over n when n tends to +∞ leads to

2π 2 α -1 2πα 2 (1 + 2π 2 α) ln m 2 m 1 - m 2 -m 1 α 2 + θ(m 2 ) ≤ θ(m 1 ).
In particular, if m 2 = t 1 and m 1 = m, 0 < m < t ≤ θ(m).

B.2 Additional Proofs

Here, we give some proofs of results stated in Chapter 3.

Proof of Proposition 3.2.1. We set

v := v ε , in D \ B R , v ε,R , in B R \ B ε .
Let φ be in V ε , then,

ãε (v, φ) := α D\Bε ∇v • ∇φ dx + D\Bε v φ dx = α D\B R ∇v • ∇φ dx + D\B R v φ dx + α B R \Bε ∇v • ∇φ dx + B R \Bε v φ dx = α D\B R ∇v ε • ∇φ dx + D\B R v ε φ dx + α B R \Bε ∇v ε,R • ∇φ dx + B R \Bε v ε,R φ dx = -α D\B R ∆v ε φ dx + α ∂D ∂ next v ε φ dσ =0 +α ∂B R ∂ nint v ε φ dσ + D\B R v ε φ dx -α B R \Bε ∆v ε,R φ dx + α ∂B R ∂ next v ε,R φ dσ + α ∂Bε ∂ nint v ε,R φ dσ =0 since φ∈Vε + B R \Bε v ε,R φ dx = D\B R (-α∆v ε + v ε ) φ dx + B R \Bε (-α∆v ε,R + v ε,R ) φ dx + α ∂B R ∂ nint v ε φ dσ + α ∂B R ∂ next v ε,R φ dσ = D\Bε h φ dx + α ∂B R ∂ nint v ε φ dσ + α ∂B R ∂ next v ε,R φ dσ = D\Bε h φ dx -α ∂B R ∂ next v ε,R φ dσ + α ∂B R ∂ next v ε,R φ dσ = D\Bε h φ dx = l0 (φ).
By the uniqueness of the solution, we have v = v ε .

Proof of Proposition 3.2.2. • It is sufficient to prove that α ∂B R T ε v φ dσ is symmetric :

α ∂B R T ε v φ dσ = α ∂B R ∂ n v 0,v ε φ dσ = α ∂B R ∂ n v 0,v ε v 0,φ ε dσ = α B R ∆v 0,v ε v 0,φ ε dx + α B R ∇v 0,v ε • ∇v 0,φ ε dx = B R v 0,v ε v 0,φ ε dx + α B R ∇v 0,v ε • ∇v 0,φ ε dx.
• Let ϕ be in H 1/2 (∂B R ),

α ∂B R h ε ϕ dσ = -α ∂B R ∂ n v h,0 ε v 0,ϕ ε dσ = -α B R ∆v h,0 ε v 0,ϕ ε dx -α B R ∇v h,0 ε • ∇v 0,ϕ ε dx = B R h v 0,ϕ ε dx - B R v h,0 ε v 0,ϕ ε dx -α B R ∇v h,0 ε • ∇v 0,ϕ ε dx = B R h v 0,ϕ ε dx - B R v h,0 ε v 0,ϕ ε dx + α B R v h,0 ε ∆v 0,ϕ ε dx -α ∂B R ∂ n v 0,ϕ ε v h,0 ε dσ = B R h v 0,ϕ ε dx + α B R (α∆v 0,ϕ ε -v 0,ϕ ε ) =0 v h,0 ε dx -α ∂B R ∂ n v 0,ϕ ε v h,0 ε =0 dσ = B R h v 0,ϕ ε dx.
Proof of Proposition 3.3.1. We set w R := w 0 | D\B R . We have to show that w R = w 0 i.e. a 0 (w R , φ R ) = -DJ 0 (v 0 )φ R , ∀φ R ∈ V R . Let φ R ∈ V R . We denote φ ∈ V 0 the extension of φ R to V 0 such that -α∆ φ + φ = 0 in B R . Thus,

a 0 (w R , φ R ) = α D\B R ∇w R • ∇φ R dx + α ∂B R T 0 w R φ R dσ + D\B R w R φ R dx = α D\B R ∇w R • ∇φ R dx + α ∂B R T 0 w R φ R dσ + D\B R w R φ R dx + B R (-α∆ φ + φ) =0 w 0 dx = α D\B R ∇w R • ∇φ R dx + α ∂B R T 0 w R φ R dσ + D\B R w R φ R dx -α B R ∆ φ w 0 dx + B R φ w 0 dx = α D\B R ∇w R • ∇φ R dx + α ∂B R T 0 φ R w R dσ + D\B R w R φ dx + α B R ∇ φ • ∇ w 0 dx -α ∂B R ∂ n φ w 0 dσ + B R φ w 0 dx = α D\B R ∇w R • ∇φ R dx + α ∂B R T 0 φ R w R dσ + D\B R w R φ R dx + α B R ∇ φ • ∇ w 0 dx -α ∂B R T 0 φ R w R dσ + B R φ w 0 dx = α D\B R ∇w R • ∇φ R dx + D\B R w R φ R dx + α B R ∇ φ • ∇ w 0 dx + B R φ w 0 dx = α D ∇ w 0 • ∇ φ dx + D w 0 φ dx = a 0 ( w 0 , φ) = -D J 0 (v D ) φ.
Moreover, by definition J 0 (v D ) = J 0 (v R ), thus,

D J 0 (v D ) φ = DJ 0 (v 0 )φ R .
By uniqueness of the solution, w R = w 0 .

B.3 Analysis of the Exterior Problem

Now, we give estimates of the solution to the exterior problem with the norms defined in Section B.1. For ϕ in H 1/2 (∂B 1 ), we define the exterior problem as the following : where E is the fundamental solution (radial) in R 2 \ {0} given by

     -α∆v ω + v ω = 0, in R 2 \ B 1 , v ω = ϕ, on ∂B 1 , v ω = 0, at ∞.
E(y) := 1 2π K 0 1 √ α |y| ,
where K 0 is the modified Bessel function of the second kind [START_REF] Oldham | An Atlas of Functions[END_REF] and p is the solution in H -1/2 (∂B 1 ) of ∂B1 E(y -x)p(x) dσ(x) = ϕ(y), ∀y ∈ ∂B 1 .

Proof. We differentiate and we use [START_REF] Oldham | An Atlas of Functions[END_REF] : Proof. Since K 0 is a positive and decreasing function, we have for (x, z) ∈ (∂B 1 ) 2 ,

K ′ 0 (z) = -K 1 (z) and K ′ 1 (z) = -K 0 (z) -1 z K 1 (z).
E(x -z) ≥ 1 2π K 0 (2α -1/2 ) ⇔ 2π K 0 (2α -1/2 ) E(x -z) ≥ 1.
Then, for z ∈ ∂B 1 , ∂B1 p(x)dσ(x) ≤ 2π K 0 (2α -1/2 ) ∂B1 E(x -z)p(x) dσ(x) = 2π K 0 (2α -1/2 ) |ϕ(z)|.

We integrate on ∂B 1 with respect to z the square of the previous inequality and get,

B.4 Some Estimates for the Various Elliptic Problems in the Previous Sections

In this section, we give the estimates of the solution of the problem below with the norms defined in Section B.1.

Proposition B.4.1. Let ϕ ∈ H 1/2 (∂B R ). Let v ε be the solution of the following problem :

     -α∆v ε + v ε = 0, in B R \ B ε , v ε = 0, on ∂B ε , v ε = ϕ, on ∂B R .
Then, it exists 0 < ε 0 < R and C > 0 such that, for all 0 < ε < ε 0 , we have

∥v ε ∥ 1,B R \Bε ≤ C∥ϕ∥ 1/2,∂B R .
Proof. Let R/2 < ε 0 < R, them it is readily checked that :

∥v ε0 ∥ 1,α,B R \Bε 0 ≤ C∥v∥ 1,B R \B R/2 .
Next, we take ε < ε 0 . Then, D ε0 ⊂ D ε and we denote by v ε0 the extension by 0 of v ε0 to D ε . As v ε is solution of the problem, it follows :

∥v ε ∥ 1,B R \Bε ≤ C∥v ε ∥ 1,α,B R \Bε .
Proposition B.4.2. Let ψ ∈ H 1/2 (∂B ε ). Let v ε be the solution of the following problem :

     -α∆v ε + v ε = 0, in B R \ B ε , v ε = ψ, on ∂B ε , v ε = 0, on ∂B R .
Then, for ε small enough,

∥v ε ∥ 0,B R \Bε ≤ C 1 e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 , |v ε | 1,B R \Bε ≤ C 2 e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 , ∥v ε ∥ 0,B R \B R/2 ≤ C 3 e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 |v ε | 1,B R \B R/2 ≤ C 4 e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 .
Proof. We consider the following exterior problem : The other estimations are obtained similarly.

     -α∆v ωε + v ωε = 0, in R 2 \ B 1 , v ωε = ψ(ε •), on ∂B 1 , v ωε = 0, at ∞.
To summarize the estimations of this section, we have, Proposition B.4.3. Let ψ ∈ H 1/2 (∂B ε ) and ϕ ∈ H 1/2 (∂B R ). Let v ε be the solution of the problem below :

     -α∆v ε + v ε = 0, in B R \ B ε , v ε = ψ, on ∂B ε , v ε = ϕ, on ∂B R .
Then, for ε small enough,

∥v ε ∥ 0,B R \Bε ≤ C 1 ∥ϕ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 , |v ε | 1,B R \Bε ≤ C 2 ∥ϕ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 , ∥v ε ∥ 0,B R \B R/2 ≤ C 3 ∥ϕ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 , |v ε | 1,B R \B R/2 ≤ C 4 ∥ϕ∥ 1/2,∂B R + e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 .

  (10% des pixels dans le masque). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Quelques résultats numériques pour le flot optique avec luminosité constante. . . . . . . . 14 Flot optique avec variation de la luminosité (ρ = 0.4, α = 0.1 et λ = 0.5). . . . . . . . . . 1.1 Input images with and without gaussian noise of standard deviation σ. . . . . . . . . .

  4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7 With L2-H β = 0.18, ∥f -u∥ 2 = 4.78. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.8 With L2-T β = 0.00005, ∥f -u∥ 2 = 13.91. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.9 With L2-H β = 0.0009, ∥f -u∥ 2 = 12.57. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.10 With L2-H β = 1.2, ∥f -u∥ 2 = 7.77. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.11 Image reconstruction with 10% of total pixels saved and 2% of salt and pepper noise applied to the input image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.12 Image reconstruction with 10% of total pixels saved and 1% of salt noise applied to the input image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.13 Image reconstruction with 10% of total pixels saved and 1% of pepper noise applied to the input image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.14 Reconstructions for colored images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.15 Reconstructions for colored images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Zoom on homogeneous parts and edges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Masks and reconstructions for Table

3. 1 124 A. 1

 11241 Illustration of the splitting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 3.2 Input images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3.3 Masks and reconstructions from image without noise and with 10% of total pixels saved. . 84 3.4 Masks and reconstructions from image with 2% of salt noise and with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 3.5 Masks and reconstructions from image with 2% of pepper noise and with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 3.6 Masks and reconstructions from image with 2% of salt and pepper noise and with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 3.7 Input images f δ with gaussian noise of deviation σ. . . . . . . . . . . . . . . . . . . . . . . 87 3.8 Masks and reconstructions from image without noise and with 10% of total pixels saved. . 87 3.9 Masks and reconstructions from image with gaussian noise of deviation σ = 0.03 and with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 3.10 Masks and reconstructions from image with gaussian noise of deviation σ = 0.1 and with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 3.11 Domain decomposition using the Schwarz's method. . . . . . . . . . . . . . . . . . . . . . 90 3.12 Time of the different steps of encoding/decoding of intra frame on CPU and GPU. . . . . 92 4.1 Input images and ground truth with constant luminosity assumption [10]. . . . . . . . . . 106 4.2 Reconstruction x by applying optical flow u and luminosity variations m on f 2 and its error.107 4.3 Reconstruction x by applying classical optical flow u and luminosity variations m on f 2 and its error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 4.4 Reconstruction x by applying optical flow u and luminosity variations m on f 2 and its error for video of fluid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 5.1 Codec structure from [8]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 5.2 Number of bytes needed to store the inpainting mask versus the pixel density in the inpainting mask H1-T, H1-H and RAND for different symbol encoders. . . . . . . . . . . 114 5.3 Comparison of MSEs as a function of compressed file size for intra frames. . . . . . . . . . 115 5.4 Comparison of MSEs as a function of frame number for inter frames. . . . . . . . . . . . . 116 5.5 Comparison of the MSE error for our codec, Motion JPEG2000 and MPEG-4 Part 2. . . 117 5.6 Number of bytes needed to store the inpainting mask compared to the pixel density of the inpainting mask H1-T, H1-H and RAND for different symbol coders. . . . . . . . . . . . . 120 5.7 MSE of the reconstruction with respect to the final compressed file size for various PDEbased compression methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.8 Predictions of inter frames by optical flow for videos, from left to right, akiyo_cif.y4m, waterfall_cif.y4m and hall_monitor_cif.y4m. . . . . . . . . . . . . . . . . . . . . . . . . . Drawing of I 2 \ K n with n := k 2 , for k = 1, 2, 3. . . . . . . . . . . . . . . . . . . . . . . . . 144 List of Tables 1.1 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 L 2 -error between the original image f and the reconstruction u with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 L 2 -error between the original image f and the reconstruction u with 15% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 9% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Using u N as a denoised version of the input image. . . . . . . . . . . . . . . . . . . . . . . 2.4 L 2 -error between the original image f and the reconstruction u (build from f δ and with the new model) with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . 3.1 L 1 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 L 1 -error between the original image f and the reconstruction u (build from f δ ) with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 L 1 -error between the original image f and the reconstruction u (build from f δ ) with 15% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 L 2 -error between the original image f and the reconstruction u (build from f δ ) with 15% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Computation time in seconds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

  État-de-l'art de la compression vidéo . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Le codage par transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Le codage prédictif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Le codage par quantification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Le codage par interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Le codage symbolique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Historique des codecs existants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Limites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Organisation de la thèse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Description détaillée du contenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Compression d'image par "inpainting" . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Estimation avec prise en compte de la variation de la luminosité . . . . . . . . . . . . 15

Figure 1 :

 1 Figure 1: Classification non-exhaustive des techniques de compression vidéo.

Figure 2 :

 2 Figure 2: Les 64 images de base pour le standard JPEG.

  (a) Image originale. (b) JPEG. (c) JPEG2000. (d) WEBP.

Figure 3 :

 3 Figure 3: Apparition d'artefacts visuels lors de forts taux de compression.

  (a) Première image. (b) Deuxième image. (c) Vecteur de déplacement réel [10]. (d) BMA-32. (e) Reconstruction. (f) Artefacts visuels. (g) BMA-16. (h) Reconstruction. (i) Artefacts visuels.

Figure 4 :

 4 Figure 4: Apparition d'artefacts visuels dans le vecteur de mouvement avec les BMA.

Figure 5 :

 5 Figure 5: Comparaison des méthodes de compression par décomposition avec celles par inpainting [147].

  (a) Vecteur de mouvement réel[START_REF] Baker | A Database and Evaluation Methodology for Optical Flow[END_REF].(b) Vecteur de mouvement[START_REF] Gilliocq-Hirtz | Techniques variationnelles et calcul parallèle en imagerie : Estimation du flot optique avec luminosité variable en petits et larges déplacements[END_REF].(c) Reconstruction.

Figure 6 :

 6 Figure 6: Vecteur de mouvements par flot optique.

  ∂u ∂n = 0, sur ∂D. Cette fois, G va de R d×d dans R d×d . Si M ∈ R d×d est diagonalisable, on pose G(M ) := diag g(λ i (M ) avec g de Charbonnier comme dans l'exemple 2 et λ i les valeurs propres de M comptées avec multiplicité. Puisque ∇u σ ∇u T σ est symétrique, elle est diagonalisable d'après le théorème spectral. Une illustration de cet inpainting est donnée dans la figure 7 (d).

  (a) image d'entrée. (b) Diffusion homogène. (c) Charbonnier régularisé. (d) Edge-enhancing diffusion.

Figure 7 : 4 if 8 FusionnerFigure 8 :

 7488 Figure 7: Illustration de quelques méthodes d'inpainting tirée de[START_REF] Schmaltz | Understanding, Optimising, and Extending Data Compression with Anisotropic Diffusion[END_REF]

  (a) Masque B-Tree (10%). (b) Reconstruction. (c) Masque B-Tree (5%). (d) Reconstruction.

Figure 9 :

 9 Figure 9: Compression B-Tree avec l'inpainting de diffusion homogène.

  (a)-(b)), et la seconde, où la densité des pixels gardés augmente avec |∆f | (figure 10 (c)-(d)).

  Reconstruction avec (a). (c) Masque "fat pixels". (d) Reconstruction avec (c).

Figure 10 :

 10 Figure 10: Masque et reconstruction avec les méthodes proposées dans [15] (10% des pixels dans le masque).

1 K 5 6

 156 ← D; 2 while |K| > d |D| do 3 Choisir aléatoirement p |K| indices de pixels de K dans un ensemble T ; 4 Mettre à jour K ← {x i ∈ K | i / ∈ T }; Calculer la reconstruction par inpainting u à partir du masque K et de f ; Calculer l'erreur e := |u -f |;7

3 4 for i ∈ A do 5 6 7 end 8

 45678 Choisir aléatoirement un ensemble A ⊂ {1, •, M N }, de taille α, d'indices de pixels absent de K; Créer un masque temporaire K i = K ∪ {x i } identique à K mais avec le pixel x i ∈ D \ K en plus;Calculer la reconstruction par inpainting u i à partir du masque K i et de f ;Mettre à jour K := argmin K i Erreur(u i , f );9 end Algorithm 4: Algorithme de densification.Dans la figure11, on propose une illustration de ces méthodes dites probabilistes. Pour l'algorithme de densification, on utilise une version modifiée où on ajoute plusieurs pixels à chaque itération plutôt qu'un seul (voir chapitre 2).

  (a) Masque par sparsification (sans nonlocal pixel exchange). (b) Reconstruction avec (a). (c) Masque par densification. (d) Reconstruction avec (c).

Figure 11 :

 11 Figure 11: Compression par algorithmes probabilistes avec l'inpainting de diffusion homogène. (10% des pixels dans le masque).

  (a) Masque "fat pixels" [15]. (b) Différences finies. (c) Maillage. (d) Éléments finis P 1 .

Figure 12 :

 12 Figure 12: Masque, maillage et reconstruction avec les méthodes proposées dans [15] et [43] (10% des pixels dans le masque).

3 Maillage adaptatif T n+1 ; 4 Calcul de α n+1 ; 5 5 :

 3455 Calcul de u n+1 avec la méthode globale-locale;6 end 7 u ← u N ;Algorithm Méthodes adaptatives pour le flot optique.

  (a) Première image f 1. (b) Deuxième image f 2. (c) Flot optique réel [10]. (d) Méthode locale ρ = 10. (e) Méthode globale α = 1. (f) Méthode globale-locale α = 1 et ρ = 2. (g) Rapprochement itératif. (h) Coarse-to-fine. (i) Contrôle adaptatif de α.

Figure 13 :

 13 Figure 13: Quelques résultats numériques pour le flot optique avec luminosité constante.

( a )

 a Optical flow u. (b) Variations mt. (c) Reconstruction x.

Figure 14 :

 14 Figure 14: Flot optique avec variation de la luminosité (ρ = 0.4, α = 0.1 et λ = 0.5).

  Published : Communications in Nonlinear Science and Numerical Simulation, 109 (2022), p. 106278. Contents 1.1 The Continuous Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1.1.1 Min-max Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1.1.2 Analysis of the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.2 Topological Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 1.3 Optimal Distribution of Pixels : The "Fat Pixels" Approach . . . . . . . . 34 1.4 Numerical Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 1.4.1 Numerical Simulations and Comparisons . . . . . . . . . . . . . . . . . . . . . . 36 1.4.2 Comparison with B-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 1.4.3 Improving the Selection Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . 41 1.4.4 Impulse Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 1.4.5 Colored Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Dgv

  dx, where µ = µ a dx + ν is the Radon-Nikodym-Lebesgue decomposition of µ ([62], Theorem 3.8) with respect to the Lebesgue measure and θ(m) := inf Kn∈Am,n lim inf n→+∞ n Kn dx, v Kn := u Kn -f , u Kn solution of Problem 1.0.3.

  (a) Input image. (b) σ = 0.03, ∥f -f δ ∥ 2 = 7.65.(c) σ = 0.05, ∥f -f δ ∥ 2 = 12.81.(d) σ = 0.1, ∥f -f δ ∥ 2 = 25.45.

Figure 1 . 1 :

 11 Figure 1.1: Input images with and without gaussian noise of standard deviation σ.

  (a) Mask with L2-T method. (b) Reconstruction with L2-T method. (c) Mask with L2-H method. (d) Reconstruction with L2-H method.

  (a) Mask with L2-T method. (b) Reconstruction with L2-T method. (c) Mask with L2-H method. (d) Reconstruction with L2-H method.

Figure 1 . 3 :

 13 Figure 1.3: Masks and reconstructions for Table1.2 when the input image is affected by gaussian noise (σ = 0.03).

  (a) Mask with L2-T method. (b) Reconstruction with L2-T method. (c) Mask with L2-H method. (d) Reconstruction with L2-H method.

  (a) Input image. (b) σ = 0.03, ∥f -f δ ∥ 2 = 2.70.(c) σ = 0.05, ∥f -f δ ∥ 2 = 4.55.(d) σ = 0.1, ∥f -f δ ∥ 2 = 9.17.

Figure 1 . 5 :

 15 Figure 1.5: Input images with and without gaussian noise of standard deviation σ.

Figure 1 . 6 :

 16 Figure 1.6: Masks and reconstructions for Table 1.4.

  (a) σ = 0. (b) f . (c) Mask with f . (d) Reconstruction with f .

Figure 1 . 7 :

 17 Figure 1.7: With L2-H β = 0.18, ∥f -u∥ 2 = 4.78.

  (a) σ = 0.05. (b) f . (c) Mask with f . (d) Reconstruction with f .

Figure 1 . 8 :

 18 Figure 1.8: With L2-T β = 0.00005, ∥f -u∥ 2 = 13.91.

  (a) σ = 0.05. (b) f . (c) Mask with f . (d) Reconstruction with f .

Figure 1 . 9 :

 19 Figure 1.9: With L2-H β = 0.0009, ∥f -u∥ 2 = 12.57.

  (a) σ = 0.05. (b) f . (c) Mask with f . (d) Reconstruction with f .

Figure 1 .

 1 Figure 1.10: With L2-H β = 1.2, ∥f -u∥ 2 = 7.77.

  (a) Original image with 2% of salt and pepper noise. (b) L2-H mask. (c) Reconstruction. (d) L 1 -error minimizer.

Figure 1 . 11 :

 111 Figure 1.11: Image reconstruction with 10% of total pixels saved and 2% of salt and pepper noise applied to the input image.

  (a) Original image with 1% of salt noise. (b) L2-H mask. (c) Reconstruction. (d) L 1 -error minimizer.

Figure 1 . 12 :

 112 Figure 1.12: Image reconstruction with 10% of total pixels saved and 1% of salt noise applied to the input image.

  (a) Original image with 1% of pepper noise. (b) L2-H mask. (c) Reconstruction. (d) L 1 -error minimizer.

Figure 1 . 13 :

 113 Figure 1.13: Image reconstruction with 10% of total pixels saved and 1% of pepper noise applied to the input image.

  (a) Original image. (b) Red channel to grayscale. (c) Green channel to grayscale.(d) Blue channel to grayscale.

Figure 1 . 14 :

 114 Figure 1.14: Reconstructions for colored images.

  (a) Mask L2-T. (b) Reconstruction L2-T. (c) Mask L2-H. (d) Reconstruction L2-H.

Figure 1 . 15 :

 115 Figure 1.15: Reconstructions for colored images.

Chapter 2 Iterative 2 . 1 60 2. 6 63 2. 7

 221606637 Approach to Image Compression with Noise : Optimizing Spatial and Tonal Data Submitted Contents Review of the Continuous Model . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.1.1 Min-max Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.1.2 Analysis of the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.1.3 Topological Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.1.4 Optimal Distribution of Pixels : The "Fat Pixels" Approach . . . . . . . . . . . 52 2.2 The Iterative Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.2.1 L2-INSTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.2.2 L2-DEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 2.2.3 L2-INC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 2.3 Numerical Comparison of the Iterative Methods . . . . . . . . . . . . . . . 55 2.3.1 Image Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.3.2 Image Denoising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 2.4 Numerical Comparison with the "Probabilistic" Methods . . . . . . . . . . 57 2.5 Inpainting Masks and Reconstructions for Compression from Section 2.3 Reconstructions for Image Denoising from Section 2.3 . . . . . . . . . . . . Inpainting Masks and Reconstructions for the new model from Section 2.4 64

: 4

 4 Original (noisy) image f , parameter (time-step) α > 0, desired pixel density c ∈ (0, 1), number of iterations N ∈ N * . Result: Inpainting mask K ⊂ D, last encoding reconstruction u N . 1 u 0 ← f ; 2 for n in {0, . . . , N -1} do 3 Save in K the c |D| pixel by using the hard/soft-thresholding criterium i.e. |u n -f + α∆f |; Compute u n+1 , solution of Problem 2.0.1; 5 end Algorithm 6: L2-INSTA.

6 7 n

 7 Compute u n+1 , solution of Problem 2.0.1; ← n + 1; 8 end Algorithm 8: L2-INC.

  (a) Homogeneous part with L2-INC-T method. (b) Zoom. (c) Homogeneous part with L2-STA-H method. (d) Zoom. (e) Edges with L2-INC-T method.

Figure 2 . 1 :

 21 Figure 2.1: Zoom on homogeneous parts and edges.

( a )

 a Mask with H1-T method. (b) Reconstruction with H1-T method. (c) Mask with H1-H method. (d) Reconstruction with H1-H method. (e) Mask with L2-INSTA-T method. (f) Reconstruction with L2-INSTA-T method. (g) Mask with L2-INSTA-H method. (h) Reconstruction with L2-INSTA-H method. (i) Mask with L2-INC-T method. (j) Reconstruction with L2-INC-T method. (k) Mask with L2-INC-H method.(l) Reconstruction with L2-INC-H method.

Figure 2 . 3 :

 23 Figure 2.3: Masks and reconstructions for Table2.2 when the input image is affected by gaussian noise (σ = 0.03).

( a )

 a Mask with H1-T method. (b) Reconstruction with H1-T method. (c) Mask with H1-H method. (d) Reconstruction with H1-H method. (e) Mask with L2-INSTA-T method. (f) Reconstruction with L2-INSTA-T method. (g) Mask with L2-INSTA-H method. (h) Reconstruction with L2-INSTA-H method. (i) Mask with L2-INC-T method. (j) Reconstruction with L2-INC-T method. (k) Mask with L2-INC-H method.(l) Reconstruction with L2-INC-H method.

Figure 2 . 4 :

 24 Figure 2.4: Masks and reconstructions for Table2.2 when the input image is affected by gaussian noise (σ = 0.05).

  Image Denoising from Section 2.3 (a) L2-INSTA-T (σ = 0.03). (b) L2-INSTA-T (σ = 0.05). (c) L2-INSTA-T (σ = 0.1). (d) L2-INSTA-T (σ = 0.2). (e) L2-INSTA-H (σ = 0.03). (f) L2-INSTA-H (σ = 0.05). (g) L2-INSTA-H (σ = 0.1). (h) L2-INSTA-H (σ = 0.2).(i) L2-INC-T (σ = 0.03). (j) L2-INC-T (σ = 0.05). (k) L2-INC-T (σ = 0.1). (l) L2-INC-T (σ = 0.2). (m) L2-INC-H (σ = 0.03). (n) L2-INC-H (σ = 0.05). (o) L2-INC-H (σ = 0.1). (p) L2-INC-H (σ = 0.2).

Figure 2 . 5 :

 25 Figure 2.5: u N as a denoised version of the input image for multiple levels of noise.

2. 7

 7 Inpainting Masks and Reconstructions for the new model from Section 2.4 (a) Input (σ = 0). (b) Input (σ = 0.03). (c) Input (σ = 0.05). (d) Input (σ = 0.1). (e) DENS. (f) DENS. (g) DENS. (h) DENS. (i) SPAR. (j) SPAR. (k) SPAR. (l) SPAR.

Figure 2 . 6 :

 26 Figure 2.6: Reconstruction with the sparsification and densification methods with 10% of total pixels saved.

  (a) Input (σ = 0). (b) Input (σ = 0.03). (c) Input (σ = 0.05). (d) Input (σ = 0.1). (e) Mask. (f) Mask. (g) Mask. (h) Mask. (i) Data u N . (j) Data u N . (k) Data u N . (l) Data u N .

Figure 2 . 7 :

 27 Figure 2.7: Reconstruction with L2-INC-T-E method with 10% of total pixels saved.

  b) After splitting.

Figure 3 . 1 :

 31 Figure 3.1: Illustration of the splitting.

  (a) Without noise. (b) With 2% of salt noise. (c) With 2% of pepper noise. (d) With 2% of salt and pepper noise.

Figure 3 . 2 :

 32 Figure 3.2: Input images.

( a )

 a Without noise. (b) σ = 0.03. (c) σ = 0.05. (d) σ = 0.1.

Figure 3 . 7 :

 37 Figure 3.7: Input images f δ with gaussian noise of deviation σ.

  (a) Mask L2-ADJ-T. (b) Reconstruction with L2-ADJ-T. (c) Mask L2-ADJ-H. (d) Reconstruction with L2-ADJ-H. (e) Mask H1-T. (f) Reconstruction with H1-T. (g) Mask H1-H. (h) Reconstruction with H1-H.

Figure 3 . 8 :

 38 Figure 3.8: Masks and reconstructions from image without noise and with 10% of total pixels saved.

Figure 3 . 9 :

 39 Figure 3.9: Masks and reconstructions from image with gaussian noise of deviation σ = 0.03 and with 10% of total pixels saved.

  (a) Mask L2-ADJ-T. (b) Reconstruction with L2-ADJ-T. (c) Mask L2-ADJ-H. (d) Reconstruction with L2-ADJ-H. (e) Mask H1-T. (f) Reconstruction with H1-T. (g) Mask H1-H. (h) Reconstruction with H1-H.

Figure 3 . 10 :

 310 Figure 3.10: Masks and reconstructions from image with gaussian noise of deviation σ = 0.1 and with 10% of total pixels saved.

  Miscellaneous: A GPU Implementation of PDE-based Image Compression Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Domain Decomposition : The Schwarz's Method . . . . . . . . . . . . . . . . . . 90 GPU Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Dithering Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Numerical Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Figure 3 . 11 :

 311 Figure 3.11: Domain decomposition using the Schwarz's method.

Figure 3 . 12 :

 312 Figure 3.12: Time of the different steps of encoding/decoding of intra frame on CPU and GPU.

ContentsFundamental

  Constraint of the Optical Flow with Constant Luminosity . . . . 95 Variational Formulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Optic Flow Formulation with Luminosity Variations . . . . . . . . . . . . . . . . 97

  and d F dt = 0, which yields in [0, 1] × D, Thus, back to f , we get the conservative transport equation in [0, 1] × D, ∂ t f + div (f u) = 0. (4.5)

1 0 1 0

 11 d → R d and m : R d → R, u(x) := χ(1, x) -χ(0, x) = χ(s, x) ds = u(s, χ(s, x)) ds, and m(x) := -div u(x).

  Since the continuity equation aims to model fluid motions, we propose in Figure4.4 an illustration on a video of water falling down from a sink.

  (a) First image f 1 . (b) First image f 1 . (c) First image f 1 . (d) Second image f 2 . (e) Second image f 2 . (f) Second image f 2 . (j) Error |x -f 2 |. (k) Error |x -f 2 |. (l) Error |x -f 2 |.

Figure 4 . 2 :

 42 Figure 4.2: Reconstruction x by applying optical flow u and luminosity variations m on f 2 and its error.

( a )

 a Reconstruction x. (b) Reconstruction x. (c) Reconstruction x. (d) Optic flow u. (e) Optic flow u. (f) Optic flow u. (g) Luminosity variations m. (h) Luminosity variations m. (i) Luminosity variations m.

( j )

 j Error |x -f 2 |. (k) Error |x -f 2 |. (l) Error |x -f 2 |.

Figure 4 . 3 :

 43 Figure 4.3: Reconstruction x by applying classical optical flow u and luminosity variations m on f 2 and its error.

( a )

 a First image f 1 . (b) Second image f 2 . (c) Reconstruction x. (d) Optic flow u. (e) Luminosity variations m. (f) Error |x -f 2 |.

Figure 4 . 4 :

 44 Figure 4.4: Reconstruction x by applying optical flow u and luminosity variations m on f 2 and its error for video of fluid.

Figure 5 . 1 :

 51 Figure 5.1: Codec structure from [8].

Figure 5 . 2 :

 52 Figure 5.2: Number of bytes needed to store the inpainting mask versus the pixel density in the inpainting mask H1-T, H1-H and RAND for different symbol encoders.

Figure 5 . 3 :

 53 Figure 5.3: Comparison of MSEs as a function of compressed file size for intra frames.

Figure 5 . 4 :

 54 Figure 5.4: Comparison of MSEs as a function of frame number for inter frames.

  (a) 500Ko. (b) 2.5M o. (c) 1.5M o.

Figure 5 . 5 :

 55 Figure 5.5: Comparison of the MSE error for our codec, Motion JPEG2000 and MPEG-4 Part 2.

Figure 5 . 6 :

 56 Figure 5.6: Number of bytes needed to store the inpainting mask compared to the pixel density of the inpainting mask H1-T, H1-H and RAND for different symbol coders.

Figure 5 . 7 :

 57 Figure 5.7: MSE of the reconstruction with respect to the final compressed file size for various PDE-based compression methods.

  (m) Coarse-to-fine.(n) Coarse-to-fine.(o) Coarse-to-fine.

Figure 5 . 8 :

 58 Figure 5.8: Predictions of inter frames by optical flow for videos, from left to right, akiyo_cif.y4m, waterfall_cif.y4m and hall_monitor_cif.y4m.

F

  µn (u n φ) ≥ F µ (uφ) n φ)| 2 dx + D (u n φ -f ) 2 dµ n ≥ α D |∇(uφ)| 2 dx + D (uφ -f ) 2 dµ. it follows that, lim inf n→+∞ α D |φ∇u n | 2 dx + α D |u n ∇φ| 2 dx + 2α D u n φ∇u n • ∇φ dx + D (u n φ -f ) 2 dµ n ≥ α D |φ∇u| 2 dx + α D |u∇φ| 2 dx + 2α D uφ∇u • ∇φ dx + D (uφ -f ) 2 dµ. Thus lim inf n→+∞ α D |φ∇u n | 2 dx + D (u n φ -f ) 2 dµ n ≥ α D |φ∇u| 2 dx + D (uφ -f ) 2 dµ.We have used 0 ≤ φ ≤ 1, andhave taken the sup over φ,lim inf n→+∞ α D |∇u n | 2 dx + D (u n -f ) 2 dµ n ≥ sup φ α D |φ∇u| 2 dx + D (uφ -f ) 2 dµ . Since µ is equals to 0 in D \ D -δ , we have lim inf n→+∞ α D |∇u n | 2 dx + D (u n -f ) 2 dµ n ≥ sup φ α D |∇u| 2 φ 2 dx + D (u -f ) 2 dµ.

  e. |u| ≤ |f | ∞ , and let ũ denotes its extension to H 1 0 (D δ ), where D δ is the dilatation by a factor δ > 0 of D. By the locality property of the γ-convergence, Proposition C.5.5 in Appendix C, we have that µ n γ(G)-converges to µ in D δ , where G isG µ (u) = α D |∇u| 2 dx + εα D δ \D |∇u| 2 dx + D (u -f ) 2 dµ, for ε > 0. Hence, there exists a sequence (u ε n ) n of H 1 0 (D δ ) such that u ε n converges to ũ in L 2 (D δ ) and G µ (ũ) ≥ lim sup n→+∞ G µn (u ε n ) i.e. n -f ) 2 dµ n .

D

  n -f ) 2 dµ n . Setting u n := u εn n | D ∈ H 1 (D), we get (since u = ũ| D ), α D |∇u| 2 dx + D (u -f ) 2 dµ ≥ lim sup n→+∞ α |∇u n | 2 dx + D (u n -f ) 2 dµ n . Proof of Theorem 1.1.4. Let (K n ) n ⊂ K δ (D) be a maximizing sequence of E(∞ K ) -β cap ν (∞ K ) i.e. lim n→+∞ E(∞ Kn ) -β cap ν (∞ Kn ) = sup K∈K δ (D) E(∞ K ) -β cap ν (∞ K ) .

F

  ∞ Kn (u) =: lim n→+∞ E(∞ Kn ).In addition, by Theorem 1.1.3 in Chapter 1 and the uniqueness of the limit, we havelim n→+∞ E(∞ Kn ) -β cap ν (∞ Kn ) = G(µ lim ) = E(µ lim ) -β cap ν (µ lim ).Finally, we havesup K∈K δ (D) E(∞ K ) -β cap ν (∞ K ) = lim n→+∞ E(∞ Kn ) -β cap ν (∞ Kn ) = E(µ lim ) -β cap ν (µ lim ) = max µ∈M δ 0 (D) E(µ) -β cap ν (µ) .By setting y = εỹ + x 0 and x = εx + x 0 , we haveB(x0,ε) B(x0,ε) ln |x -y| dx dy = ε 2 B(0,1) B(0,1)ln(ε|x -ỹ|) dx dỹ = π 2 ε 2 ln ε + O(ε 2 ).

Proposition A. 2 . 5 .G 0 L

 250 When ε tends to 0, we have, (x, y) dx dy = O(ε 2 ).Proof. We setI 0 := B(x0,ε) g(y) B(x0,ε) G 0 (x, y) dx dy.Using Taylor's formula on g around x 0 ,I 0 = g(x 0 ) B(x0,ε) B(x0,ε) G 0 (x, y) dx dy + O(1) B(x0,ε) ∥y -x 0 ∥ B(x0,ε) G 0 (x, y) dx dy ≤ g(x 0 )πε 2 B(x0,ε) ∥G 0 (•, y)∥ L ∞ B(x0,ε) dy + O(ε 2 ) B(x0,ε) ∥y -x 0 ∥∥G 0 (•, y)∥ L ∞ B(x0,ε) dy.Since G 0 satisfies the maximum principle[START_REF] Evans | Partial Differential Equations: Second Edition[END_REF],I 0 ≤ g(x 0 )πε 2 B(x0,ε) ∥G 0 (•, y)∥ L ∞ ∂B(x0,ε) dy + O(ε 2 ) B(x0,ε) ∥y -x 0 ∥∥G 0 (•, y)∥ L ∞ ∂B(x0,ε) dy = g(x 0 )πε 2 B(x0,ε) ∥G p (•, y)∥ L ∞ ∂B(x0,ε) dy + O(ε 2 ) B(x0,ε) ∥y -x 0 ∥∥G p (•, y)∥ L ∞ ∂B(x0,ε) ∞ ∂B(x0,ε) dy + O(ε 2 ) B(x0,ε) ∥y -x 0 ∥ K 0 1 √ α | • -y| L ∞ ∂B(x0,ε)

K 0 2 ε 4 4 ε 4

 02444 (z) = -ln z + ln 2 -γ + O(z 2 | ln z|),and get, since ε tends to 0, γ + O(ε 2 | ln ε|).Therefore,I 0 ≤ -g(x 0 ) π ln ε + g(x 0 ) π ln α -g(x 0 ) π 2 ε 4 γ + O(ε 5 ln ε) = O(ε 2 ).

Lemma A. 3 . 1 .

 31 We have∥v K ∥ L 2 (D) ≤ 1 + αC(D) -1 ∥g∥ L 2 (D)and∥v K ∥ L 1 (D) ≤ |D| 1/2 (1 + αC(D) -1 ∥g∥ L 2 (D) .

(a) I 2 9 Figure A. 1 : 1 θ- 1 α 1 2α.=: 1 2α ln t 1 =:Lemma A. 3 . 3 . 2 ≤ H 1 ( 2 1 m ∂n 2 dH 1 . 1 m ∂n 2 dH 1 .

 2911111133212121121 Figure A.1: Drawing of I 2 \ K n with n := k 2 , for k = 1, 2, 3. Let us denote v 1 Kn the solution of Problem 1.0.4 with g = 1, K = K n and D = I 2 . It holds I v 1 K1 dx = n I v 1 Kn dx. We recall

1 .

 1 For y in R 2 \ B 1 , we have v ω (y) = ∂B1 E(y -x)p(x) dσ(x),

Proposition B. 3 . 2 .

 32 For |y| large enough, it exists C 1 and C 2 , only dependant on α, such that, |v ω (y)| ≤ C 1 |y| -1/2 e -|y|/ √ α ∥ϕ∥ 1/2,∂B1 , |∇v ω (y)| ≤ C 2 |y| -1/2 e -|y|/ √ α ∥ϕ∥ 1/2,∂B1 .

2 ∂B1

 2 |ϕ(z)| 2 dσ(z).Let u = ϕ on ∂B 1 . Then, ∂B1 p(x)dσ(x)2 ≤ 2π K 0 (2α -1/2 ) 2 B1\B 1/2 |u(z)| 2 dz,this been true for every u, we take the sup,∂B1 p(x)dσ(x) 2 ≤ 2π K 0 (2α -1/2 ) 2 ∥ϕ∥ 2 1/2,∂B1 .With[START_REF] Oldham | An Atlas of Functions[END_REF], we have for z big enough,K 0 (z) = O(z -1/2 e -z ),thus, there exists C > 0, such that, for |y| large enough,|E(x -y)| ≤ C |x -y| -1/2 e -|x-y|/ √ α .Moreover, for |y| large enough,|x -y| -1/2 e -|x-y|/ √ α ≤ C|y| -1/2 e -|y|/ √ α , then, |E(x -y)| ≤ C ′ |y| -1/2 e -|y|/ √ α . Therefore |v ω (y)| ≤ C 1 |y| -1/2 e -|y|/ √ α ∥ϕ∥ 1/2,∂B1 .Next,∂ yi v ω (y) = ∂ yi ∂B1 E(y -x)p(x) dσ(x) = ∂B1 ∂ yi E(y -x)p(x) dσ(x),and∂ yi E(x -y) = 1 2π ∂ yi K 0 (α -1/2 |x -y|) = -1 2π α -1/2 |y -x| -1 K 1 (α -1/2 |y -x|) y i .Thus|∇v ω (y)| = 1 2π α -1/2 |y| ∂B1 |y -x| -1 K 1 (α -1/2 |y -x|) p(x) dσ(x) ,in the same way that before, for |y| big enough,[START_REF] Oldham | An Atlas of Functions[END_REF],|∇v ω (y)| ≤ C |y| -1/2 e -|y|/ √ α ∥ϕ∥ 1/2,∂B1 .From the above results, we derive easily :Proposition B.3.3. There exists C 1 , C 2 , C 3 , C 4 , C 5 and C 6 only dependant on α such that, for ε small enough,∥v ω ∥ 0,B R/ε \B1 ≤ C 1 ∥ϕ∥ 1/2,∂B1 , |v ω | 1,B R/ε \B1 ≤ C 2 ∥ϕ∥ 1/2,∂B1 , ∥v ω ∥ 1,B R/ε \B1 ≤ C 3 ∥ϕ∥ 1/2,∂B1 , ∥v ω ∥ 0,B R/ε \B R/(2ε) ≤ C 4 e -R/(2ε √ α) ∥ϕ∥ 1/2,∂B1 , |v ω | 1,B R/ε \B R/(2ε) ≤ C 5 e -R/(2ε √ α) ∥ϕ∥ 1/2,∂B1 , ∥v ω ∥ 1,B R/ε \B R/(2ε) ≤ C 6 e -R/(2ε √ α) ∥ϕ∥ 1/2,∂B1 .

  Therefore,v ε = v ωε (•/ε)| B R \Bε -w ε , where w ε is solution of      -α∆w ε + w ε = 0, in B R \ B ε , w ε = 0, on ∂B ε , w ε = v ωε (•/ε), on ∂B R .Using Proposition B.4.1 and Proposition B.3.3, for ε small enough, we have∥w ε ∥ 1,B R \Bε ≤ C e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 .It follows from scaling argument,∥v ε ∥ 0,B R \Bε ≤ ∥v ωε (•/ε)∥ 0,B R \Bε + ∥w ε ∥ 0,B R \Bε≤ C e -R/(2ε √ α) ∥ψ(ε •)∥ 1/2,∂B1 .

1

  Classification non-exhaustive des techniques de compression vidéo. . . . . . . . . . . . . . 2 Les 64 images de base pour le standard JPEG. . . . . . . . . . . . . . . . . . . . . . . . . 3 Apparition d'artefacts visuels lors de forts taux de compression. . . . . . . . . . . . . . . . 4 Apparition d'artefacts visuels dans le vecteur de mouvement avec les BMA. . . . . . . . . 5Comparaison des méthodes de compression par décomposition avec celles par inpainting[START_REF] Schmaltz | Beating the Quality of JPEG 2000 with Anisotropic Diffusion[END_REF].

6 Vecteur de mouvements par flot optique. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Illustration de quelques méthodes d'inpainting tirée de [146] . . . . . . . . . . . . . . . . . 8 Illustration du B-Tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Compression B-Tree avec l'inpainting de diffusion homogène. . . . . . . . . . . . . . . . . 10 Masque et reconstruction avec les méthodes proposées dans [15] (10% des pixels dans le masque). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Compression par algorithmes probabilistes avec l'inpainting de diffusion homogène. (10% des pixels dans le masque). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Masque, maillage et reconstruction avec les méthodes proposées dans

  . . 1.2 Masks and reconstructions for Table 1.2 when the input image is noiseless (σ = 0). . . . . 1.3 Masks and reconstructions for Table 1.2 when the input image is affected by gaussian noise Input images with and without gaussian noise of standard deviation σ. . . . . . . . . . . . 1.6 Masks and reconstructions for Table 1.

(σ = 0.03). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Masks and reconstructions for Table 1.2 when the input image is affected by gaussian noise (σ = 0.05). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5

Table 2

 2 N as a denoised version of the input image for multiple levels of noise. . . . . . . . . . . 63 2.6 Reconstruction with the sparsification and densification methods with 10% of total pixels saved. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 2.7 Reconstruction with L2-INC-T-E method with 10% of total pixels saved. . . . . . . . . . 65

	XI

.2 when the input image is affected by gaussian noise (σ = 0.03). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Masks and reconstructions for Table 2.2 when the input image is affected by gaussian noise (σ = 0.05). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  1 B-Tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Algorithme de sparsification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Algorithme de nonlocal pixel exchange. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Algorithme de densification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Méthodes adaptatives pour le flot optique. . . . . . . . . . . . . . . . . . . . . . . . . . . .

6 L2-INSTA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 L2-DEC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 L2-INC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  Ici, le nom "images de base" n'est pas choisi au hasard, car la famille (F u,v ) forme une base pour l'espace des fonctions allant de {0, . . . , 7} 2 dans R, et est de plus orthonormale (pour des C bien choisis) pour le produit scalaire,

	1)uπ 16	cos	(2j + 1)vπ 16	.
	⟨G, H⟩ :=
	0≤i,j≤7

  est un opérateur donné. Dans la suite, nous allons voir quelques exemples d'opérateurs pour l'inpainting. D'autres types d'opérateurs existent, comme par exemple le cas où A est un réseau de neurones[START_REF] Xie | Image Denoising and Inpainting with Deep Neural Networks[END_REF][START_REF] Pathak | Context Encoders: Feature Learning by Inpainting[END_REF], mais nous allons nous focaliser dans la suite sur les méthodes de reconstruction (interpolation) par EDPs. Example 1 (Diffusion homogène). On commence par donner l'exemple de la diffusion homogène[START_REF] Weickert | Linear Scale-Space has First been Proposed in Japan[END_REF], énoncé de la manière suivante :

	Problem 0.0.2. Trouver u dans H 1 (D) tel que,
	
	

 -∆u = 0, dans D \ K, u = f, dans K, ∂u ∂n = 0, sur ∂D. Cet interpolation est efficace pour reconstruire les zones homogènes de l'image, mais rend les arêtes floues. Une illustration en est donnée dans la figure 7 (b). On peut généraliser à d'autres opétareurs de diffusion par exemple le p-laplacien. Example 2 (Diffusion de Charbonnier). Introduit dans le cas des méthodes dites scale-space methods [129], cet opérateur corrige l'effet régularisant (floutage). Problem 0.0.3. Trouver u dans H 1 (D) tel que,    -div g(|∇u| 2 ) ∇u = 0, dans D \ K, u = f, dans K, ∂u ∂n = 0, sur ∂D, où g : R → R est une fonction, dite de diffusion, positive, décroissante et telle que g(0) = 1. Le but de g est de réduire la diffusion au niveau des arêtes. En effet, lorsque |∇u| est grand (proche des arêtes), g est faible, donc on diffuse peu. Au contraire, dans les zone homogènes, |∇u| est faible et donc g est proche de 1. Pour la diffusion de Charbonnier

:

  Image f , masque d'inpainting K, taille m de l'ensemble des candidats, nombre m de pixels echangés par itération. Result: Masque d'inpainting K. 1 Calculer la reconstruction par interpolation de u à partir du masque K et de f ; Enlever aléatoirement n ≤ |T | pixels de K et stocker ce nouveau masque dans K new ; Ajouter dans K new les n pixels x de T ayant les plus grandes erreurs e(x);Calculer la reconstruction par inpainting u new à partir du masque K new et de f ; En 2016, Peter et al proposèrent l'algorithme de densification[START_REF] Peter | Colour image compression with anisotropic diffusion[END_REF]. On commence par un masque vide et, pour chaque itération, on choisit aléatoirement α pixels qui n'appartiennent pas au masque. On ajoute ensuite l'unique pixel qui améliore le plus l'erreur de reconstruction globale par rapport à l'image. Data: Image f , nombre α de candidats, densité d souhaitée dans le masque. Result: Masque d'inpainting K. 1 K ← ∅; 2 while La densité de pixel dans le masque est inférieure à celle souhaitée i.e. |K| ≤ d |D| do

	2 for do
	3	Choisir aléatoirement m ≤ |K| pixels de D \ K dans un ensemble T ;
	4	Pour x dans T , calculer e(x) := |u(x) -f (x)|;
	7
	8	if Erreur(u, f ) > Erreur(u new , f ) then
	9	u ← u new ;
	10	K ← K new ;
	11	end
	12 end
		Algorithm 3: Algorithme de nonlocal pixel exchange.

5 6

  AméliorationsEn 2010, Bae et al ont proposé dans[START_REF] Bae | Partial Differential Equations for Interpolation and Compression of Surfaces[END_REF] l'interpolation swapping. Il s'agit d'une étape d'inpainting supplémentaire où le rôle des pixels connus et inconnus est échangé. C'est-à-dire qu'une fois que la

	reconstruction u f K est trouvée, on calcule u u f K D\K . Cela permet d'obtenir une reconstruction finale plus lisse.
	En 2012, Mainberger et al

  Le flot optique est un champ de vecteurs donnant le déplacement de l'intensité des pixels d'une image animée au cours du temps. Dans le cas d'une vidéo, lorsqu'on a pas de changement de scène, deux images successives sont visuellement très semblables et donc, le flot optique sera très homogène. C'est pour cela que, plutôt que de sauvegarder les deux images indépendamment, les auteurs de[START_REF] Adam | Denoising by Inpainting[END_REF] proposent de calculer le flot optique et de le sous-échantillonner. Cette dernière étape ne devrait pas avoir une grande influence sur la qualité de la reconstruction grâce à la régularité du flot optique.Dans cette partie, nous allons voir quelques méthodes classiques pour le calcul du flot optique.

	Contrainte fondamentale du flot optique en petits déplacements
	Considérons une séquence d'images successives dont l'intensité d'un pixel à la position x de D au moment
	t ≥ 0 est donnée par,
	f : D × [0, T ] → [0, 1], (x, t) → f (x, t).
	La contrainte fondamentale du flot optique est l'hypothèse principale pour l'estimation du flot optique.
	Nous allons voir uniquement le cas où l'on suppose que la luminosité reste constante au cours du temps.
	La luminosité constante se traduit par,
	f (x + δx, t + δt) = f (x, t).
	De plus, nous ne supposons que le cas des petits déplacements, c'est-à-dire que lorsque δx est petit. On
	passe aux coordonnées lagrangiennes. Puisqu'on est dans le cas de la luminosité constante, on suppose
	que l'intensité d'un point reste constante le long de sa trajectoire, c'est-à-dire que pour (x 0 , t 0 ), il existe
	une trajectoire t → (x(t), t), telle que (x(t 0 ), t 0 ) = (x 0 , t 0 ) et pour tout t > 0, f (x(t), t) = f (x 0 , t 0 ). En
	petits déplacements, il est raisonnable de supposer que f est dérivable, d'où en dérivant par rapport à t et
	en prenant t = t 0 , on a,
	∂ t f (x 0 , t 0 ) + ∂ t x(t 0 ) • ∇f (x 0 , t 0 ) = 0.
	En posant u(x 0 ) = ∂ t x(t 0 ), et puisque l'équation ci-dessus est vérifiée pour tout (x 0 , t 0 ), on obtient la
	contrainte fondamentale du flot optique,
	∇f (x, t) • u(x, t) + ∂ t f (x, t) = 0.
	Formulation variationnelle
	Utiliser uniquement la contrainte fondamentale du flot optique ne suffit pas à déterminer les composantes
	du flot optique u. Ce problème est appelé problème de l'ouverture (aperture problem) et on doit alors
	ajouter une deuxième contrainte.
	En 1981, Lucas et Kanade [108] proposent la méthode locale, qui cherche à minimiser u pour tout

  Image Inpainting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Compression by the B-Tree Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 24 Compression by Shape Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Compression by Probabilistic Algorithms . . . . . . . . . . . . . . . . . . . . . . . 25 Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Organization of this Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

	Image Compression by Inpainting:
	State-of-the-Art
	Contents
	Part I
	PDE-Inpainting based Image
	Compression

Table 1 .

 1 1: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved.

		L2-T	L2-H		B-tree	Rand
		∥f -u∥ 2 ∥f -u∥ 2	α		∥f -u∥ 2 ∥f -u∥ 2
	0	39.17	9.56	10000	9.88	15.02
	0.03	13.47	12.14	30		10.61	15.49
	0.05	17.10	15.12	70		11.80	16.13
	0.1	31.43	23.98	87		15.50	19.01
	0.2	75.48	41.92	68		24.87	27.64
	Noise	L2-T ∥f -u∥ 2 ∥f -u∥ 2 L2-H	α	B-tree ∥f -u∥ 2 ∥f -u∥ 2 Rand
	0	25.57	4.92	10000	6.44	10.94
	0.03	9.36	8.59	80		7.56	11.85
	0.05	13.91	12.66	62		9.57	13.14
	0.1	27.39	23.19	56		15.16	16.94
	0.2	61.46	43.29	51		26.73	27.89

Table 1 .

 1

	Noise	L2-T ∥f -u∥ 2 ∥f -u∥ 2 L2-H	α	B-tree ∥f -u∥ 2 ∥f -u∥ 2 Rand
	0	18.21	3.32	10000	4.55	9.03
	0.03	8.21	7.67	51		6.54	9.93
	0.05	13.05	12.07	15		8.91	11.35
	0.1	25.91	23.11	22		15.36	16.78
	0.2	54.66	43.34	12		28.20	28.77

2: L 2 -error between the original image f and the reconstruction u with 10% of total pixels saved.

Table 1 . 3

 13

: L 2 -error between the original image f and the reconstruction u with 15% of total pixels saved.

Table 1

 1 .4 and Figure 1.6.

	Noise	L2-H ∥f -u∥ 2 time (s)	α	B-tree ∥f -u∥ 2 time (s)
	0	9.36	0.37	10000	15.65	198.23
	0.03	12.19	0.38	19.59	16.16	33.92
	0.05	15.91	0.38	12.20	16.42	20.58
	0.1	23.26	0.39	16.57	17.80	13.71
	0.2	36.30	0.37	10.00	21.85	20.70

Table 1 .

 1

4: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 9% of total pixels saved.

  If we denote by u Kn the solution of Problem 2.0.1, it is straightforward to obtain

	Proposition 2.1.1. The optimization problem (2.3) is equivalent to
	max

Kn⊆D min u∈H 1 (D), u=f in Kn

Table 2 .

 2

		34.46	11.43	3131	29.39	6517	11.58	0.26 18.68	2.25 20.18
	0.03	15.84	14.21	7905	15.76	8765	13.37	0.26	8.46	0.42 21.24
	0.05	19.24	16.44	4341	18.82	6472	15.50	0.16 11.74 1.44 24.25
	0.1	30.91	23.78	4507	24.81	6192	21.52	0.06 23.27	1.43 27.22
	0.2	64.51	40.68	4717	40.24	6376	35.26	0.11 48.31	0.62 33.06

1: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved.

Table 2 .

 2

		22.99	6.02	3655	13.61	4815	6.78	0.31	6.36	1.03 14.64
	0.03	11.52	10.43	2315	13.69	2407	10.49	0.11	6.96	0.42 17.50
	0.05	15.42	13.77	3131	14.50	3909	12.64	0.11 10.94 0.83 20.89
	0.1	27.51	23.09	2143	22.17	5060	20.34	0.11 20.72	0.83 23.56
	0.2	55.09	42.44	3007	35.60	4987	35.99	0.11 39.14	0.83 31.87

2: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 10% of total pixels saved.

Table 2 . 3

 23

	03	7.65	0.9	4.61	44	5.28	38	4.92	4.82	4.44
	0.05	12.81	1.2	6.16	58	8.54	55	7.58	7.60	6.60
	0.1	25.45	2.0	8.98	59	16.60	102	14.06	14.67	12.50
	0.2	48.43	2.5 12.72	88	30.65	182	25.76	19.92	16.44

: Using u N as a denoised version of the input image.

Table 2 .

 2 .6 and Figure2.7 (Section 2.7) some illustration. 4: L 2 -error between the original image f and the reconstruction u (build from f δ and with the new model) with 10% of total pixels saved.

	Noise	SPAR DENS L 2 L 2	L2-INC-T α L 2
	0	3.68	8.70	0.01 15.54
	0.03	6.94	9.09	0.01	7.53
	0.05	11.11	9.82	0.01	7.98
	0.1	21.37	12.58	0.01 11.79

  Algorithm and Numerical Results . . . . . . . . . . . . . . . . . . . . . . . . 79 3.4 Numerical Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

	Chapter 3
	Adjoint Method in PDE-based Image
	Compression

Submitted Contents 3.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.2 Topological Derivative with Adjoint Method . . . . . . . . . . . . . . . . . . 69 3.2.1 The Adjoint Problem and Related Estimates . . . . . . . . . . . . . . . . . . . 73 3.2.2 Variations of the Bilinear Form . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 3.2.3 Variations of the Linear Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 3.2.4 Variations of the Cost Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 3.3 3.4.1 Salt and Pepper Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 3.4.2 Gaussian Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Table 3 .

 3 u∥ 1 1: L 1 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved.

	0%	0%	0.01	7275.29	3.62 1942.59	7158.91	2191.40
	2%	0%	2.67	4455.48	1.01 2027.84	10971.24	9858.13
	0%	2%	1.47	4221.39	0.96 1947.98	12634.73	10371.10
	1%	1%	0.46	3642.00	0.76 2310.18	13241.98	6209.26
	4%	0%	2.67	4897.72	0.56 2257.77	23308.90	20355.04
	0%	4%	1.61	4257.87	1.72 2104.91	30196.92	24784.78
	2%	2%	0.41	5046.38	0.71 3444.83	13241.98	12873.81
	10%	0%	3.02 10781.51	0.56 2858.35	29785.38	27466.28
	0%	10%	5.38	6554.43	0.56 2711.45	35098.63	32712.00
	5%	5%	0.36	7441.63	0.41 6122.45	35256.54	27239.32

Table 3 .

 3

	Noise	L1-ADJ-T	L1-ADJ-H	H1-T	H1-H
	Salt Pepper	α	∥f -u∥ 1	α	∥f -u∥ 1	∥f -u∥ 1	∥f -u∥ 1
	0%	0%	0.01	2040.62	1.16	768.31	1959.49	724.44
	2%	0%	0.46	1675.06	0.61 1061.28	2183.42	2217.10
	0%	2%	0.41	1634.08	0.71	951.80	2226.06	2343.02
	1%	1%	0.61	1776.52	0.61 1250.77	2197.38	2275.70
	4%	0%	0.41	2120.61	0.61 1213.07	4390.00	4564.17
	0%	4%	0.36	2295.56	0.71 1181.62	4932.04	4795.51
	2%	2%	0.51	2538.10	0.56 1967.47	4056.80	4001.66
	10%	0%	0.31	5383.94	0.56 1380.36	19617.41	16213.35
	0%	10%	0.36	3708.22	0.51 1517.28	25097.12	20114.90
	5%	5%	0.41	5395.05	0.51 4416.92	11131.58	10436.74

2: L 1 -error between the original image f and the reconstruction u (build from f δ ) with 10% of total pixels saved.

Table 3 . 3

 33

: L 1 -error between the original image f and the reconstruction u (build from f δ ) with 15% of total pixels saved.

Table 3 .

 3 4: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 5% of total pixels saved.

	u∥ 2

Table 3 .

 3 5: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 10% of total pixels saved.

	Noise	L2-ADJ-T	L2-ADJ-H	H1-T	H1-H
	σ	α	∥f -u∥ 2	α	∥f -u∥ 2	∥f -u∥ 2	∥f -u∥ 2
	0	0.01	11.62	0.01	6.58	11.26	3.96
	0.03	0.71	7.98	0.56	7.64	9.78	8.92
	0.05	0.51	12.81	0.66	12.28	14.18	12.92
	0.1	0.31	25.79	0.76	24.62	25.59	23.50
	0.2	0.01	50.94	1.11	47.25	50.59	42.90

Table 3 .

 3

6: L 2 -error between the original image f and the reconstruction u (build from f δ ) with 15% of total pixels saved.

Table 4 .

 4

			Optimal Transport
	1	196.35	6209.77
	2	193,55	3854.34
	3	209,29	5139.12

1: Computation time in seconds.

  1 =

							√ 2 , 2
		2π 2 α -1 2πα 2 (1 + 2π 2 α)	ln	t 1 m	-	t 1 -m α 2 ≤ θ(m)
	⇔	2π 2 α -1 2πα 2 (1 + 2π 2 α)	ln	t 1 m	-	t 1 α 2 ≤ θ(m)
	⇔	2π 2 α -1 2πα 2 (1 + 2π 2 α)	ln(m -1 ) -	2π 2 α -1 2πα 2 (1 + 2π 2 α)	ln(t -1 1 ) +	t 1 α 2
		=: C1(α)					=: C2(α)

À partir de 2000, la société On2 Technologies développa en parallèle aux standards MPEG-x/H.26x la famille de codec VPx, dont le premier fut le VP3, qui donnera naissance à Theora. Ce dernier utilisera en plus le sous-échantillonage chromatique (chroma subsampling). Cette technique se base sur le fait que la perception visuelle de l'homme est plus sensible à la variation de la luminosité plutôt qu'aux variations de couleurs. Ainsi, en décomposant une image de façon adéquat (YCbCr plutôt que RGB), on peut sous-échantillonner les canaux Cb et Cr.En 2003, le standard H.264/MPEG-4 AVC permit d'améliorer le temps de calcul lors du codage en utilisant notamment une méthode de transformée en cosinus discrète plus efficace. La même année, Motion JPEG2000 proposait un codage sans compensation de mouvements, c'est-à-dire que chaque frame d'une vidéo est encodée indépendamment des autres. Cela évite la propagation d'erreurs d'une frame à l'autre et permet un accès direct à une frame en particulier, au prix d'un taux de compression amoindri. Ce codec était principalement utilisé pour le cinéma.En 2008, VP8 utilisa la transformée de Hadamard (WHT). En 2013, la norme HEVC/H.265/MPEG-H Part 2, utilisa une segmentation en blocs de taille variable tandis que le VP9 introduisit la transformée en cosinus discrète asymétrique (ADST).En 2018, le codec AV1 proposa une utilisa une segmentation en blocs de taille variable plus poussée grâce à un partitionnement récursif de l'image.Enfin, en 2020, le H.266/VVC apporta principalement de nombreuses fonctionnalités comme un large choix de résolutions, le support des vidéos 360°ou encore le high dynamic range (HDR).LimitesComme on peut le remarquer dans l'historique de la section précédentes la familles de méthodes de compression (codec) pour la vidéo la plus populaire reste de nos jours la famille MPEG[START_REF] Chang | Overview of the MPEG-7 standard[END_REF]. Ces codecs reposent sur une combinaison de prédiction et de codage par transformation des images : les images dites intra frame composant une vidéo sont prédites sans aucune référence aux autres images, tandis que les images dites inter frame sont estimées à l'aide des images précédentes ou suivantes ainsi que d'un champ de mouvements entre elles.On peut interpréter le codage des intra frames par de la compression d'image. La plupart des méthodes de compression d'image avec perte consistent à décomposer une image (ou un morceau de celle-ci) comme une somme d'images "de base" et de négliger les images "de base" ayant un effet insignifiant sur la qualité

end

end Algorithm 1: B-Tree.

f (x + δx, t + δt) = M (x, t)f (x, t) + C(x, t).(1)Pour les petits déplacements et dans de nombreuses situations physiques, cette hypothèse est raisonnable et cohérente avec les lois de l'optique. De plus, on peut supposer que C(x, t) = 0 et que M (x, t) est proche de l'identité. On écrit alors M = I d + δm, avec I d la matrice identité de taille d et δm, une "petite" variation de la luminosité. Sous ces nouvelles hypothèses, l'équation (1) s'écrit,f (x + δx, t + δt) = I d + δm(x, t) f (x, t).En utilisant le développement de Taylor sur le terme de gauche, nous obtenons∇f • δx + ∂ t f δt -f δm + o(t) = 0.

Remerciements

 2.2 when the input image is noiseless (σ = 0).

We notice that we this expansion, we get the main theoretical result of the paper which might be summarized as follows: to minimize the L p -error between an image and its reconstruction by linear diffusion inpainting, we have to keep in the mask the points x 0 which the quantity v 0 (x 0 ) w 0 (x 0 ) that constitute a soft threshold criterion. The previous computations, does not used directly the L p -error, since it this one does not satisfy the right hypotheses (for p = 1). In the next section, we take specific values of p, depending on the nature of the noise we want to consider, and we use an approximation of the L p -error that fulfills the assumptions.

Numerical Results

In this section we present numerical results when the cost functional is the L 1 -error and then the L 2 -error. We denote by f the original image, f δ the noised version of f and by u the reconstruction from the inpainting mask K and f δ . We emphasis that the inpainting masks are built from f δ . In addition, we remind that, since we are doing compression of noised image, f δ is available in D during the encoding step and the data are only available in K during the decoding step. Therefore, f is equal to f δ in D in the inpainting Problem 3.1 during the coding phase, but it is equal to 0 in D \ K during the decoding step. We denote by Lp-ADJ-T the standard adjoint method by doing a hard-thresholding of -v 0 w 0 in order to construct K and by Lp-ADJ-H the soft-thresholding (or halftoning [START_REF] Ulichney | Digital Halftoning[END_REF][START_REF] Floyd | Adaptive algorithm for spatial greyscale[END_REF]) of -v 0 w 0 , in the same spirit as in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF][START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]. The minus in front of the criterion comes from the fact that we need to take the minimum of v 0 w 0 , despite thresholding keep the maximum. In this section we use the Floyd-Steinberg dithering [START_REF] Floyd | Adaptive algorithm for spatial greyscale[END_REF]. Finally, H1-T and H1-H correspond to the mask proposed in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], where we take the hard/soft-thresholding of |∆f δ |.

Salt and Pepper Noise

A common way to deal with impulse noise like salt and pepper noise, is to minimize the L 1 -error [START_REF] Nikolova | Minimizers of Cost-Functions Involving Nonsmooth Data-Fidelity Terms. Application to the Processing of Outliers[END_REF][START_REF]A Variational Approach to Remove Outliers and Impulse Noise[END_REF]. However, when p = 1 (and more generally, when p < 2), the L p -error do not satisfies (H1) and (H2). Instead, we use approximate the L 1 -norm, for ϵ > 0, by t → g(x, t) = t 2 + ϵ, which satisfies the hypotheses (H1), (H2) and (H3). We give in Table 3.1, Table 3.2 and Table 3.3 the L 1 -error for the methods described above and several amount of salt and/or pepper noise (we take ϵ = 0.0001). By design, the L1-ADJ-H give the lower L 1 -error. Moreover, we see that most of the corrupted pixels are not present in K for the L1-ADJ-methods while they are sectioned in the H1-ones. This is not surprising since impulse noises induce a high laplacian at the location of the corrupted pixels. On the other hand, the solution v 0 correspond to a blur of the laplacian of f , while w 0 is close to -| v 0 |. Formally, the criterion -v 0 w 0 is close to ∆f |∆f |. Moreover, in the L1-ADJ-masks, we can distinguish the edges of the image, while we can not with the H1-methods. Interestingly, the L1-ADJ-H method gives also better visual results than the H1-H method when the image does not contain noise.

In Figure 3

Gaussian Noise

Now, we consider images with gaussian noise. It is well-known that, a way to remove such a noise, is to minimize the L 2 -error and thus we take

We give in Table 3.4, Table 3.5 and Table 3.6 the L 2 -error for the methods L2-ADJ-T, L2-ADJ-H, H1-T and H1-H with respect to the deviation σ > 0 of gaussian noise. This time, v 0 is a denoised version of the laplacian of f and w 0 is a smooth version of -v 0 . Formally, the criterion -v 0 w 0 is close to |∆f | 2 which is similar to the result found in [START_REF] Belhachmi | Optimal interpolation data for PDE-based compression of images with noise[END_REF]. We see that for a reasonable level of noise, the

Abstract

In this chapter, we propose a new model for optical flow computation based on the fluid mechanics using the continuity equation and we make a parallel between the optical flow and optimal transportation problem thanks to the Benamou-Brenier theorem. This new model include brightness variation assumption without the need to suppose other assumptions in order to regularize the optical flow problem since the additional "unknown", namely the brightness variation, is in fact equals to the opposite of the divergence of the optical flow. This parallel between the optical flow and the continuity equation allows us to use the Benamou-Brenier algorithm and we present numerical results to confirm the pertinence of our proposed model.

keywords optical flow -motion estimation -brightness variation -PDEs -optimal transport -Benamou-Brenier formula Appendix A

Some Proofs for the Stationary Model Chapter 1

For the reader ease, some tools used in this appendix are recalled in Appendix C.

A.1 Proofs for the Analysis of the Model

In this appendix are some of the proofs of theorems used in Section 1.1.

to its capacitary measure. Thanks to the γ-compactness, we have

Conversely, let µ be in M δ 0 (D). We need to prove that µ is in cl γ K δ (D) i.e. µ is the γ-limit of elements of K δ (D). This is to be understood in the sense : there exist elements (K n ) n of K δ (D) such that, ∞ Kn γ-converge to µ. Since M 0 (D) is dense and M δ 0 (D) ⊂ M 0 (D), we obtain that there exists a sequence of subsets of D, (K n ) n , such that, ∞ Kn γ-converge to µ. We need to show that K n are in K δ (D). By the localization argument, we can choose

Proof of Theorem 1.1.3. This proof is similar to the one of Theorem 3.5 in [START_REF] Belhachmi | How to Choose Interpolation Data in Images[END_REF], we give it for the sake of completeness. Assume that

Asymptotic expansion used to compute the topological gradient

Let x 0 be in R 2 and ε > 0. In this section, we aim to find an estimate of

where w the solution of the problem below :

Without loss of generality, we assume that g is Lipschitz continuous. Although the following result might be known, we did not find it in the literature, therefore, for the sake of completeness, we derive the estimate we need in Chapter 1. To solve Problem A.2.1, we use Green functions G :

for y in B(x 0 , ε).

We have easily the following property, We shall determine explicitly the Green function G in the sequel. To do so, we write G as the sum of a particular solution G p of Problem A.2.2 without the boundary condition, and the general solution G 0 of the homogeneous version of Problem A.2.2 such that G 0 = -G p on ∂B(x 0 , ε). Below is the main proposition of this section, Proposition A.2.2. We have, for ε -→ 0,

Proof. For ε small enough, we have, using Proposition A. It remains to state and to prove Proposition A.2.4 and Proposition A.2.5. We start by giving an explicit expression for G p with the following proposition from [START_REF] Duffy | Green's functions with applications[END_REF].

Proposition A.2.3. For x and y in B(x 0 , ε) such that x ̸ = y, we have

where K 0 is the modified Bessel function of the second kind, see [START_REF] Oldham | An Atlas of Functions[END_REF].

Then, we compute the first part of Proposition A.2.2.

Proposition A.2.4. When ε tends to 0, we have,

B(x0,ε)

Proof. We begin by setting

G p (x, y) dx dy.

According to [START_REF] Oldham | An Atlas of Functions[END_REF], we have the following asymptotic development

for z → 0, where γ denotes the Euler-Mascheroni constant. Then,

for |x -y| → 0. Thus,

Using Taylor's formula, we have

Appendix B

Some Proofs for the Adjoint Method

B.1 Recall on Some Properties of the Sobolev Norms

In this section, we recall the definition of the norms and some of their properties used in the proofs. Let O be an open subset of R 2 . For v in H 1 (O), we recall the following Sobolev norms :

.

Now we set

Straightforward computations give :

On the boundary of a ball of radius r > 0, namely ∂B r , we define for ϕ in H 1/2 (∂B r ),

and for ψ in H -1/2 (∂B r ), we define the dual norm, ∥ψ∥ -1/2,∂Br := sup

Then, it is standard that

Appendix C

Some Tools Used in the Thesis

We will quickly present the tools for the analysis of shape optimization problems. Let Y and U be two spaces. We call Y the state space and U the control space. We give a cost function J : U × V → R. We will call the set of admissible pairs the set

The shape optimisation problem writes min (u,y)∈A

J(u, y).

The question is what conditions on J and on G, and which topologies must be chosen for U and Y in order to have the existence of at least one solution.

C.1 Topology for the State Space

For the state space Y , we will use the topology induced by the Γ-convergence [START_REF]An Introduction to Γ-Convergence[END_REF][START_REF] Braides | Γ-Convergence for Beginners[END_REF]. We start by defining this convergence:

• for all y in Y , there exists a sequence (y n ) n in Y such that y n → y in Y and F (y) ≥ lim sup n→+∞ F n (y n ),

• for any sequence

We write Γ -

Here are some properties of the Γ-convergence.

Proposition C.1.1.

• The Γ-limit of a sequence (F n ) n is lower semi-continuous,

• Let (F n ) be a sequence which Γ-converges to F and let G be a continuous functional, then

In the following, we need the definition of (equi)-coercivity.

Definition C.1.2. We say that the sequence of functions (F n ) is equi-coercive on Y if, for all t ∈ R, there exists a compact set K t ⊂ Y such that {F n ≤ t} ⊂ K t , for all n ∈ N.

Proposition C.1.2. A sequence of functionals (F n ) is equi-coercive on Y if and only if there exists ψ : Y → R lower semi-continuous and coercive such that F n ≥ ψ for all n ∈ N.

The Γ-convergence is much used in calculus of variations because it ensures the convergence of minimizers under certain conditions. More precisely, we have the following property:

) is an equi-coercive sequence that Γ-converges to F in Y , then F reaches its minimum and min y∈Y F (y) = lim n→+∞ inf y∈Y F n (y). Moreover, if the sequence (y n ) n , y n ∈ argmin Y F n , converges to y, then y ∈ argmin Y F .

We have then the following theorem, proved in [START_REF]An Introduction to Γ-Convergence[END_REF]

C.2 Topology for the Control Space

We will use the topology induced by the γ-convergence, defined as follows [START_REF] Maso | γ-convergence and µ-capacities[END_REF][START_REF] Buttazzo | Relaxed optimal control problems and applications to shape optimization[END_REF][START_REF] Bucur | Variational methods in shape optimization problems[END_REF] :

Note. The γ(G)-convergence is dependent on G, but when there is no ambiguity, we will simply talk about γ-convergence.

From now on, we assume that :

• G is equi-coercive, then (Proposition C.1.2) there exists ψ : Y → R l.s.c. and coercive such that

We then have the following proposition:

• Γ G is an isometry.

C.3 Compactness

We start with a compactness result for the state space.

Now, we can give examples of control spaces U that are compact for the topology induced by γ-convergence [START_REF] Bucur | Variational methods in shape optimization problems[END_REF].

Definition C.3.1. We define,

• A convex , the class of convex sets included in D,

• A unif cone , the part of the sets satisfying a uniform exterior cone property,

• A unif flat cone , the part of the sets satisfying the uniform flat cone condition.

We have the following inclusions:

Proposition C.3.3. The sets A convex , A unif cone and A unif flat cone are compact w.r.t. the γconvergence.

Note that this is a non-exhaustive list, other examples are presented in Section 5.1 of [START_REF] Bucur | Variational methods in shape optimization problems[END_REF]. We then have the existence of solutions for the following shape optimization problem stated below,

R be a Carathéodory function, i.e. it is measurable in its first argument, and continuous in all others. Then, the optimization problem

admits at least one solution for U ad = A convex , A unif cone , A unif flat cone , respectively.

Even if S ϕ (Y ) is compact for Γ-convergence, U may not be compact for the γ-convergence. Indeed, if G(u n , •) Γ-converges to F , then F may not be of the form G(u, •) for u ∈ U . We then need to take a space larger than U .

C.4 Relaxation

We call the set of relaxed controls the set Û := U γ and we keep noting by γ the convergence on Û . We then have the following proposition:

Proposition C.4.1. The space Û is compact w.r.t. the γ-convergence.

In order to define the relaxed optimization problem, we need to define a relaxed state functional Ĝ and a relaxed cost function Ĵ. We define

Then, we define Ĵ from  to R by

Thus, we define the relaxed optimization problem min (û,y)∈ Â Ĵ(û, y).

We then have the following theorem:

C.5 The case of PDEs with Dirichlet Condition

We may not have a classical solution for PDEs with the Lebesgue measure. On the other hand, Sverák proved that we have the existence of a classical solution in the case of the Hausdorff measure if we add a constraint on the number of related components of our admissible sets [START_REF] Bucur | Variational methods in shape optimization problems[END_REF]. To have the existence of a relaxed solution, we can use the notion of capacity [START_REF] Bucur | Variational methods in shape optimization problems[END_REF][START_REF] Buttazzo | Relaxed optimal control problems and applications to shape optimization[END_REF][START_REF] Maso | Wiener's criterion and γ-convergence[END_REF][START_REF] Maso | γ-convergence and µ-capacities[END_REF]. It is this case that we will detail in the rest of this section.

C.5.1 Capacity

We start by giving an example of Choquet capacity [START_REF] Choquet | Theory of capacities[END_REF][START_REF]Forme abstraite du théorème de capacitabilité[END_REF], which will have an important role for the shape optimization [START_REF] Maso | γ-convergence and µ-capacities[END_REF], and some of its properties. Now some definitions using the notion of capacity.

Definition C.5.3 (Quasi-everywhere). If a property is true for all x belonging to E \ Z where Z is a subset of E with cap(Z) = 0, we say that this property is true almost everywhere on E and we write q.e. We give an equivalent definition [START_REF] Kinnunen | The Sobolev capacity on metric spaces[END_REF] :

Note. Therefore, if E is an open set, the function u from the definition above is the solution of

The capacity is therefore the value of the energy of u.

Then, we state estimates of the capacity with respect to the Lebesgue measure.

Proposition C.5.2. Let E be subset of D. Then,

C.5.2 The Set M 0 (D)

In this part, we will extend the capacity of a set to measures of a certain type. We introduce the set M 0 (D), which is denoted M * 0 (D) in [START_REF] Maso | γ-convergence and µ-capacities[END_REF]. Formally, when µ = ∞ A , we penalize the functional which is then +∞ unless u = 1 on A. We have, in a way, encoded the Dirichlet condition by means of this penalization. We can now make the connection between the capacity of sets and the capacity of measures. The previous result tells us that for any µ in M 0 (D), there exists a family of subsets (E n ) n of D, such that ∞ En γ-converges to µ. Thus, in the case of shape optimization, we can take as control space U , measures of the form ∞ D\A , with A smooth open subset of D and as relaxed control space Û , M 0 (D). Finally, we have a locality result for γ-convergence : Proposition C.5.5 (Locality of the γ-convergence). Let (µ 1 n ) n and (µ 2 n ) n be two sequences of measures from M 0 (D) which γ-converge to µ 1 and µ 2 respectively. We suppose that µ 1 n and µ 2 n coincide q.e. on a subset D ′ of D, for all n ∈ N. Then µ 1 and µ 2 coincide q.e. on D ′ .