The following method was used to extract contours around different intensity values. All the pixel values greater than the desired value of contour intensity were set to one, and the values less than the desired contour intensity value were set to zero. This divided the image into two groups, where one group contained the pixels having intensity higher than the desired contour intensity and the second group contained the pixels having intensity lower than the desired contour intensity. Now, all the pixels having the value of one that were surrounded by at least one pixel of value zero were retained and all the other pixels were discarded. The only pixels that remained were the pixels at the boundaries of the groups constructing contours around the desired intensity value. The pixel coordinates were stored in a file.
Figure 7 shows examples of contours generated using the method described above. Each example contains one of the 50 contours generated for different intensity values for an elliptical galaxy (NGC 4374) and a spiral galaxy (NGC 4303).