This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import inspect | |
from skimage import exposure, feature, filters, measure, morphology, \ | |
restoration, segmentation, transform, util | |
def only_one_nondefault(args): | |
""" | |
Returns True if the function has only one non-keyword parameter, | |
False otherwise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from skimage import io, restoration | |
from skimage import img_as_float | |
from scipy import ndimage | |
def hysteresis_thresholding(im, high_threshold=0.5, low_threshold=0.2): | |
""" | |
Hysteresis thresholding, using two thresholds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from skimage.segmentation import active_contour | |
from skimage import io, color, transform, filters, util | |
import numpy as np | |
import matplotlib.pyplot as plt | |
image = io.imread('statue.jpg') | |
print('Rescaling image...') | |
image = transform.rescale(image, 0.05) |
NewerOlder