A method capable of obtaining a fluorescence image and a background image with a simple configuration. A color image is obtained, when excitation light is emitted on a subject, by imaging excitation light reflected from the subject and fluorescence emitted from the subject. Thereafter, an estimated spectral image that includes a background image representing the excitation light and a fluorescence image representing the fluorescence is generated by allocating a wavelength component of the excitation light and a wavelength component of the fluorescence included in the obtained color image to different primary color components.