Ejemplo 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)
Ejemplo 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)
Ejemplo 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)