Calculating a homography based on detected lines
I will explain two approaches for this:

1)
One approach would require a line matching algorithm. After matching the lines, you could simply use the end points of the lines in order to compute homography. To achieve that EDLine or LSD based descriptors are recently proposed in OpenCV. Also, hashing and fast matching of them are also implemented. Check out the videos here:

http://www.youtube.com/watch?v=MqMjvSkM39k

http://www.youtube.com/watch?v=naSWTlbg3To

The recent opencv_contrib repository contains the source code to these methods.  

In the case that the line end points are noisy, you could then directly utilize the lines to compute the homographies. Such papers would then read:


  Internal Report: 2005-V04 Computing Homographies from Three Lines or
  Points in an Image Pair
  G. Lopez-Nicolas, J.J. Guerrero, O.A. Pellejero, C. Sagues
  
  Internal Report: 2003-V01 Robust line matching and estimate of homographies simultaneously G. Lopez-Nicolas
  
  Probabilistic Matching of Lines for Their Homography Taemin Kim, Jihwan Woo, and In So Kweon


2) There is one method specific to the fields are given here:


  "Using line and ellipse features for rectification of broadcast hockey video.", Gupta, Ankur, James J. Little, and Robert J. Woodham
  Computer and Robot Vision (CRV), 2011 Canadian Conference on. IEEE,
  2011.


and


  "Combining line and point correspondences for homography estimation.", Dubrofsky, Elan, and Robert J. Woodham. International Symposium on Visual Computing. Springer Berlin Heidelberg, 2008.


The idea is as follows: Any line, parametrized by its coefficients $\mathbf{l}_i=(u,v,1)^T$ maps to $\mathbf{l}_i^{'}=(x,y,1)^T$ in the other image using:

$$
\mathbf{l}_i^{'} = \mathbf{H}^T \mathbf{l}_i
$$

In this form the equation can be directly plugged into the DLT method: 

$$
A_i =
\begin{bmatrix}
-u &amp; 0 &amp; ux &amp; -v &amp; 0 &amp; vx &amp; -1 &amp; 0 &amp; x  \\
0 &amp; -u &amp; uy &amp; 0 &amp; -v &amp; vy &amp; 0 &amp; -1 &amp; y 
\end{bmatrix}
$$

The only difference is the normalization, which you will find in the references above. 

Adding Ellipses:
Any point $x$ lies on the conic section $C$ if $x^TCx=0$. This gives rise to the transformation relation:

$$
C' = H^{-T}CH^{-1}
$$

The references above also explain how to insert this constraint to the DLT algorithm. 

Using ellipses and lines, it is possible to derive a robust projective relationship.