RoboCarts
Functions
color_detection Namespace Reference

Functions

def get_color_mask (hsv, lower, upper)
 
def mask_frame_from_inrange (frame, lower, upper)
 
def join_masks (masks)
 

Detailed Description

@file color_detection.py
@brief This file contains functions for the color filtering technique

Function Documentation

◆ get_color_mask()

def color_detection.get_color_mask (   hsv,
  lower,
  upper 
)
Creates a binary mask from an RGB image - keeping only those pixels fitting into the lower-upper range
:param hsv: source image
:param lower: color lower boundary
:param upper: color upper boundary
:return: binary mask

◆ join_masks()

def color_detection.join_masks (   masks)
Auxiliary function for joining several binary masks together
:param masks: binary masks
:return: joined mask

◆ mask_frame_from_inrange()

def color_detection.mask_frame_from_inrange (   frame,
  lower,
  upper 
)
Makes color masks from an image and a binary masked obtained from the color filtering
:param frame: source frame
:param lower: color lower boundary
:param upper: color upper boundary
:return: color mask