def run(self): firstFrame = None while True: firstFrame, img = getFrame(self.camera, firstFrame) frame = cv2.imencode('.jpg', img)[1].tobytes() yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n\r\n')
def getFrame(self): return motion.getFrame(self.est)
def getFrame(self): return motion.getFrame(self.state)