import h5py
import time
from SimpleCV import Image
recordFilename = '20130727_17h34_simpleTrack'
print recordFilename + '.hdf5'
#recordFile = h5py.File('20130722_21h53_simpleTrack.hdf5')
recordFile = h5py.File(recordFilename + '.hdf5', 'r') 
imgs = recordFile.get('image')
img = imgs[100,:,:,:]
r = img[:,:,0]
g = img[:,:,1]
b = img[:,:,2]
im = Image(img)
im.show()
time.sleep(10)


import h5py
import time
import sys
from SimpleCV import Image, Display

#recordFilename = '/media/bat/DATA/Baptiste/Nautilab/kite_project/robokite/ObjectTracking/filming_small_kite_20130805_14h03_simpleTrack.hdf5'
print('')
print('This script is used to display the images saved in hdf5 file generated by simpleTrack.py script')
print('Call the script with filename as argument, for example:')
print('  python replay.py 20130805_14h03_simpleTrack.hdf5')
print('')

recordFilename = sys.argv[1]
print ('Opening file ' + recordFilename)

recordFile = h5py.File(recordFilename, 'r') 
imgs = recordFile.get('image')
kite = recordFile.get('kite')
i_time = 0 #index of time column
t = kite[0, i_time]
img = imgs[0,:,:,:,]
s = img.shape
disp = Display((s[0]*4,s[1]*4))

for i_img in range(len(imgs[:,0,0,0])):
  dt = kite[i_img,0]-t
  time.sleep(dt)
  t = kite[i_img, 0]
  time.sleep(0.05)
  img = imgs[i_img,:,:,:]
  print(dt)
  r = img[:,:,0]
  g = img[:,:,1]
  b = img[:,:,2]
  im = Image(img)
  im.save(disp)


Increase display size Use argument for filename Make a movie from images