senseye_cameras package¶
Subpackages¶
- senseye_cameras.input package
- Submodules
- senseye_cameras.input.camera_ffmpeg module
- senseye_cameras.input.camera_pylon module
- senseye_cameras.input.camera_raw_video module
- senseye_cameras.input.camera_ueye module
- senseye_cameras.input.camera_usb module
- senseye_cameras.input.input module
- senseye_cameras.input.input_factory module
- senseye_cameras.input.microphone module
- Module contents
- senseye_cameras.output package
Submodules¶
senseye_cameras.loop_thread module¶
-
class
senseye_cameras.loop_thread.
LoopThread
(frequency=1000, stop_on_error=False)[source]¶ Bases:
threading.Thread
Class to follow common pattern of looping thread
-
restart
()[source]¶ Restart at thread Seperated from start / stop because thread functions like join / is alive May return unexpected results from this
-
run
()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
senseye_cameras.reader module¶
senseye_cameras.safe_queue module¶
-
class
senseye_cameras.safe_queue.
SafeQueue
(maxsize=0, module='Generic')[source]¶ Bases:
queue.Queue
Class that extends Python Queue to safely handle exceptions from Queue accessor methods.
-
get
(block=True, timeout=None)[source]¶ Attempt to retrieve an element from the queue, handling the Empty exception if it arises. Returns the item or None if dequeue is unsuccessful.
Note: It is possible that a None object was enqueued. Checking for a None value on a get() call will be ambiguous in this case. It may mean the original item was None or that the queue is empty.
-
put
(item, block=True, timeout=None, force=False)[source]¶ Attempt to insert an item into the queue, handling the Full exception if it arises. Return True if item is successfully enqueued. If a force was required, return the dequeued item.
-
remove_existing
(num_elements=None)[source]¶ Pops items from self queue and appends to a list. Mutates self queue by removing qsize elements.
Note: If you force an item to be input into the queue during this operation, you may clobber data. For example: - SafeQueue size is 10 when remove_existing() is called - SafeQueue maxsize is 10 - SafeQueue.put_nowait(an_item, force=True) - The first item is forced off, and may not have been grabbed into the list. - Using a mutex here may cause a deadlock.
-
senseye_cameras.stream module¶
-
class
senseye_cameras.stream.
Stream
(input_type='usb', input_config=None, id=0, output_type='ffmpeg', output_config=None, path='.', input_frequency=None, output_frequency=None, reading=False, writing=False, on_read=None, on_write=None, queue_size=700)[source]¶ Bases:
object
Links an Input with an Output.
- Args:
- input_type/input_config/id: see create_input. output_type/output_config/path: see create_output reading/writing (bool): whether to read/write on start. on_read (func): called on frame read. Function should take fn(data=None, timestamp=None) as args. on_read/on_write (func): called on frame write. Function should take fn(data=None)
senseye_cameras.writer module¶
-
class
senseye_cameras.writer.
Writer
(q, on_write=None, type='ffmpeg', config=None, path=0, frequency=None, writing=False, input_config=None)[source]¶ Bases:
senseye_cameras.loop_thread.LoopThread
Writes data from a queue into an output file.
Module contents¶
Senseye Camera Utility Package.
- abstractions:
- camera - a video/camera interface that produces frames. recorder - an interface that takes in frames and writes them to disk.
create a camera/recorder through the create_camera/create_recorder functions.