The perimeter of a measurable set relative to an open domain is the total variation seminorm of its indicator function there. For a smooth region it equals the Hausdorff measure of the boundary lying inside the domain. Global perimeter uses the entire space as the domain; an internal interface shared by two regions appears in both relative perimeters and must be counted only once in a segmentation energy.