We present a new approach for a surface characterization based on the TIE method combined with the SEM. Experimental verification is carried out on the example of characterization of a crater on the surface of monocrystalline silicon (111). The approach is universal and can be used for any opaque object. It improves the robustness and stability of the quantitative phase retrieval process and has two important features. Firstly, it allows one to quantitatively retrieve the phase in a region of arbitrarily chosen dimensions. Secondly, phase retrieval process does not require the choice of boundary conditions.