Esempio n. 1
0
    def get_on_pixels(self, image):
        """Get a list of all turned on pixels in a binary image

        Returns a list of tuples of (x,y) coordinates
        of all matching pixels."""

        return _imagingmorph.get_on_pixels(image.im.id)
Esempio n. 2
0
    def get_on_pixels(self, image):
        """Get a list of all turned on pixels in a binary image

        Returns a list of tuples of (x,y) coordinates
        of all matching pixels."""

        if image.mode != "L":
            raise Exception("Image must be binary, meaning it must use mode L")
        return _imagingmorph.get_on_pixels(image.im.id)
Esempio n. 3
0
    def get_on_pixels(self, image):
        """Get a list of all turned on pixels in a binary image

        Returns a list of tuples of (x,y) coordinates
        of all matching pixels."""

        if image.mode != 'L':
            raise Exception('Image must be binary, meaning it must use mode L')
        return _imagingmorph.get_on_pixels(image.im.id)