|
@@ -63,6 +63,8 @@
|
|
|
" # light or dark period\n",
|
|
|
" texts.append('Light' if self.pt.is_light else 'Dark')\n",
|
|
|
"\n",
|
|
|
+ " frame_to_save = frame.copy() # save video without animal contours\n",
|
|
|
+ " \n",
|
|
|
" # draw animal position center(s) and contours\n",
|
|
|
" if self.pt.positions_in_px is not None:\n",
|
|
|
" pos_in_px = self.pt.positions_in_px\n",
|
|
@@ -88,8 +90,9 @@
|
|
|
" # draw text infos\n",
|
|
|
" for i, text in enumerate(texts):\n",
|
|
|
" cv2.putText(frame, text, (10, 30 + 20*(i+1)), FONT, .5, COLORS['white'])\n",
|
|
|
+ " cv2.putText(frame_to_save, text, (10, 30 + 20*(i+1)), FONT, .5, COLORS['white'])\n",
|
|
|
"\n",
|
|
|
- " return frame"
|
|
|
+ " return frame, frame_to_save"
|
|
|
]
|
|
|
},
|
|
|
{
|