:py:mod:`macrobot.helpers` ========================== .. py:module:: macrobot.helpers .. autoapi-nested-parse:: Image helper functions. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: macrobot.helpers.wb_helper macrobot.helpers.whitebalance macrobot.helpers.rgb_features macrobot.helpers.get_saturation macrobot.helpers.save_img_array Attributes ~~~~~~~~~~ .. autoapisummary:: macrobot.helpers.__author__ macrobot.helpers.__copyright__ macrobot.helpers.__license__ .. py:data:: __author__ :value: 'Stefanie Lueck' .. py:data:: __copyright__ :value: 'Stefanie Lueck' .. py:data:: __license__ :value: 'NonCommercial-ShareAlike 2.0 Generic (CC BY-NC-SA 2.0) License' .. py:function:: wb_helper(channel, perc=0.05) Performing a white balance on a single channel. :param channel: 1-channel image. :type channel: numpy array. :param perc: Percentile. :type perc: float :return: The channel after white balance. :rtype: numpy array .. py:function:: whitebalance(image) Performing a white balance on a 3-channel image. Similar to GIMP white balance method. :param image: 3-channel image. :type image: numpy array. :return: The 3-channel image after white balance. :rtype: numpy array .. py:function:: 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]. :param image_array: 3-channel image. :type image_array: numpy array. :param feature_type: minimum or maximum :type feature_type: numpy array. :return: The 3-channel image after intensity projection. :rtype: numpy array .. py:function:: get_saturation(image) Extract the saturation channel of a 3-channel image from the HSV color space. :param image: 3-channel image. :type image: numpy array. :return: The 1-channel image saturation channel. :rtype: numpy array .. py:function:: save_img_array()