c   - find cost of ellipse in opencv