locpix.visualise.vis_img#

Visualise module for images

Contains functions for visualising histograms

Functions

img_2_grey(img)

converts img to 0 255 greyscale image

label_2_4_colours(labels)

This takes in an array of labels e.g. [5,0,2,2,17,1,...] and returns a list where each label is now in range 0-3 such that no 2 integers next to each other are the same.

manual_threshold(array, threshold[, how])

Perform manual threshold of the input array

plot_img(img, h_old, w_old, bin_sizes, ax, ...)

visualise_seg(image, segmentation, ...[, ...])

Take in image and the associated segmentation and plot it, with option to convert to 4 colours and also option to choose to plot background as one particular colour (only relevant if four colour is true)