(img, alpha=1.0, sigma=1.0)
return 1.0/np.sqrt(1.0 + alpha*gradnorm)
Stopping criterion for image borders.
Stopping criterion for image borders.
Stopping criterion for image borders .
def gborders(img, alpha=1.0, sigma=1.0):
    """Stopping criterion for image borders."""
    # The norm of the gradient.
    gradnorm = gaussian_gradient_magnitude(img, sigma, mode='constant')
    return 1.0/np.sqrt(1.0 + alpha*gradnorm)
def gborders ( img , alpha = 1.0 , sigma = 1.0 ) : # The norm of the gradient. gradnorm = gaussian_gradient_magnitude ( img , sigma , mode = 'constant' ) return 1.0 / np . sqrt ( 1.0 + alpha * gradnorm )