Raspberry Pi Section-4
Raspberry Pi Section-4
2
Installing OpenCV
• Open terminal and install OpenCV dependencies
4
Image operation
• Accessing Pixel by Pixel
>>> px = img[100,100]
>>> print px
[157 166 200]
Import cv2
Cap = cv2.VideoCapture(0)
While True :
ret, img= cap.read()
if ret :
cv2.imshow(“Feed”, img)
k = waitkey(100)
if k == 27 :
Break
cap.release()
cv2.destroyAllWindows()
7
End Section - 4
Any Questions ???