X-ray microtomography has become an essential tool for investigating the mechanical and physical properties of snow, which are tied to its microstructure. To allow a quantitative characterization of the microstructure, the grayscale X-ray attenuation coefficient image has to be segmented into a binary ice/pore image. This step, called binary segmentation, is crucial and affects all subsequent analysis and modeling. Common segmentation methods are based on thresholding. In practice, these methods present some drawbacks and often require time-consuming manual post-processing. Here we present a binary segmentation algorithm based on the minimization of a segmentation energy. This energy is composed of a data fidelity term and a regularization term penalizing large interface area, which is of particular interest for snow where sintering naturally tends to reduce the surface energy. The accuracy of the method is demonstrated on a synthetic image. The method is then successfully applied on microtomographic images of snow and compared to the threshold-based segmentation. The main advantage of the presented approach is that it benefits from local spatial information. Moreover, the effective resolution of the segmented image is clearly defined and can be chosen a priori.