示例#1
0
文件: edgeDetect.py 项目: mcgrew/pimp
def execute( width, height, data ):
    """
    Applies a Sobel edge detect algorithm on the image.
        
    :Parameters:
        width : int
            The width of the image being converted
        height : int
            The height of the image being converted
        data : string
            A string containing the data for the image
    
    :rtype: tuple
    :returns: a tuple containing a width, height, and data as a binary string.
    """
    return spatial( width, height, data, FILTER )
示例#2
0
def execute( width, height, data ):
    """
    Sharpens the image with a laplacian algorithm.
        
    :Parameters:
        width : int
            The width of the image being converted
        height : int
            The height of the image being converted
        data : string
            A string containing the data for the image
    
    :rtype: tuple
    :returns: a tuple containing a width, height, and data as a binary string.
    """
    return spatial( width, height, data, FILTER )
示例#3
0
def execute( width, height, data ):
    """
    Smooths an image evenly on a 3x3 area.
        
    :Parameters:
        width : int
            The width of the image being converted
        height : int
            The height of the image being converted
        data : string
            A string containing the data for the image
    
    :rtype: tuple
    :returns: a tuple containing a width, height, and data as a binary string.
    """
    return spatial( width, height, data, FILTER )
示例#4
0
def execute( width, height, data ):
    """
    Performs a Laplacian Edge Detect.
        
    :Parameters:
        width : int
            The width of the image being converted
        height : int
            The height of the image being converted
        data : string
            A string containing the data for the image
    
    :rtype: tuple
    :returns: a tuple containing a width, height, and data as a binary string.
    """
    return spatial( width, height, data, FILTER )
示例#5
0
def execute( width, height, data ):
    """
    Smooths an image, placing more emphasis on the center of a 3x3 area and less
    on the surrounding pixels.
        
    :Parameters:
        width : int
            The width of the image being converted
        height : int
            The height of the image being converted
        data : string
            A string containing the data for the image
    
    :rtype: tuple
    :returns: a tuple containing a width, height, and data as a binary string.
    """
    return spatial( width, height, data, FILTER )