Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def eqLum(pict1,pict2):
- # @pict1: Picture
- # @pict2: Picture
- # @return: Boolean; Se esce Vero, allora esiste almeno un colore equiluminoso nella seconda immagine
- allPix1 = getPixels(pict1)
- allPix2 = getPixels(pict2)
- for p2 in allPix2:
- lum2 = (getRed(p2)+getGreen(p2)+getBlue(p2))
- if existEqLum(lum2,allPix1)==True:
- return True
- return False
- def existEqLum(lum2,allPix1):
- # @lum2: Int
- # @allPix1: Pixels's sequence
- # @return: Boolean
- for p1 in allPix1:
- lum1 = (getRed(p1)+getGreen(p1)+getBlue(p1))
- if lum1==lum2:
- return True
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement