  We present a novel automatic adaptive aperture photometry algorithm for
measuring the total magnitudes of merging galaxies with irregular shapes.
First, we use a morphological pattern recognition routine for identifying the
shape of an irregular source in a background-subtracted image. Then, we extend
the shape of the source by using the Dilation image operation to obtain an
aperture that is quasi-homomorphic to the shape of the irregular source. The
magnitude measured from the homomorphic aperture would thus have minimal
contamination from the nearby background. As a test of our algorithm, we
applied our technique to the merging galaxies observed by the Sloan Digital Sky
Survey (SDSS) and the Canada-France-Hawaii Telescope (CFHT). Our results
suggest that the adaptive homomorphic aperture algorithm can be very useful for
investigating extended sources with irregular shapes and sources in crowded
regions.
