Devices

All classes associated with iteration over values measured by sensors

class ShutTUM.devices.StereoCamera(sequence, shutter)[source]

A stereo camera consists of a left and a right camera facing both in the same direction. Both cameras have the same shutter method, so either rolling or global. If you iterate over a stereo camera you go through all the StereoImage in order:

# You can use a "classic" for loop ... 
for stereo in sequence.cameras('global'):
    print(stereo.stamp)

# Or filter/map functions ...
stereo = filter(lambda item: item.ID == 2, sequence.cameras('rolling'))
print(list(stereo))

# Or even list & dict comprehensions
stereo = [ image.stamp for image in sequence.cameras('rolling') if image.ID == 2]
print(stereo)
class ShutTUM.devices.DuoStereoCamera(sequence)[source]

A duo stereo camera consists of a two StereoCamera s each with a left and a right one. Both stereo cameras use usually (but not necessarily) different shutter methods. If you iterate over a duo stereo camera you go get a tuple with both StereoImage s in order:

# You can use a "classic" for loop ... 
for stereo_global, stereo_rolling in sequence.cameras():     # both is the default
    print(stereo_global.shutter)
    print(stereo_rolling.shutter)