We present a fully automatic approach to recover boundary conditions and locations of the vessel wall, given a crude initial guess and some velocity cross-sections, which can be corrupted by noise. This paper contributes to the body of work regarding patient-specific numerical simulations of blood flow, where the computational domain and boundary conditions have an implicit uncertainty and error, that derives from acquiring and processing clinical data in the form of medical images. The tools described in this paper fit well in the current approach of performing patient-specific simulations, where a reasonable segmentation of the medical images is used to form the computational domain, and boundary conditions are obtained as velocity cross-sections from phase-contrast magnetic resonance imaging. The only additional requirement in the proposed methods is to obtain additional velocity cross-section measurements throughout the domain. The tools developed around optimal control theory, would then minimize a user defined cost function to fit the observations, while solving the incompressible Navier-Stokes equations. Examples include two-dimensional idealized geometries and an anatomically realistic saccular geometry description.