Commit c16bac66 authored by Inès EL HADRI's avatar Inès EL HADRI 💤

Tune mask vision

parent 81d63206
...@@ -12,10 +12,9 @@ class CameraVision(Node): ...@@ -12,10 +12,9 @@ class CameraVision(Node):
def __init__(self, name="cam_vision", timerFreq = 1/60.0): def __init__(self, name="cam_vision", timerFreq = 1/60.0):
super().__init__(name) # Create the node super().__init__(name) # Create the node
# Initialiaze node variables # Initialiaze node variables
self._low = np.array([72-25, 107-55, 84-55]) self._low = np.array([60-25, 50, 50])
self._high = np.array([65+25, 219+30, 255]) self._high = np.array([65+25, 255, 255])
self._kernel = np.ones((5, 5), np.uint8) self._kernel = np.ones((5, 5), np.uint8)
self._color_info = (0, 0, 255) self._color_info = (0, 0, 255)
...@@ -107,8 +106,8 @@ class CameraVision(Node): ...@@ -107,8 +106,8 @@ class CameraVision(Node):
(x, y), radius = cv2.minEnclosingCircle(c) (x, y), radius = cv2.minEnclosingCircle(c)
# If we find a correct match that is big enough, we publish data # If we find a correct match that is big enough, we publish data
if min(match, match2) < 0.2 and radius > 30: if min(match, match2) < 0.3 and radius > 30 and y > 2.0/5 * 480:
print(f'Match : {min(match, match2)}') # print(f'Match : {min(match, match2)}')
# Circle the bottle on the image # Circle the bottle on the image
cv2.circle(image, (int(x), int(y)), int(radius), self._color_info, 2) cv2.circle(image, (int(x), int(y)), int(radius), self._color_info, 2)
......
grp_astro/src/img/template.jpg

9.37 KB | W: | H:

grp_astro/src/img/template.jpg

11.6 KB | W: | H:

grp_astro/src/img/template.jpg
grp_astro/src/img/template.jpg
grp_astro/src/img/template.jpg
grp_astro/src/img/template.jpg
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment