Taking video and picture with opencv