Skip to content

Commit

Permalink
Merge pull request #17 from ergoCub-HSP/feature
Browse files Browse the repository at this point in the history
Feature
  • Loading branch information
andrearosasco authored Mar 6, 2023
2 parents 3ce648a + f008650 commit 47e9c3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions connect_camera.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yarp connect /depthCamera/rgbImage:o /depthCamera/rgbImage:r mjpeg
yarp connect /depthCamera/depthImage:o /depthCamera/depthImage:r tcp+send.portmonitor+file.depthimage_compression_zlib+recv.portmonitor+file.depthimage_compression_zlib+type.dll
yarp connect /depthCamera/rgbImage:o /depthCamera/rgbImage:r #mjpeg
yarp connect /depthCamera/depthImage:o /depthCamera/depthImage:r #tcp+send.portmonitor+file.depthimage_compression_zlib+recv.portmonitor+file.depthimage_compression_zlib+type.dll


9 changes: 5 additions & 4 deletions scripts/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ def loop(self, data: dict) -> dict:
self.action = data["action"]
if self.action is not None:
label = self.id_to_action[self.action] if self.action != -1 else 'none'
textsize = cv2.getTextSize(label, cv2.FONT_ITALIC, 1, 2)[0]
textX = int((img.shape[1] - textsize[0]) / 2)
text_color = (0, 255, 0)
img = cv2.putText(img, label, (textX, 450), cv2.FONT_ITALIC, 1, text_color, 2, cv2.LINE_AA)
if label is not 'none':
textsize = cv2.getTextSize(label, cv2.FONT_ITALIC, 1, 2)[0]
textX = int((img.shape[1] - textsize[0]) / 2)
text_color = (0, 255, 0)
img = cv2.putText(img, label, (textX, 450), cv2.FONT_ITALIC, 1, text_color, 2, cv2.LINE_AA)

img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)

Expand Down

0 comments on commit 47e9c3e

Please sign in to comment.