# -*- coding: utf-8 -*-
"""
Created on Sat Nov  4 23:48:14 2017

@author: Alain
"""

import matplotlib.pyplot as plt
import matplotlib.image as img


""" Lenna """

lenna = img.imread("lenna.png")
plt.imshow(lenna)
plt.show()

def retourneVerticalement(image):
    pass
    
lennaTeteEnBas = retourneVerticalement(lenna)
plt.imshow(lennaTeteEnBas)
plt.show()

def retourneHorizontalement(image):
    pass

lennaTeteAGauche = retourneHorizontalement(lenna)
plt.imshow(lennaTeteAGauche)
plt.show()    

def gris(image):
    pass
    
lennaGris = gris(lenna)

plt.imshow(lennaGris, cmap='gray')
plt.show()

""" seuillage """

def seuil(image,limite):
    pass
    
lennaSeuil = seuil(lennaGris,0.5)

plt.imshow(lennaSeuil, cmap='gray')
plt.show()


""" convolution """

lissage = [[1/9,1/9,1/9],[1/9,1/9,1/9],[1/9,1/9,1/9]]
accentuation = [[0,-0.5,0],[-0.5,3,-0.5],[0,-0.5,0]]
embossage=[[-2,-1,0],[-1,0,1],[0,1,2]]
rehausseur = [[-1/6, -2/3, -1/6],[-2/3, 13/3, -2.3],[-1/6, -2/3, -1/6]]

def convolutionGris(image, filtre3x3):
    pass
    

