Ultrasound Image Segmentation Based on Energy Functional