macrobot.helpers

Image helper functions.

Module Contents

Functions

wb_helper(channel[, perc])

Performing a white balance on a single channel.

whitebalance(image)

Performing a white balance on a 3-channel image.

rgb_features(image_array, feature_type)

Extract min or max intensity projection.

get_saturation(image)

Extract the saturation channel of a 3-channel image from the HSV color space.

save_img_array()

Attributes

__author__

__copyright__

__license__

macrobot.helpers.__author__ = 'Stefanie Lueck'
macrobot.helpers.__license__ = 'NonCommercial-ShareAlike 2.0 Generic (CC BY-NC-SA 2.0) License'
macrobot.helpers.wb_helper(channel, perc=0.05)

Performing a white balance on a single channel.

Parameters
  • channel (numpy array.) – 1-channel image.

  • perc (float) – Percentile.

Returns

The channel after white balance.

Return type

numpy array

macrobot.helpers.whitebalance(image)

Performing a white balance on a 3-channel image.

Similar to GIMP white balance method.

Parameters

image (numpy array.) – 3-channel image.

Returns

The 3-channel image after white balance.

Return type

numpy array

macrobot.helpers.rgb_features(image_array, feature_type)

Extract min or max intensity projection.

Example Maximum RGB=[50,100,79] -> max_rgb=[0, 100, 0]

Example Minimum RGB=[50,100,79] -> min_rgb=[50, 0, 0].

Parameters
  • image_array (numpy array.) – 3-channel image.

  • feature_type (numpy array.) – minimum or maximum

Returns

The 3-channel image after intensity projection.

Return type

numpy array

macrobot.helpers.get_saturation(image)

Extract the saturation channel of a 3-channel image from the HSV color space.

Parameters

image (numpy array.) – 3-channel image.

Returns

The 1-channel image saturation channel.

Return type

numpy array

macrobot.helpers.save_img_array()