Closes edges of shapes on IMAGE, according to specified gradient image. The unclosed shapes converted to the closed if the gradient spot between the suspected dents falls under maxlen maximal length increment, mingradient the minimal gradient value and the edge is longer than minedgelen.

Performs direct and inverse ( governed by inverse boolean flag ) fast Fourier transform. If IMAGE dimensions not of power of 2, then IMAGE is scaled up to the closest power of 2, and the result is scaled back to the original dimensions.

Performs band filtering of IMAGE in frequency domain. If IMAGE dimensions not of power of 2, then IMAGE is scaled up to the closest power of 2, and the result is scaled back to the original dimensions.

Takes a Hough-transformed image, where each pixel is a line. For each non-zero pixel a line projection on a rectangle with given width and height is calculated. Returns array of quad values in format [x0,y0,x1,y2] where the coordinates stand for the start and the end of a line.