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
def rand_stat_adjusted(C, P): | |
"""Return Rand statistic. | |
C and P are two iterables. | |
""" | |
sz = len(C) | |
M = a = b = c= d = 0 | |
for i in range(sz-1): | |
for j in range(i+1,sz): | |
M += 1 | |
if C[i] == C[j]: |
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
#! /bin/usr/env python | |
# -*- coding: utf-8 -*- | |
"""Building DAB colormap.""" | |
__author__ = "Xavier Moles Lopez <x.moleslo@gmail.com>" | |
__date__ = "01/05/11" | |
from pylab import * | |
from matplotlib.colors import LinearSegmentedColormap |
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
def noise(image): | |
""" Compute the noise feature. | |
Parameters | |
---------- | |
image: ndarray | |
Image array (uint8 array). | |
Returns | |
------- |