imgProcessor.features package

Submodules

imgProcessor.features.PatternRecognition module

class imgProcessor.features.PatternRecognition.PatternRecognition(image, fineKernelSize=3)[source]

Bases: object

findHomography(img)[source]

Find homography of the image through pattern comparison with the base image

invertHomography(H)[source]

imgProcessor.features.QuadDetection module

class imgProcessor.features.QuadDetection.QuadDetection(img=None, vertices=None, refinePositions=True)[source]

Bases: object

detect the corners of a (bright) quadrilateral object in an image e.g. a PV cell/module in an EL image

correct(img=None, **kwargs)[source]

correct perspective forwards kwargs to PerspectiveCorrection

drawVertices(img=None, color=None, thickness=4)[source]

imgProcessor.features.SingleTimeEffectDetection module

class imgProcessor.features.SingleTimeEffectDetection.SingleTimeEffectDetection(images, noise_level_function=None, nStd=4, save_ste_indices=False)[source]

Bases: object

Detect and remove Single-time-effects (STE) using min. 2 equivalent images public attributes:

.mask_clean –> STE-free indices .mask_STE –> STE indices (only avail. if save_ste_indices=True) .noSTE –> STE free image

addImage(image)[source]
countSTE()[source]

return number of found STE

intensityDistributionSTE(bins=10, range=None)[source]

return distribution of STE intensity

relativeAreaSTE()[source]

return STE area - relative to image area

imgProcessor.features.hog module

imgProcessor.features.hog.hog(image, orientations=6, ksize=(5, 5))[source]

returns the Histogram of Oriented Gradients

Parameters:
  • ksize – convolution kernel size as (y,x) - needs to be odd
  • orientations – number of orientations in between rad=0 and rad=pi

similar to http://scikit-image.org/docs/dev/auto_examples/plot_hog.html but faster and with less options

imgProcessor.features.minimumLineInArray module

imgProcessor.features.minimumLineInArray.minimumLineInArray(arr, relative=False)[source]

find closest minimum position next to middle line relative: return position relative to middle line

imgProcessor.features.polylinesFromBinImage module

imgProcessor.features.polylinesFromBinImage.polylinesFromBinImage(img, minimum_cluster_size=6, remove_small_obj_size=3, reconnect_size=3, max_n_contours=None, max_len_contour=None, copy=True)[source]

return a list of arrays of un-branching contours

img -> (boolean) array

minimum_cluster_size -> minimum number of pixels connected together to build a contour

##search_kernel_size -> TODO ##min_search_kernel_moment -> TODO

max_n_contours -> maximum number of possible contours in img max_len_contour -> maximum contour length