Stats
Stats
kernel_points(image, point, step=1)
Returns coordinates of pixels in a square matrix of width 2*step, whose center is point
Parameters:
image: ndarray (width, height)point: tuple (2,)step: int
Returns: tuple (n_points,2)
stats_preprocess(array, step)
Rounding angles to multiples, e.g. 0, step, 2*step, etc.
Parameters:
array: list, ndarray (n,)step: int
Returns: array_copy, array_copy_set, dens_curve
gaussian(x, mu, sigma, amp=1)
Draws points on the image at locations where there are corners from the corners list
Parameters:
x: list (n,)mu: floatsigma: floatamp: float
Returns: list (n,)
gaussian_bimodal(x, mu1, mu2, sigma1, sigma2, amp1=1, amp2=1)
Returns a bimodal normal function with given parameters
Parameters:
x: list (n,)mu1: floatmu2: floatsigma1: floatsigma2: floatamp1: floatamp2: float
Returns: list (n,)
gaussian_termodal(x, mu1, mu2, mu3, sigma1, sigma2, sigma3, amp1=1, amp2=1, amp3=1)
Returns a trimodal normal function with given parameters
Parameters:
x: list (n,)mu1: floatmu2: floatmu3: floatsigma1: floatsigma2: floatsigma3: floatamp1: floatamp2: floatamp3: float
Returns: list (n,)
ellipse(a, b, angle, xc=0, yc=0, num=50)
Returns coordinates of an ellipse constructed from given parameters. Center is (0,0) by default. Angle in radians, decreasing the angle denotes clockwise rotation of the ellipse
Parameters:
a: floatb: floatangle: float, radxc: float, center coord xyc: float, center coord ynum: int, number of ellipse points
Returns: tuple (num, 2)