Open hallahan opened 10 years ago
Hi Charlie,
I'm attempting to go through your tutorial in the README, and the initial avgimg.py scrip tis not working:
vagrant@precise64:/vagrant$ python avgimg.py raws/* avg.png Averaging 30 images in ['raws/RRGlobal_r06c22.2012336.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012337.terra.1km.jpg', 'raw s/RRGlobal_r06c22.2012338.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012339.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012340.te rra.1km.jpg', 'raws/RRGlobal_r06c22.2012341.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012342.terra.1km.jpg', 'raws/RRGlobal _r06c22.2012343.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012344.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012345.terra.1km.jp g', 'raws/RRGlobal_r06c22.2012346.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012347.terra.1km.jpg', 'raws/RRGlobal_r06c22.20 12348.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012349.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012350.terra.1km.jpg', 'raws/ RRGlobal_r06c22.2012351.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012352.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012353.terr a.1km.jpg', 'raws/RRGlobal_r06c22.2012354.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012355.terra.1km.jpg', 'raws/RRGlobal_r 06c22.2012356.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012357.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012358.terra.1km.jpg' , 'raws/RRGlobal_r06c22.2012359.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012360.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012 361.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012362.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012363.terra.1km.jpg', 'raws/RR Global_r06c22.2012364.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012365.terra.1km.jpg'] Traceback (most recent call last): File "avgimg.py", line 49, in <module> if img.size != (avg.shape[1], avg.shape[0]): IndexError: tuple index out of range
When I comment out the else: block, I still get an index issue:
else:
vagrant@precise64:/vagrant$ python avgimg.py raws/* avg.png Averaging 30 images in ['raws/RRGlobal_r06c22.2012336.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012337.terra.1km.jpg', 'raw s/RRGlobal_r06c22.2012338.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012339.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012340.te rra.1km.jpg', 'raws/RRGlobal_r06c22.2012341.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012342.terra.1km.jpg', 'raws/RRGlobal _r06c22.2012343.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012344.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012345.terra.1km.jp g', 'raws/RRGlobal_r06c22.2012346.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012347.terra.1km.jpg', 'raws/RRGlobal_r06c22.20 12348.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012349.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012350.terra.1km.jpg', 'raws/ RRGlobal_r06c22.2012351.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012352.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012353.terr a.1km.jpg', 'raws/RRGlobal_r06c22.2012354.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012355.terra.1km.jpg', 'raws/RRGlobal_r 06c22.2012356.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012357.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012358.terra.1km.jpg' , 'raws/RRGlobal_r06c22.2012359.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012360.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012 361.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012362.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012363.terra.1km.jpg', 'raws/RR Global_r06c22.2012364.terra.1km.jpg', 'raws/RRGlobal_r06c22.2012365.terra.1km.jpg'] Traceback (most recent call last): File "avgimg.py", line 56, in <module> print 'Main loop: %s pixels per second.' % ((n * avg.shape[1] * avg.shape[0]) / (time.time() - start)) IndexError: tuple index out of range
Any ideas?
Looks like avg.shape doesn’t have 0 or 1 indexes, which likely means it isn’t set at all, which in turn suggests that images aren’t being loaded properly.
avg.shape
Hi Charlie,
I'm attempting to go through your tutorial in the README, and the initial avgimg.py scrip tis not working:
When I comment out the
else:
block, I still get an index issue:Any ideas?