Automated Visual Inspection (AVI) systems are nowadays considered essential in the assembly of Surface Mounted Devices (SMD). The general goal of this research centers on developing self-training AVI systems for the inspection of SMD components. In this paper, it is proposed a new feature selection methodology based on a stepwise variable selection. The procedure uses an estimation of the marginal Misclassification Error Rate (MER) as the figure of merit to introduce new features in the quadratic classifier used by the inspection system. This marginal error rate is estimated by using the densities of the conditional stochastic representations of the underlying quadratic discriminant function. In this paper we show that the application of the proposed methodology to the inspecting of SMD components results in significant savings of computational time in the estimation of classification error over the traditional simulation and crossvalidation methods.