dianamaro 3 rokov pred
rodič
commit
90ee22e547

+ 3 - 3
background.ipynb

@@ -2,7 +2,7 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 43,
+   "execution_count": 76,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -22,7 +22,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 44,
+   "execution_count": 77,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -37,7 +37,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 45,
+   "execution_count": 78,
    "metadata": {},
    "outputs": [],
    "source": [

+ 2 - 0
controllers/camera.ipynb

@@ -76,6 +76,8 @@
     "        while not self.stopped:\n",
     "            (self.grabbed, self.frame) = self.stream.read()\n",
     "            self.count()  # count FPS\n",
+    "            #cv2.waitKey(50)\n",
+    "            \n",
     "        self.stream.release()\n",
     "            \n",
     "    def read(self):\n",

+ 4 - 1
controllers/position.ipynb

@@ -115,7 +115,10 @@
     "        masked_frame = cv2.bitwise_and(src1=frame, src2=self.mask)\n",
     "\n",
     "        # Substracts background from current frame\n",
-    "        subject = cv2.subtract(masked_frame, self.background)\n",
+    "        if 'subtract' in self.cfg and self.cfg['subtract'] < 0:\n",
+    "            subject = cv2.subtract(masked_frame, self.background)\n",
+    "        else:\n",
+    "            subject = cv2.subtract(self.background, masked_frame)\n",
     "\n",
     "        # Converts subject to grey scale\n",
     "        subject_gray = cv2.cvtColor(subject, cv2.COLOR_BGR2GRAY)\n",

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 28 - 41
hippoSIT.ipynb


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 30 - 19
sandbox/tracking.ipynb