To manage, sort, and grade fishery resources, it is necessary to measure their morphometric characteristics. This labor-intensive task involves performing repetitive operations on land and on a research vessel. To reduce the amount of labor required, a vision-based automatic measurement system (VAMS) for the measurement of morphometric characteristics of flatfish, such as total length (TL), body width (BW), and body height (BH), has been developed as part of a database management system for fishery resources management. This system can also measure the mass (M) of flatfish. In the present study, we describe a morphological image processing algorithm for the measurement of certain characteristics of flatfish. This algorithm, which involves preprocessing, edge pattern matching, and edge point detection, is effective in cases where the flatfish being measured has a deformed tail and is randomly oriented. The satisfactory performance of the proposed algorithm is also demonstrated by means of experiments involving the measurement of the BW, TL and BH of a flatfish when it is straightened (BW : 117mm, TL : 329mm, BH : 24.5mm), when its tail is deformed, and when it is randomly oriented.