This file contains hidden or 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 import io as sio | |
| import skimage | |
| import numpy as np | |
| import matplotlib | |
| import matplotlib.pyplot as plt | |
| img = skimage.img_as_float(sio.imread('im2.tif')) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| # Stefan van der Walt <stefan@sun.ac.za>, 2013 | |
| # License: CC0 | |
| from __future__ import division | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| from matplotlib.patches import Circle |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 os | |
| from skimage.io import ImageCollection | |
| from skimage.io.video import CvVideo | |
| import cv | |
| class WebcamVideo(CvVideo): | |
| """ |
This file contains hidden or 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
| """ | |
| ========================== | |
| Random walker segmentation | |
| ========================== | |
| The random walker algorithm [1]_ determines the segmentation of an image from | |
| a set of markers labeling several phases (2 or more). An anisotropic diffusion | |
| equation is solved with tracers initiated at the markers' position. The local | |
| diffusivity coefficient is greater if neighboring pixels have similar values, | |
| so that diffusion is difficult across high gradients. The label of each unknown |
This file contains hidden or 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
| { | |
| "metadata": { | |
| "name": "maximum_amplitude" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or 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
| { | |
| "metadata": { | |
| "name": "cat" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or 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
| @magic_arguments.argument( | |
| 'filename', type=unicode, | |
| help='file to write' | |
| ) | |
| @cell_magic | |
| def cat(self, line, cell): | |
| """Write the contents of the cell to a file. | |
| """ | |
| nr_pipes = line.count('>') |
This file contains hidden or 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.viewer import ImageViewer | |
| from skimage import data, img_as_float | |
| from skimage.viewer.plugins.plotplugin import PlotPlugin | |
| from skimage.viewer.widgets import Slider | |
| from skimage.exposure import rescale_intensity | |
| from skimage.transform import rotate | |
| import numpy as np | |
| import matplotlib.pyplot as plt |