Component analysis of chemical mixtures using terahertz spectroscopic imaging