algorithmic modeling for Rhino
Hi, I am trying to capture an image from a webcam video stream. The python logic is very simple:
If button pressed, store the current frame; then, output the frame that was stored.
if 'image' not in globals():
image = None
if Capture == True:
#extract an image
image = bmp
#output image
snapshot = image
The problem is that, once my button is not pressed, the frame keeps on updating even though I am not storing a new 'image' from my snapshot output. I have attached the GH example file, so that you can see what I mean.
Any help or advice would be greatly appreciated!
Thanks everyone,
Jake
Tags:
I found the solution [with the help of smart friends].
if 'image' not in globals():
image = None
if Capture == True:
#extract an image
image = bmp.CopyPixelsTo(image)
#output image
snapshot = image
Cheers,
Jake
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by