  We combine extinction maps from the Two Micron All Sky Survey (2MASS) with
Hipparcos and Tycho parallaxes to obtain reliable and high-precision estimates
of the distance to the Ophiuchus and Lupus dark complexes. Our analysis, based
on a rigorous maximum-likelihood approach, shows that the rho-Ophiuchi cloud is
located at (119 +/- 6) pc and the Lupus complex is located at (155 +/- 8) pc;
in addition, we are able to put constraints on the thickness of the clouds and
on their orientation on the sky (both these effects are not included in the
error estimate quoted above). For Ophiuchus, we find some evidence that the
streamers are closer to us than the core. The method applied in this paper is
currently limited to nearby molecular clouds, but it will find many natural
applications in the GAIA-era, when it will be possible to pin down the distance
and three-dimensional structure of virtually every molecular cloud in the
Galaxy.
