The freshness of rainbow trout is one of the most important quality parameters to attract customers. Common
methods to detect fish freshness are usually subjective to the skill of a quality evaluator and are time consuming
and destructive. Therefore, an automatic, nondestructive, accurate and quick method is needed. Hyperspectral
imaging has demonstrated its efficiency in the meat and fish industries for quality control purposes. This method
is nondestructive, fast and automatic. In this study, two setups for hyperspectral imaging named “Visible–Near
Infrared” (Vis–NIR) and “Short Wave Infrared” (SWIR) are used to determine fish freshness. Eighty fresh rainbow
trouts were divided into four batches which were separately preserved in ice for 1, 3, 5 and 7 days, respectively.
Principle Component Analysis (PCA) and Partial Least Squares-Discriminate Analysis (PLS-DA) were used as
unsupervised and supervised techniques for the evaluation of rainbow trout freshness. Results obtained by
PCA technique indicated that four classes of samples can be detected using the Vis–NIR mean spectrum by applying a second derivative (D2) preprocessing method. The RCV
2 and RPre with D2 preprocessing were 0.97 and 0.98
for Vis–NIR and 0.84 and 0.67 for SWIR, respectively. The corresponding values of RMSECV and RMSEPre were 0.16
and 0.14 in Vis–NIR and 0.44 and 0.76 in SWIR, respectively. Classification model achieved an overall correct
classification of 100% and 75% for Vis–NIR and SWIR, respectively. The obtained results using both PCA and
PLS-DA methods indicated that the Vis–NIR imaging system performs better than SWIR. Among all applied
preprocessing techniques, the second derivative preprocessing achieved the best performance.