nav_algo.computer_vision.detectors.buoyDetector.buoyDetector module¶
-
class
nav_algo.computer_vision.detectors.buoyDetector.buoyDetector.
BuoyDetector
(img_height=480, img_width=640)¶ Bases:
object
A detector for buoys.
This uses a standard webcam to output visual feedback on the camera screen and an outline of the buoys. It returns the coordinates of the largest buoy found.
- Parameters
img_height – the height of the camera output.
img_width – the width of the camera output.
-
BUOY_HEIGHT
= 1016¶
-
class
BlurType
(value)¶ Bases:
enum.Enum
An enumeration.
-
Bilateral_Filter
= 4¶
-
Box_Blur
= 1¶
-
Gaussian_Blur
= 2¶
-
Median_Filter
= 3¶
-
-
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_buoy_coords
(direction, curr_x, curr_y)¶ Calculates all visible buoy coordinates.
- Parameters
direction (float) – Boat’s current direction (an angle)
curr_x (float) – Boat’s current x-coordinate
curr_y (float) – Boat’s current y-coordinate
- Returns
A list of coordinate pairs (x, y) representing the center of each detected buoy.
- Return type
list
-
process
(source0)¶ Runs the pipeline and sets all outputs to new values.