nav_algo.computer_vision.detectors.boatDetector module¶
-
class
nav_algo.computer_vision.detectors.boatDetector.
BoatDetector
(img_height=480, img_width=640)¶ Bases:
object
-
BOAT_SIZE
= 2500¶
-
class
BlurType
(value)¶ Bases:
enum.Enum
An enumeration.
-
Bilateral_Filter
= 4¶
-
Box_Blur
= 1¶
-
Gaussian_Blur
= 2¶
-
Median_Filter
= 3¶
-
-
find_distance_largest_contour
()¶ Calculates the distance of the largest contour.
- Returns
the obstacle distance float: the x-offset in the image
- Return type
float
-
find_distances
()¶ Calculates distances from each contour and creates list of obstacle distances from camera.
- Parameters
img_height – height of image passed in, in pixels
- Returns
A list where each element represents an obstacle distance list: A list where each element represents an x-offset in the image.
- Return type
list
-
get_boat_coords
(direction, curr_x, curr_y)¶ get_boat_coords(distance, x_displacement, direction, curr_x, curr_y) returns the x and y coordinates of a boat detected by a boat detector.
- Returns
x, y coordinates representing the center of the front projection of another boat.
- Return type
list
-
process
(source0)¶ Runs the pipeline and sets all outputs to new values.
-