@property
    def count(self):
        from .quantize import get_color_index
        if not self._count:
            n_pix = 0
            his_len = len(self.histo)
            for i in range(self.r1, self.r2):
                for j in range(self.g1, self.g2):
                    for k in range(self.b1, self.b2):
                        index_ = get_color_index(i, j, k)
                        try:
                            n_pix += self.histo[index_]
                        except __HOLE__:
                            pass

            self._count = n_pix

        return self._count
dataset/ETHPy150Open admire93/mmcq.py/mmcq/region.py/Vbox.count