view transformations/Occlusion.py @ 45:f8a92292b299

merge de 4 fevrier
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Thu, 04 Feb 2010 10:27:58 -0500
parents 5deccb161307
children 60b093f963d8
line wrap: on
line source

#!/usr/bin/python
# coding: utf-8

'''
Ajout de bruit d'occlusion dans l'image originale. Le bruit d'occlusion vient
d'une seconde image passee en parametre dans la methode ????

Le bruit provient d'un echantillon pris dans la seconde image puis rajoutee a
gauche ou a droite de l'image originale. De plus, il se peut aussi que le
bruit soit rajoute sur l'image originale, mais en plus pâle.

Sylvain Pannetier Lebeuf dans le cadre de IFT6266, hiver 2010

'''


import numpy
#import random
import scipy
import pylab
#from scipy import ndimage

class Occlusion():
    
    def __init__(self):
        #Ces 4 variables representent la taille du "crop" sur l'image2
        #Ce "crop" est pris a partie de image1[15,15], le milieu de l'image1
        self.haut=2
        self.bas=2
        self.gauche=2
        self.droite=2
        
        #Ces deux variables representent le deplacement en x et y par rapport
        #au milieu du bord gauche ou droit
        self.x_arrivee=0
        self.y_arrivee=0
        
        #Cette variable =1 si l'image est mise a gauche et -1 si a droite
        #et =0 si au centre, mais plus pale
        self.endroit=-1
        
        #Cette variable determine l'opacite de l'ajout dans le cas ou on est au milieu
        
        self.opacite=0.5
        
        
        ##La douzaine d'image sera stoquee ici et non dans un autre fichier
        ##Afin de ne pas devoir charger un autre fichier a chaque appel.
        w=numpy.zeros((12,1024))
        #a
        w[0]=numpy.asarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 18, 28, 18, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 31, 73, 115, 144, 115, 70, 23, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 12, 44, 124, 192, 219, 231, 223, 188, 100, 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 45, 93, 146, 198, 197, 171, 172, 211, 237, 187, 67, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 47, 146, 210, 212, 156, 83, 44, 48, 122, 221, 216, 92, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20, 111, 216, 225, 153, 58, 12, 3, 6, 59, 184, 224, 125, 26, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 62, 177, 230, 162, 58, 10, 1, 0, 2, 37, 165, 239, 189, 68, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 25, 130, 227, 222, 103, 15, 1, 0, 0, 2, 37, 165, 245, 217, 89, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 34, 161, 243, 212, 84, 8, 0, 0, 0, 4, 56, 184, 247, 220, 91, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 240, 184, 56, 4, 0, 0, 0, 9, 86, 213, 251, 219, 91, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 237, 165, 37, 2, 0, 0, 0, 18, 117, 229, 252, 212, 84, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 237, 165, 37, 2, 0, 0, 1, 34, 155, 243, 249, 186, 57, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 34, 161, 239, 184, 56, 4, 0, 0, 5, 58, 184, 249, 249, 186, 58, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 26, 136, 232, 212, 87, 9, 0, 3, 28, 118, 222, 251, 251, 215, 96, 14, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 78, 192, 222, 126, 29, 6, 26, 102, 199, 239, 222, 228, 235, 161, 59, 15, 6, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 26, 123, 221, 198, 101, 51, 105, 198, 238, 200, 126, 152, 223, 225, 161, 102, 72, 43, 35, 26, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 70, 188, 234, 194, 165, 208, 238, 210, 115, 35, 56, 137, 205, 230, 220, 198, 170, 159, 129, 63, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 104, 204, 239, 240, 241, 206, 117, 39, 5, 8, 35, 104, 187, 216, 216, 211, 202, 161, 88, 18, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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116, 49, 12, 13, 95, 221, 249, 239, 223, 181, 119, 49, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20, 64, 65, 25, 5, 6, 37, 129, 230, 252, 231, 155, 66, 25, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 6, 2, 8, 43, 126, 208, 248, 249, 188, 68, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 18, 62, 141, 214, 245, 250, 246, 173, 46, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 95, 175, 228, 235, 206, 196, 228, 198, 76, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 79, 190, 240, 233, 176, 92, 77, 162, 214, 135, 39, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 55, 159, 232, 227, 159, 74, 18, 17, 103, 218, 204, 90, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 21, 116, 209, 204, 138, 56, 12, 1, 9, 92, 219, 235, 137, 26, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 81, 137, 96, 35, 8, 1, 0, 9, 89, 217, 243, 160, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 15, 27, 16, 3, 0, 0, 0, 6, 67, 185, 222, 144, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 23, 90, 122, 68, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 2, 31, 118, 164, 114, 48, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 70, 194, 241, 219, 144, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 92, 219, 253, 248, 189, 63, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 117, 229, 254, 247, 171, 43, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 34, 155, 243, 255, 246, 164, 36, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 55, 183, 249, 255, 246, 163, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 84, 212, 253, 255, 242, 154, 32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 94, 220, 254, 254, 229, 117, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 117, 229, 254, 254, 221, 94, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32, 154, 242, 255, 254, 219, 91, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 37, 165, 246, 255, 253, 212, 84, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 25, 34, 34, 26, 14, 58, 184, 249, 255, 249, 184, 56, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 55, 129, 161, 161, 136, 88, 115, 217, 253, 255, 245, 163, 36, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 63, 153, 225, 242, 242, 233, 204, 202, 242, 254, 254, 236, 137, 26, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 73, 169, 230, 238, 212, 207, 216, 209, 225, 251, 255, 253, 215, 94, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 57, 159, 234, 242, 183, 98, 80, 89, 102, 184, 248, 255, 249, 184, 56, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 39, 143, 228, 248, 206, 99, 22, 8, 10, 42, 165, 246, 255, 246, 165, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 69, 194, 248, 229, 138, 35, 3, 0, 2, 43, 171, 247, 255, 242, 154, 32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 111, 223, 244, 177, 62, 8, 0, 0, 6, 72, 200, 251, 254, 227, 115, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32, 153, 241, 229, 119, 21, 1, 0, 1, 15, 102, 222, 254, 251, 200, 74, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 163, 245, 221, 94, 10, 0, 1, 15, 64, 163, 239, 255, 247, 171, 43, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 245, 220, 91, 9, 2, 14, 74, 169, 231, 253, 255, 246, 164, 36, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 245, 221, 95, 15, 26, 81, 165, 235, 253, 255, 255, 246, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 34, 161, 244, 230, 132, 72, 118, 193, 237, 253, 254, 255, 255, 246, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 25, 130, 228, 246, 214, 194, 223, 247, 252, 245, 234, 243, 254, 246, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 61, 168, 232, 247, 249, 251, 247, 229, 178, 142, 199, 249, 246, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 71, 143, 198, 223, 218, 182, 132, 63, 55, 168, 246, 246, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 33, 73, 105, 100, 57, 27, 9, 35, 161, 244, 246, 163, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 14, 14, 5, 1, 1, 25, 126, 215, 231, 150, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 45, 108, 140, 84, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0])
        #n
        w[3]=numpy.asarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 11, 15, 6, 1, 4, 9, 18, 32, 34, 23, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 6, 10, 20, 52, 91, 103, 52, 24, 52, 86, 117, 153, 158, 113, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 23, 34, 43, 71, 92, 119, 174, 214, 214, 145, 113, 171, 209, 220, 228, 236, 193, 70, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 32, 113, 159, 171, 198, 213, 221, 239, 251, 248, 212, 203, 225, 206, 179, 162, 213, 215, 92, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 77, 183, 226, 234, 225, 186, 168, 196, 242, 253, 247, 231, 167, 90, 58, 65, 173, 221, 117, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 56, 121, 140, 153, 130, 66, 45, 114, 225, 254, 252, 213, 96, 17, 6, 37, 163, 230, 144, 28, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 23, 27, 32, 25, 8, 12, 95, 221, 253, 237, 156, 46, 4, 1, 33, 155, 217, 117, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 19, 118, 229, 249, 201, 82, 12, 0, 1, 28, 142, 205, 96, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 40, 161, 243, 236, 144, 34, 2, 0, 2, 40, 163, 218, 117, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 74, 200, 246, 201, 81, 10, 0, 0, 5, 65, 193, 237, 153, 32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 115, 227, 237, 146, 34, 2, 0, 0, 6, 73, 201, 239, 156, 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32, 154, 241, 222, 101, 13, 0, 0, 0, 7, 78, 206, 235, 143, 28, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 43, 171, 241, 202, 80, 8, 0, 0, 0, 4, 55, 183, 238, 164, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 68, 190, 214, 128, 37, 3, 0, 0, 0, 1, 34, 155, 238, 197, 69, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 57, 136, 125, 47, 6, 0, 0, 0, 0, 0, 18, 114, 215, 184, 65, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 30, 24, 7, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 63, 151, 217, 224, 180, 146, 169, 222, 243, 163, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 65, 166, 224, 212, 141, 63, 31, 63, 176, 238, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 49, 138, 220, 205, 125, 43, 8, 3, 36, 164, 237, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 35, 135, 212, 205, 117, 35, 6, 0, 1, 35, 164, 237, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 104, 203, 204, 117, 39, 5, 0, 0, 2, 37, 165, 237, 161, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 70, 188, 226, 144, 38, 5, 0, 0, 0, 5, 58, 184, 228, 136, 26, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 19, 116, 222, 199, 81, 10, 0, 0, 0, 2, 25, 117, 218, 201, 81, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 50, 164, 226, 145, 34, 2, 0, 0, 0, 6, 68, 189, 235, 161, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 23, 118, 214, 212, 94, 12, 0, 0, 0, 0, 9, 89, 213, 217, 109, 18, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 42, 167, 232, 171, 52, 4, 0, 0, 0, 0, 8, 78, 178, 145, 47, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 83, 200, 205, 99, 18, 1, 0, 0, 0, 0, 3, 33, 70, 44, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 46, 156, 229, 171, 46, 3, 0, 0, 0, 0, 0, 0, 3, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 83, 209, 239, 154, 32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 14, 102, 222, 226, 117, 19, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, 32, 35, 36, 56, 150, 235, 213, 104, 42, 35, 35, 35, 35, 35, 32, 18, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 35, 105, 153, 163, 164, 175, 220, 249, 230, 184, 165, 164, 164, 164, 164, 163, 154, 114, 61, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 80, 199, 241, 246, 246, 247, 252, 254, 252, 248, 246, 245, 245, 245, 245, 242, 234, 210, 129, 26, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 88, 211, 246, 250, 250, 252, 255, 254, 249, 246, 242, 229, 221, 220, 218, 199, 171, 150, 84, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 59, 141, 170, 192, 194, 224, 251, 242, 196, 166, 154, 117, 94, 91, 90, 71, 43, 32, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 31, 43, 65, 84, 178, 246, 223, 112, 43, 32, 18, 10, 9, 9, 6, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 39, 164, 242, 200, 72, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 37, 165, 238, 169, 42, 2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 0, 0, 0, 0, 0, 0, 0, 0, 2, 20, 66, 77, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 64, 174, 189, 86, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 70, 196, 222, 111, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 21, 14, 2, 0, 0, 0, 0, 0, 0, 0, 4, 51, 178, 216, 99, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 12, 55, 116, 82, 15, 0, 0, 0, 0, 0, 0, 0, 10, 82, 202, 216, 92, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 31, 82, 159, 213, 146, 30, 1, 0, 0, 0, 0, 0, 1, 26, 136, 233, 219, 91, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 10, 44, 124, 198, 230, 214, 125, 25, 1, 0, 0, 0, 0, 0, 1, 34, 161, 244, 220, 91, 9, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 33, 81, 147, 213, 232, 193, 116, 46, 7, 0, 0, 0, 0, 0, 0, 1, 32, 154, 241, 219, 91, 9, 0, 0, 0, 0, 0, 0, 0, 3, 18, 62, 138, 200, 228, 222, 172, 85, 26, 5, 0, 0, 0, 0, 0, 0, 0, 0, 18, 117, 227, 219, 91, 9, 0, 0, 0, 0, 0, 1, 8, 35, 98, 175, 227, 232, 193, 122, 64, 17, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 86, 211, 217, 91, 9, 0, 0, 1, 4, 12, 28, 65, 139, 205, 233, 217, 157, 80, 26, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 55, 182, 214, 95, 12, 6, 10, 20, 52, 94, 139, 184, 225, 225, 177, 111, 48, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 36, 158, 219, 130, 57, 72, 92, 119, 174, 215, 236, 242, 211, 140, 62, 20, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 18, 32, 58, 156, 233, 212, 180, 200, 218, 228, 242, 250, 253, 241, 166, 66, 13, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20, 69, 115, 154, 173, 215, 249, 251, 245, 242, 235, 221, 207, 207, 222, 234, 208, 124, 35, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 64, 175, 225, 241, 245, 248, 254, 252, 222, 174, 138, 100, 80, 80, 102, 161, 222, 204, 117, 38, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 64, 174, 216, 219, 215, 216, 244, 247, 176, 65, 27, 12, 7, 7, 15, 58, 153, 222, 207, 108, 19, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20, 66, 89, 91, 91, 134, 226, 245, 164, 36, 2, 0, 0, 0, 1, 10, 58, 161, 229, 174, 54, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 9, 9, 17, 95, 220, 245, 164, 35, 1, 0, 0, 0, 0, 1, 14, 96, 213, 219, 110, 18, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 91, 220, 245, 164, 35, 1, 0, 0, 0, 0, 0, 4, 52, 174, 233, 161, 40, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 91, 220, 245, 164, 35, 1, 0, 0, 0, 0, 0, 1, 20, 117, 223, 202, 81, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 91, 219, 245, 164, 35, 1, 0, 0, 0, 0, 0, 0, 7, 74, 200, 231, 138, 28, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 84, 211, 244, 165, 37, 2, 0, 0, 0, 0, 0, 0, 2, 42, 168, 239, 185, 68, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 52, 173, 239, 184, 58, 5, 0, 0, 0, 0, 0, 0, 1, 25, 129, 224, 229, 161, 83, 33, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 19, 112, 220, 217, 102, 15, 0, 0, 0, 0, 0, 0, 0, 7, 55, 150, 217, 230, 199, 132, 43, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 66, 192, 230, 133, 24, 1, 0, 0, 0, 0, 0, 0, 1, 9, 48, 116, 188, 212, 177, 70, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 71, 199, 239, 156, 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 5, 25, 68, 89, 78, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 69, 197, 241, 162, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 9, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 38, 151, 213, 144, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 66, 105, 66, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
        #l
        w[6]=numpy.asarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 1, 32, 153, 239, 209, 92, 17, 3, 3, 12, 43, 50, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32, 153, 240, 224, 124, 38, 7, 0, 0, 3, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 108, 216, 242, 208, 135, 46, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 46, 134, 200, 232, 215, 111, 22, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 33, 83, 160, 222, 181, 78, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 12, 65, 174, 223, 148, 35, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 18, 96, 193, 186, 89, 21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 28, 123, 212, 173, 59, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 79, 197, 183, 59, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 4, 4, 8, 10, 28, 98, 194, 174, 52, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 32, 63, 56, 57, 84, 94, 125, 192, 214, 134, 31, 2, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 94, 220, 244, 161, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 91, 220, 245, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 94, 221, 245, 164, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 117, 229, 244, 161, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 32, 154, 242, 236, 138, 26, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 14, 25, 12, 1, 3, 46, 172, 246, 221, 99, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 21, 79, 116, 57, 6, 16, 97, 209, 244, 190, 68, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 66, 173, 193, 86, 11, 40, 159, 241, 229, 125, 26, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 89, 214, 217, 97, 26, 84, 203, 249, 212, 86, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 84, 211, 230, 151, 110, 169, 237, 242, 172, 52, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 52, 173, 239, 232, 225, 239, 247, 206, 98, 18, 1, 0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4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 23, 67, 89, 84, 59, 82, 191, 248, 224, 108, 37, 35, 36, 43, 64, 61, 76, 114, 136, 76, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 100, 187, 217, 212, 186, 191, 235, 253, 240, 180, 151, 161, 164, 171, 192, 188, 195, 206, 172, 71, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 67, 183, 237, 244, 244, 243, 247, 253, 255, 253, 243, 240, 244, 245, 245, 240, 216, 178, 136, 76, 21, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 75, 167, 170, 164, 165, 185, 223, 248, 255, 255, 251, 243, 229, 220, 211, 173, 112, 57, 28, 10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 31, 59, 43, 36, 37, 59, 122, 212, 251, 252, 222, 166, 118, 94, 84, 52, 19, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 2, 1, 2, 6, 48, 172, 247, 247, 176, 62, 20, 10, 8, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 36, 164, 246, 242, 154, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 245, 229, 117, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 245, 221, 94, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 245, 220, 91, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35, 164, 245, 220, 91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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 8, 9, 9, 9, 8, 7, 7, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 35, 80, 91, 91, 91, 86, 75, 78, 55, 36, 26, 10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 102, 197, 218, 219, 219, 214, 203, 206, 183, 163, 136, 80, 31, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 21, 115, 207, 227, 236, 244, 244, 243, 243, 241, 241, 234, 198, 121, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 45, 99, 117, 140, 161, 164, 164, 164, 171, 201, 230, 243, 204, 98, 18, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 14, 18, 27, 34, 35, 35, 36, 44, 83, 160, 236, 242, 171, 51, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 12, 64, 167, 241, 250, 201, 75, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 57, 153, 229, 251, 231, 150, 45, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 16, 63, 154, 229, 252, 243, 175, 64, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 20, 80, 170, 231, 251, 245, 197, 95, 18, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 27, 96, 181, 237, 252, 240, 192, 101, 26, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 38, 114, 199, 243, 253, 243, 182, 86, 24, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 28, 114, 210, 247, 254, 245, 197, 96, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 26, 102, 200, 247, 252, 237, 191, 101, 26, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 101, 198, 245, 252, 229, 160, 80, 24, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 70, 188, 245, 254, 237, 160, 59, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 26, 123, 228, 254, 249, 198, 84, 16, 8, 9, 9, 8, 4, 2, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 68, 189, 247, 254, 243, 176, 81, 59, 84, 91, 91, 84, 56, 39, 48, 47, 28, 17, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 87, 215, 253, 255, 251, 227, 188, 186, 212, 219, 219, 212, 184, 167, 176, 173, 141, 104, 49, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 67, 186, 241, 251, 253, 252, 248, 248, 251, 252, 252, 251, 245, 239, 239, 238, 224, 178, 73, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 93, 159, 199, 218, 220, 220, 220, 220, 220, 220, 218, 199, 171, 164, 163, 153, 104, 35, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 16, 39, 71, 90, 91, 91, 91, 91, 91, 91, 90, 71, 43, 36, 35, 32, 17, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 9, 9, 9, 9, 9, 9, 9, 9, 6, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
        #o
        w[11]=numpy.asarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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44, 22, 31, 89, 192, 242, 217, 125, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 38, 136, 171, 204, 184, 68, 9, 1, 2, 24, 105, 210, 245, 195, 70, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 71, 188, 208, 203, 122, 26, 2, 0, 0, 4, 45, 170, 245, 218, 90, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 97, 219, 246, 209, 86, 9, 0, 0, 0, 1, 29, 145, 238, 220, 94, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 112, 226, 236, 166, 51, 4, 0, 0, 0, 1, 20, 122, 230, 228, 117, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 99, 217, 193, 84, 16, 1, 0, 0, 0, 0, 12, 99, 222, 241, 154, 32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 92, 212, 173, 48, 4, 0, 0, 0, 0, 0, 9, 92, 220, 245, 163, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 91, 216, 199, 74, 7, 0, 0, 0, 0, 0, 13, 102, 223, 245, 163, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 90, 217, 226, 118, 21, 1, 0, 0, 0, 3, 36, 146, 237, 240, 152, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 70, 196, 240, 178, 71, 21, 9, 5, 6, 27, 105, 207, 244, 204, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32, 134, 218, 228, 178, 119, 87, 62, 64, 112, 198, 237, 205, 122, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 48, 132, 218, 240, 228, 213, 190, 190, 216, 243, 210, 109, 34, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 48, 134, 200, 235, 248, 249, 250, 251, 244, 171, 46, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 33, 81, 144, 201, 235, 245, 237, 206, 136, 30, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 10, 34, 80, 136, 160, 148, 98, 55, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 10, 26, 34, 31, 16, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
        self.d=(w/255).astype('float')
        
        
    def get_settings_names(self):
        return ['haut','bas','gauche','droite','x_arrivee','y_arrivee','endroit','rajout']

    def regenerate_parameters(self, complexity):
        self.haut=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
        self.bas=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
        self.gauche=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
        self.droite=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
        if self.haut+self.bas+self.gauche+self.droite==0:   #Tres improbable
            self.haut=1
            self.bas=1
            self.gauche=1
            self.droite=1
        
        #Ces deux valeurs seront controlees afin d'etre certain de ne pas depasser
        self.x_arrivee=int(numpy.abs(numpy.random.normal(0,2))) #Complexity n'entre pas en jeu, pas besoin
        self.y_arrivee=int(numpy.random.normal(0,3)) 
        
        self.rajout=numpy.random.randint(0,12)  #les bouts de quelle lettre
        
        self.endroit=numpy.random.randint(-1,2) 
        #####Revoir si ces trois dernieres variables sont determinees ici !
        return self._get_current_parameters()

    def _get_current_parameters(self):
        return [self.haut,self.bas,self.gauche,self.droite,self.x_arrivee,self.y_arrivee,self.endroit,self.rajout]
    
    
    def transform_image(self, image):
        #Attrapper le bruit d'occlusion
        bruit=self.d[self.rajout].reshape((32,32))[15-self.haut:15+self.bas+1,15-self.gauche:15+self.droite+1]
        
        if self.x_arrivee+self.gauche+self.droite>32:
            self.endroit*=-1    #On change de bord et on colle sur le cote
            self.x_arrivee=0
        if self.y_arrivee-self.haut <-16:
            self.y_arrivee=self.haut-16#On colle le morceau en haut
        if self.y_arrivee+self.bas > 15:
            self.y_arrivee=15-self.bas  #On colle le morceau en bas
            
        if self.endroit==-1:    #a gauche
            image[(16+self.y_arrivee-self.haut):(16+self.y_arrivee+self.bas+1),(self.x_arrivee):(self.x_arrivee+self.gauche+self.droite+1)]=image[(16+self.y_arrivee-self.haut):(16+self.y_arrivee+self.bas+1),(self.x_arrivee):(self.x_arrivee+self.gauche+self.droite+1)]+bruit
        
        elif self.endroit==1: #a droite
            image[(16+self.y_arrivee-self.haut):(16+self.y_arrivee+self.bas+1),(31-self.x_arrivee-self.gauche-self.droite):(31-self.x_arrivee+1)]=image[(16+self.y_arrivee-self.haut):(16+self.y_arrivee+self.bas+1),(31-self.x_arrivee-self.gauche-self.droite):(31-self.x_arrivee+1)]+bruit
        
        elif self.endroit==0:    #au milieu
            image[(16-self.haut):(16+self.bas+1),(16-self.gauche):(16+self.droite+1)]=image[(16-self.haut):(16+self.bas+1),(16-self.gauche):(16+self.droite+1)]+(bruit*self.opacite)
        
        #renormaliser le tout. Toutes les entrees doivent etre entre 0 et 1
        for ii in xrange(0,32):
            for jj in xrange(0,32):
                image[ii,jj]=min(1,image[ii,jj])
        
        return image
        
#---TESTS---

def _load_image():
    f = open('/home/sylvain/Dropbox/Msc/IFT6266/donnees/lower_test_data.ft')  #Le jeu de donnees est en local. 
    d = ft.read(f)
    w=numpy.asarray(d[numpy.random.randint(0,50)])
    return (w/255.0).astype('float')

def _test(complexite):
    img=_load_image()
    transfo = Occlusion()
    pylab.imshow(img.reshape((32,32)))
    pylab.show()
    print transfo.get_settings_names()
    print transfo.regenerate_parameters(complexite)
    
    img_trans=transfo.transform_image(img.reshape((32,32)))
    
    pylab.imshow(img_trans.reshape((32,32)))
    pylab.show()
    

if __name__ == '__main__':
    from pylearn.io import filetensor as ft
    import pylab
    _test(0.5)