Provide some simple quick test function for opencv
All functions are wrapped in at most one level to make learning opencv through this project easier.
put cvtool
folder to your project root path or add cvtool
to python path
(Deprecate, use setup.py)
-
clone repository
git clone https://github.com/QZLin/cvtool.git
-
install via pip
pip install -e cvtool
or
- install via pip+git
pip install git+https://github.com/qzlin/cvtool
- wrapped template match
import cv2 as cv
import cvtool
source = cv.imread('source.png')
template = cv.imread('template.png')
r: cvtool.tm.MatchResult = cvtool.tm.match(source, template, 0.9)
if r.matched:
print(r.matched, r.pos, r.similarity)