According to an embodiment, a method for determining via an iterative training procedure, a
phase modulation function, a
spectral transmission function and a post-
processing procedure that are useable in a
hyperspectral imaging, HSI, apparatus (100) is provided, wherein the HSI apparatus (100) comprises a lens
assembly (110) comprising a diffractive optical element, DOE, (112) arranged to implement said
phase modulation function that results in a phase
delay that varies with the spatial position of an aperture of the DOE (112), an
image sensor assembly (120) arranged to receive light through the lens
assembly (110), the
image sensor assembly (120) comprising a two-dimensional,2D,
color filter array, CFA, (124) arranged on an
image sensor (122) such that the light received through the lens assembly (110) enters the image sensor (122) through the CFA (124), wherein the CFA (124) is arranged to implement said
spectral transmission function that results in a
spectral transmission that varies with a
wavelength and with a spatial position of the CFA (124); and a controller (130) comprising an image reconstruction portion arranged to derive the HS
image based on light received on the image sensor (124) via application of said post-
processing procedure that comprises an
artificial neural network, ANN, the method comprising
processing a plurality of training items through a training network (300) that represents an arrangement of the lens assembly (110), the CFA (124) and the post-processing procedure in the HSI apparatus (100) and that comprises respective training models (302, 304, 306) for determining the
phase modulation function, the spectral
transmission function and weights of the ANN, and wherein the training model (304) for determining the spectral
transmission function accounts for one or more predefined implementation constraints of the CFA (124).