Abstract An automatic approach for the generation of moment invariants is presented. By making use of this approach a complete set of moment invariants is generated, many of which have never been reported in the literature. This approach will guarantee not to miss any possible expression that may be useful for pattern recognition. Consequently, the generated sets of moment invariants, including higher-order moments, have been used for the recognition of English alphabets. We also include the results of our study on selecting the best set of weighting factors for invariant moments, such that we have improved the recognition rates to over 98.8%.