Almost all fish possess a flow-sensing system along their body, called the lateral line, that allows them to perform various behaviours such as schooling, preying, and obstacle or predator avoidance. Inspired from this, our group has built artificial lateral lines from newly-developed flow sensors using Micro-Electro-Mechanical Systems (MEMS) technology. To make our lateral line a functional sensory system, we develop an adaptive beamforming algorithm (applying Capon's method) that provides our lateral line with the capability of imaging the locations of oscillating dipoles in a 3D underwater environment. To help our sensor arrays adapt to the environment for better performance, we introduce a self-calibration algorithm that significantly improves the image accuracy. Finally, we derive the Cramer-Rao Lower Bound (CRLB) that represents the fundamental perfomance limit of our system and provides guidance in optimizing artificial lateral-line systems.