Aug-20-2017, 05:54 PM
(This post was last modified: Aug-20-2017, 05:54 PM by andrea0913.)
I'm doing image processing with cv2, and i need to replace the background every 30 seconds during 2 minutes. The background will be something like a photo of the current chroma.
def Foto(): cv2.imwrite("Fondo1.jpg",entrada4) entrada = cv2.imread("Fondo1.jpg") .... t = threading.Timer(3.0,Foto) t.start()I think the problem is i'm defining "entrada" at the begining of my code but also defining "entrada" in the funtion Foto()
entrada = cv2.imread("Fondo.jpg") def Foto(): cv2.imwrite("Fondo1.jpg",entrada4) entrada = cv2.imread("Fondo1.jpg") .... t = threading.Timer(3.0,Foto) t.start()I need every 30 seconds it rewrites the image "fondo1" and replace "entrada" with that image. Like taking a photo of what the chroma is showing and change the background witht the photo.