In this paper, we consider local detection of a target in hyperspectral imaging and we assume that the spectral signature of interest is buried in a background which follows an elliptically contoured distribution with unknown parameters. In order to infer the background parameters, two sets of training samples are available: one set, taken from pixels close to the pixel under test, shares the same mean and covariance while a second set of farther pixels shares the same covariance but has a different mean. When the whole data samples (pixel under test and training samples) follow a matrix-variate t distribution, the one-step generalized likelihood ratio test (GLRT) is derived in closed-form. It is shown that this GLRT coincides with that obtained under a Gaussian assumption and that it guarantees a constant false alarm rate. We also present a two-step GLRT where the mean and covariance of the background are estimated from the training samples only and then plugged in the GLRT based on the pixel under test only.