  Autonomous flight of pocket drones is challenging due to the severe
limitations on on-board energy, sensing, and processing power. However, tiny
drones have great potential as their small size allows maneuvering through
narrow spaces while their small weight provides significant safety advantages.
This paper presents a computationally efficient algorithm for determining
optical flow, which can be run on an STM32F4 microprocessor (168 MHz) of a 4
gram stereo-camera. The optical flow algorithm is based on edge histograms. We
propose a matching scheme to determine local optical flow. Moreover, the method
allows for sub-pixel flow determination based on time horizon adaptation. We
demonstrate velocity measurements in flight and use it within a velocity
control-loop on a pocket drone.
