Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def equiluminosi(pict1,pict2):
- # @param pict1: picture
- # @param pict2: picture
- # @return bool
- for p2 in getPixels(pict2):
- for p1 in getPixels(pict1):
- if lum(p1,p2) == True :
- return True
- return False
- def somma (pix):
- # @ param p1: pixel
- # @ param p2: pixel
- # @return int
- Red= getRed(pix)
- Blue= getBlue(pix)
- Green= getGreen(pix)
- sum = Red + Blue + Green
- return sum
- def lum (p1,p2):
- if somma (p1) == somma (p2):
- return True
- else :
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement