nav_algo.computer_vision.detectors.utils module

Calculates distances from each contour and creates list of obstacle distances from camera. :param img_height: height of image passed in, in pixels :type img_height: int

Returns

A list where each element represents an obstacle distance in meters.

Return type

list

Calculates distances from each contour and creates list of obstacle distances from camera. :param img_height: height of image passed in, in pixels :type img_height: int

Returns

A list where each element represents an obstacle distance in meters.

Return type

list

get_coord(distance, x_displacement, direction, curr_x, curr_y) returns the x and y coordinates of the center of an obstacle given a calculated [distance] in front of the boat at coordinates [curr_x], [curr_y] facing [direction]

Returns

The x coordinate of the obstacle center. float: The y coordinate of the obstacle center.

Return type

float