From 4e7464a736d414ae4776f051a6db793e85ad56fa Mon Sep 17 00:00:00 2001 From: HabiJung Date: Thu, 7 Oct 2021 00:41:51 +0900 Subject: [PATCH] Update path & files --- .gitignore | 154 ++++++++++++++++++ git-push.sh | 43 +++++ ftn.py => module/ftn.py | 0 cloak-v1.0.py => release/cloak-v1.0.py | 0 .../test-ftn.stackImage.py | 9 +- .../test-ftn.videoText.py | 7 +- test-hsvDetect.py => test/test-hsvDetect.py | 12 +- 7 files changed, 219 insertions(+), 6 deletions(-) create mode 100644 .gitignore create mode 100644 git-push.sh rename ftn.py => module/ftn.py (100%) rename cloak-v1.0.py => release/cloak-v1.0.py (100%) rename test-ftn.stackImage.py => test/test-ftn.stackImage.py (79%) rename test-ftn.videoText.py => test/test-ftn.videoText.py (89%) rename test-hsvDetect.py => test/test-hsvDetect.py (88%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64856bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,154 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/python,opencv +# Edit at https://www.toptal.com/developers/gitignore?templates=python,opencv + +### OpenCV ### +#OpenCV for Mac and Linux +#build and release folders +*/CMakeFiles +*/CMakeCache.txt +*/Makefile +*/cmake_install.cmake +.DS_Store + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# End of https://www.toptal.com/developers/gitignore/api/python,opencv \ No newline at end of file diff --git a/git-push.sh b/git-push.sh new file mode 100644 index 0000000..c626a77 --- /dev/null +++ b/git-push.sh @@ -0,0 +1,43 @@ +#!/usr/bin/bash +# Use only remote : origin + +REMOTE_REPO=$(git remote) +WORKING_BRANCH=$(git branch --show-current) + +echo -e "\n-> git pull ..." +echo "-> remote : ${REMOTE_REPO}" +echo "-> branch : ${WORKING_BRANCH}" + +git pull ${REMOTE_REPO} ${WORKING_BRANCH} + +echo "-> git pull complete" +echo "-> git add ..." + +git add --all + +echo "-> git add complete" +echo "-> git status" + +git status + +echo "-> git commit ..." + +if [ $# -eq 0 ]; then + read -p "-> Enter commit message : " COMMIT_MESSAGE +else + COMMIT_MESSAGE=${1} +fi + +git commit -m "${COMMIT_MESSAGE}" + +echo "-> git commit complete" +echo "-> git push ..." + +git push ${REMOTE_REPO} HEAD:${WORKING_BRANCH} + +if [ $? = 0 ]; then + echo -e "-> git push complete\n" +else + git reset --soft HEAD^ + echo "-> git push faild. Please check git error message." +fi diff --git a/ftn.py b/module/ftn.py similarity index 100% rename from ftn.py rename to module/ftn.py diff --git a/cloak-v1.0.py b/release/cloak-v1.0.py similarity index 100% rename from cloak-v1.0.py rename to release/cloak-v1.0.py diff --git a/test-ftn.stackImage.py b/test/test-ftn.stackImage.py similarity index 79% rename from test-ftn.stackImage.py rename to test/test-ftn.stackImage.py index e6b60a9..2fe0f46 100644 --- a/test-ftn.stackImage.py +++ b/test/test-ftn.stackImage.py @@ -1,9 +1,14 @@ import cv2 import numpy as np -import ftn +import sys +import os +sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) +from module import ftn -path = "car-lime.jpg" + + +path = "../car-lime.jpg" img = cv2.imread(path) kernel = np.ones((5, 5), np.uint8) diff --git a/test-ftn.videoText.py b/test/test-ftn.videoText.py similarity index 89% rename from test-ftn.videoText.py rename to test/test-ftn.videoText.py index 289810e..7cbae6d 100644 --- a/test-ftn.videoText.py +++ b/test/test-ftn.videoText.py @@ -1,7 +1,12 @@ import cv2 import numpy as np import time -import ftn +import sys +import os + +sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) +from module import ftn + device = 0 diff --git a/test-hsvDetect.py b/test/test-hsvDetect.py similarity index 88% rename from test-hsvDetect.py rename to test/test-hsvDetect.py index e20a74e..b914763 100644 --- a/test-hsvDetect.py +++ b/test/test-hsvDetect.py @@ -1,12 +1,18 @@ import cv2 import numpy as np -import ftn +import sys +import os + +sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) +from module import ftn + + + +src = "../car-lime.jpg" def onChange(pos): pass -src = "car-lime.jpg" - ''' Create HSV Trackbar ''' title = "HSV Detector"