Published online by Cambridge University Press: 05 March 2013
Detection of cosmic-ray hits is important because of their disturbing effects on image processing. An algorithm based on gray-scale morphology to detect cosmic-rays in single spectroscopic CCD images is presented in this paper. Based on the morphological differences between cosmic-ray hits and spectra, the operations of erosion and dilation are used to deal with images successively, with appropriate structuring elements. Points of cosmic-ray hits can be detected by analyzing the variation between data pre- and post-operation. Examples of the algorithm are given at the end of this paper, with several groups of both simulated LAMOST images and observed SDSS images to show its performance.