$p$,$q$ are two different distributions, $\mu_p$ is the mean of the $p$-th distribution, $\sigma^2_p$ is the variance of the $p$-th distribution. The Bhattacharyya distance between p and q distributions or classes: $$ D_B(p,q) = \frac{1}{4} ln \left(\frac{1}{4}\left(\frac{\sigma^2_p}{\sigma^2_q} + \frac{\sigma^2_q}{\sigma^2_p}+2\right)\right)+\frac{1}{4}\left(\frac{(\mu_p-\mu_q)^2}{\sigma^2_p+\sigma^2_q}\right)$$
$p_i = N(\mu_i,\Sigma_i)$, the Bhattacharyya distance: $$D_B = \frac{1}{8} (\mu_1-\mu_2)^T \Sigma^{-1}(\mu_1-\mu_2)+\frac{1}{2} ln \left( \frac{det \Sigma}{\sqrt{det \Sigma_1 det \Sigma_2}} \right)$$ where, $\mu_i$ and $\Sigma_i$ are the means and covariances of the distributions, and $\Sigma = \frac{\Sigma_1+\Sigma_2}{2}$.