By using the most sensitive two-point correlation functions introduced to date, we reconstruct the microstructures of two-phase random media with heretofore unattained accuracy. Such media arise in a host of contexts, including porous and composite media, ecological structures, biological media, and astrophysical structures. The aforementioned correlation functions are special cases of the so-called canonical n-point correlation function H(n) and generalize the ones that have been recently employed to advance our ability to reconstruct complex microstructures [Y. Jiao, F. H. Stillinger, and S. Torquato, Proc. Natl. Acad. Sci. 106, 17634 (2009)]. The use of these generalized correlation functions is tantamount to dilating or eroding a reference phase of the target medium and incorporating the additional topological information of the modified media, thereby providing more accurate reconstructions of percolating, filamentary, and other topologically complex microstructures. We apply our methods to a multiply connected "donut" medium and a dilute distribution of "cracks" (a set of essentially zero measure), demonstrating improved accuracy in both cases with implications for higher-dimensional and biconnected two-phase systems. The high information content of the generalized two-point correlation functions suggests that it would be profitable to explore their use to characterize the structural and physical properties of not only random media, but also molecular systems, including structural glasses.