diff --git a/README.md b/README.md index 0c31e71..5325753 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # opencv-tutorial +**Please note: This repository is now archived and will no longer be updated or maintained.** + This is an introduction to object-oriented Programming (OOP) to OpenCV. -Check-out the online documentation: https://opencv-tutorial.readthedocs.io \ No newline at end of file +Check-out the online documentation: https://opencv-tutorial.readthedocs.io diff --git a/docs/intro/intro.rst b/docs/intro/intro.rst index 26a6d26..7d6b7d6 100644 --- a/docs/intro/intro.rst +++ b/docs/intro/intro.rst @@ -95,6 +95,8 @@ and then loop back. The loop finishes when **q** is pressed:: while True: # Capture frame-by-frame ret, frame = cap.read() + if not ret: + break # Our operations on the frame come here gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) @@ -344,4 +346,4 @@ Mouse callback:: cb(evt, x, y, flags, param) cv.createTrackbar('name', 'win', 0, max, cb) - cv.getTrackbarPos('name', 'win') \ No newline at end of file + cv.getTrackbarPos('name', 'win') diff --git a/docs/intro/intro2.py b/docs/intro/intro2.py index df242c7..6adb8ec 100644 --- a/docs/intro/intro2.py +++ b/docs/intro/intro2.py @@ -6,6 +6,8 @@ while True: # Capture frame-by-frame ret, frame = cap.read() + if not ret: + break # Our operations on the frame come here gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) @@ -17,4 +19,4 @@ # When everything done, release the capture cap.release() -cv.destroyAllWindows() \ No newline at end of file +cv.destroyAllWindows()