Disclosed is a pain detection system and method. Preferred methods include capturing imaging data from patient using functional near-infrared spectroscopy. In methods of the invention, pain may be assessed from a non-responsive patient. Preferred methods may further include measuring hemodynamic parameters using the optical imaging data and averaging the measured hemodynamic parameters to reduce background noise. Additionally, a pattern in the averaged hemodynamic parameters is identified and the pattern is compared to a predetermined associated with patient pain. The method further includes detecting, by the processor, a similarity between the pattern and the predetermined pattern and outputting a signal indicating patient pain.