9781789530643
9781789530643
9781789530643
www.packt.com
–
Packt.com
www.packt.com
customercare@packtpub.com
www.packt.com
à
authors.packtpub.com
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Appendix A
Chapter 1
www.packt.com
www.packtpub.com/support
www.packt.com
https://github.com/
PacktPublishing/Learning-OpenCV-4-Computer-Vision-with-Python-Third-Edition
https://github.com/PacktPublishing/
http://bit.ly/2STXnRN
https://static.packt-cdn.com/downloads/
9781789531619_ColorImages.pdf
CodeInText
VideoCapture VideoWriter
import cv2
import cv2
cameraCapture = cv2.VideoCapture( )
fps =
size = (int(cameraCapture.get(cv2.CAP_PROP_FRAME_WIDTH)),
int(cameraCapture.get(cv2.CAP_PROP_FRAME_HEIGHT)))
videoWriter = cv2.VideoWriter(
'MyOutputVid.avi', cv2.VideoWriter_fourcc('M','J','P','G'), fps, size)
customercare@packtpub.com
www.packtpub.com/support
https://
github.com/PacktPublishing/Learning-OpenCV-4-Computer-Vision-with-Python-Third-
Edition/issues
copyright@packt.com
authors.packtpub.com
packt.com
opencv_contrib
Chapter 4
http://opencv.org
http://docs.opencv.org/master
pip venv
pip venv
https://docs.python.org/3/library/venv.
html
venv
–
venv
pip
pip
https://www.python.org/getit/
pip
opencv_contrib pip
Chapter 6
pip
pip
https://structure.io/openni
OpenNI-Windows-x64-2.2.msi
https://visualstudio.microsoft.com/downloads/
https://cmake.org/download/
https://opencv.org/releases/
<opencv_unzip_destination>
<opencv_unzip_destination>\opencv
https://github.com/opencv/opencv_contrib/releases
opencv_contrib
<opencv_contrib_unzip_destination>
build
<opencv_unzip_destination>\opencv\CMakeLists.txt
opencv_contrib
<opencv_contrib_unzip_destination>
<opencv_unzip_destination>
<opencv_contrib_unzip_destination>
<opencv_unzip_destination>
<opencv_build_folder>/OpenCV.sln
site_packages
C:\Python37\DLLs\opencv_*.dll C:\Python37\Lib\site-
packages\opencv C:\Python37\Lib\site-packages\cv2.pyd
INSTALL OpenCV.sln
Path
;<build_folder>\install\x64\vc15\bin (for a 64-bit build)
;<build_folder>\install\x86\vc15\bin
INSTALL
C:\Python37\Lib\site-packages\cv2.pyd
Path
Path
PATH
~/.profile
PATH
opencv_contrib
opencv_contrib
Chapter 6
https://github.com/Homebrew/
brew/blob/master/docs/Formula-Cookbook.md
https://github.com/opencv/opencv/blob/master/CMakeLists.txt
apt
apt
pip
apt
apt
apt
opencv_contrib pip
Chapter 6
pip
pip