RoboCarts
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ca_classes.ColorContour Class Reference

Public Member Functions

def __init__ (self, name, boundary)
 
def update_contour (self, new_contour)
 
def check_if_crossed_line (self, finish_p1, finish_p2, finish_time)
 
def update_times (self, finish_time)
 

Static Public Member Functions

def get_centroid (new_contour)
 

Public Attributes

 name
 
 boundary
 
 current_contour
 
 rectangle
 
 centroid
 
 centroids
 
 backdrive
 
 can_increase_backdrive
 
 disappeared_from_scene
 
 out_of_scene
 
 lap_times
 
 rounds
 

Detailed Description

Main class of the Color algorithm representing both unique colors and cars on the frame

Member Function Documentation

◆ check_if_crossed_line()

def ca_classes.ColorContour.check_if_crossed_line (   self,
  finish_p1,
  finish_p2,
  finish_time 
)
Checks if the ColorContour instance crossed the finish line and updates time accordingly
:param finish_p1: finish point 1
:param finish_p2: finish point 2
:param finish_time: finish time in secs
:return: check flag

◆ get_centroid()

def ca_classes.ColorContour.get_centroid (   new_contour)
static
Computes the centroid location from a contour
:param new_contour: a contour of the ColorContour instance
:return : centroid coordinates

◆ update_contour()

def ca_classes.ColorContour.update_contour (   self,
  new_contour 
)
Updates information about ColorContour's position
:param new_contour: contour on the new frame
:return: -

◆ update_times()

def ca_classes.ColorContour.update_times (   self,
  finish_time 
)
Function for time updating
:param finish_time: finish time in secs
:return: -

The documentation for this class was generated from the following file: