def switch_camara(self):
self.activo = not self.activo
if self.activo:
# Capturo el primer frame para quedarme con el tamano y el factor de resize
ret,frame = self.cap.read(self.camera_id)
self.activo = ret
if ret:
self.img_height, self.img_width, self.img_channels = frame.shape
self.img_zoomx = 320.0/self.img_width
self.img_zoomy = 200.0/self.img_height
# Ya tengo los datos. Capturo la imagen final y me quedo con el frame
self.captura_frame()
else:
self.status = "No puedo encontrar la camara"
print "No encuentro la camara!!!!"
评论列表
文章目录