I want to take a photo when the user press 's'. This is my code and I don't find why it's wrong.
import cv
import sys
win = 'Camera'
cv.NamedWindow(win)
cap = cv.CreateCameraCapture(0)
while cv.WaitKey(1) != 27:
img = cv.QueryFrame(cap)
cv.ShowImage(win, img)
if cv.WaitKey(10) == 115:
cv.SaveImage('test1.jpg', img)
The mistake said:
File "dos.py", line 14 cv.SaveImage('test1.jpg', img) ^ IndentationError: expected an indented block