Raspberry PI Chessboard Camera: Difference between revisions
Jump to navigation
Jump to search
(→Test) |
(→Test) |
||
| Line 67: | Line 67: | ||
============================== 2 passed in 3.87s =============================== | ============================== 2 passed in 3.87s =============================== | ||
</source> | |||
=== Preview === | |||
<source lang='python'> | |||
import cv2 | |||
cap = cv2.VideoCapture(0) | |||
while(True): | |||
# Capture frame-by-frame | |||
ret, frame = cap.read() | |||
# Our operations on the frame come here | |||
#gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) | |||
# Display the resulting frame | |||
cv2.imshow('Camera',frame) | |||
if cv2.waitKey(1) & 0xFF == ord('q'): | |||
break | |||
# When everything done, release the capture | |||
cap.release() | |||
cv2.destroyAllWindows() | |||
</source> | |||
start the above code - stop by pressing 'q' | |||
<source lang='bash' hightlight='1'> | |||
python3 preview.py | |||
</source> | </source> | ||
Revision as of 14:20, 15 October 2019
Parts List
| # | picture | part | example sources | documents | ~ price |
|---|---|---|---|---|---|
| 1 | https://www.schachversand-ullrich.de/media/image/d3/fb/c5/Brett-Bundesliga_200x200.jpg | Chessboard | Wikipedia | 25 € | |
| 2 | https://www.schachversand-ullrich.de/media/image/37/70/16/Bundesliga57f787924d743_200x200.jpg | Chess pieces | Wikipedia | 25 € | |
| 3 | Raspberry PI | Wikipedia | 45 € | ||
| 4 | Web Camera | Raspberry PI compatibility list (german) | 60 € | ||
| 5 | USB Powerbank | 15 € | |||
| 6 | 16 GByte Micro SD Card | 5 € |
Pictures
Installation
see
- Raspberry_PI for Raspberry PI software installation
- Raspberry PI WebCam for the WebCam installation.
CV_Chess
Trying out the CV_Chess project from https://classes.engineering.wustl.edu/ese205/core/index.php?title=CV_Chess Fork of it at:
Installation
git clone https://github.com/WolfgangFahl/ESE205-CVChess/
./installOpenCV
./install
Test
./test
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.2.1, py-1.8.0, pluggy-0.13.0
rootdir: /home/wf/source/python/ESE205-CVChess
collected 2 items
test_camera.py . [ 50%]
test_webcam.py . [100%]
============================== 2 passed in 3.87s ===============================
Preview
import cv2
cap = cv2.VideoCapture(0)
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
#gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('Camera',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
start the above code - stop by pressing 'q'
python3 preview.py
