An extraction method of moving objects by shape energy functions with prior knowledge