A method for generating inflow conditions for direct numerical simulations (DNS) of spatially-developing flows is presented. The proposed method is based on variational data assimilation and adjoint-based optimization. The estimation is conducted through an iterative process involving a forward integration of a given dynamical model followed by a backward integration of an adjoint system defined by the adjoint of the discrete scheme associated to the dynamical system. The approach's robustness is evaluated on two synthetic velocity field sequences provided by numerical simulation of a mixing layer and a wake flow behind a cylinder. The performance of the technique is also illustrated in a real world application by using PIV measurements to acquire the database. This method allows to denoise experimental velocity fields and to reconstruct a continuous trajectory of motion fields from discrete and unstable measurements.