nanophotonics / nplab

Core functions and instrument scripts for the Nanophotonics lab experimental scripts
GNU General Public License v3.0
38 stars 15 forks source link

Capture frames from video #17

Closed rwb27 closed 9 years ago

rwb27 commented 9 years ago

Camera now helpfully pulls frames from the video stream (when it's streaming) rather than taking an out-of-band frame. There's synchronisation logic in there to make sure the frame we return is fresh (i.e. calling it multiple times quickly gets unique images, unlike simply returning self.latest_frame).

This behaviour can be disabled by setting video_priority to false (or by turning off live view).

color_image and gray_image now use get_image rather than raw_snapshot. get_image is equivalent to raw_snapshot when video_priority is False.