A Dynamic Programming based Optical Flow technique has been applied to the Particle Image Velocimetry (PIV) problem. It has been tested for the search of two-component (using one camera) and three-component (using two or three cameras) planar velocity fields corresponding to a region illuminated by a laser light sheet. Tests have been carried out on calibrated synthetic image sequences from the PIV Standard Project of the Visualization Society of Japan (VSJ). Results are presented for the 2D flow field based sequences (VSJ test sets 01 to 08) and the 3D flow field based sequences (VSJ test sets 301, 302, 331 and 337). Accuracy is within the 2-3 % range and within the 3-5 % range for the two-component and the three-component flow field recovery respectively.