예제 #1
0
    def get(self, resolution=5):
        colors = self.image.histogram()
        band_count = len(self.image.getbands())

        return map(
            lambda colors: self.buckets(colors, resolution),
            chunks(colors, band_count)
        )
예제 #2
0
 def buckets(self, colors, buckets):
     return normalize(map(sum, chunks(colors, buckets)), self.area())