Fundamental to any graph cut segmentation methods is the assignment of edge weights. The existing solutions typically use gaussian, exponential or rectangular cost functions with a parameter chosen in an ad-hoc fashion. We demonstrate the importance of the shape of the cost function in images of convoluted shaped objects. Our asymptotical analysis and empirical results show that the gaussian cost function outperforms the rectangular and exponential cost functions. For the gaussian cost function we construct a theoretical framework to determine the optimal value of its parameter based on the image data and shape complexity.