From f68ad63ffa86acd3ceb10a4e4375d54eb39be2bf Mon Sep 17 00:00:00 2001 From: vineelv Date: Sun, 27 Sep 2020 17:29:46 -0400 Subject: [PATCH 1/3] Rename --- Arjun:Josh Sliding window.py => Arjun-Josh Sliding window.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Arjun:Josh Sliding window.py => Arjun-Josh Sliding window.py (100%) diff --git a/Arjun:Josh Sliding window.py b/Arjun-Josh Sliding window.py similarity index 100% rename from Arjun:Josh Sliding window.py rename to Arjun-Josh Sliding window.py From 909297b28ba8ec9fd63928863bf7e1bbc8809e8b Mon Sep 17 00:00:00 2001 From: Vineel Vanam Date: Thu, 1 Oct 2020 01:27:27 -0700 Subject: [PATCH 2/3] setup file for linux --- .idea/.gitignore | 8 ++++++++ .idea/DCT-Computer-Vision.iml | 8 ++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ .idea/workspace.xml | 7 ++----- setup.sh | 10 ++++++++++ 8 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/DCT-Computer-Vision.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 setup.sh diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/DCT-Computer-Vision.iml b/.idea/DCT-Computer-Vision.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/DCT-Computer-Vision.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d1e22ec --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a3bce28 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b1509c0..6ace4ca 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -147,14 +147,11 @@ - + - + diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..17601be --- /dev/null +++ b/setup.sh @@ -0,0 +1,10 @@ +sudo snap install pycharm-professional --classic +sudo apt install python3.8 +sudo apt install python3-pip +pip3 install opencv-python +sudo apt-get install cmake +pip3 install apriltag +pip3 install matplotlib +sudo apt-get install git +read -p "Link to forked git repository? " gitrepo +git clone $gitrepo From 9dc109990e13e23c09f2a0d94982b9f82625c056 Mon Sep 17 00:00:00 2001 From: vpv2 Date: Sat, 13 Mar 2021 16:00:36 -0500 Subject: [PATCH 3/3] tester --- test.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000..74c7e05 --- /dev/null +++ b/test.py @@ -0,0 +1,30 @@ +import apriltag +import cv2 +import os +import numpy as np +# gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) +# slide a window across the image +def reader(detector, img, file_name): + tag_list = [] + global img2 + for y in range(0, img.shape[0], 350): + for x in range(0, img.shape[1], 350): + result, img2 = detector.detect(img[y:y + 450, x:x + 450], return_image=True) + if (len(result) != 0) and all(result) not in tag_list: + tag_list.append(result) + cv2.imwrite("Outputs/"+file_name+".output.jpg", img2) + return tag_list +if __name__ == '__main__': + fail = [] + detector = apriltag.Detector() + directory = "data/Track 10-22/" + for f in os.listdir(directory): + file = directory+f + print(file) + img = cv2.imread(file, cv2.IMREAD_GRAYSCALE) + tag_list = reader(detector, img, file) + if(len(tag_list)==0): + fail.append(file) + print(tag_list) + cv2.destroyAllWindows() + print(fail) \ No newline at end of file