Teaching data setting apparatus and a method for image processing are provided to enable setting optimum teaching data to achieve reduction in errors and error detection in the image processing. A subject teaching data generating section 1 uses databases of subject attributes and recognition operation conditions for a plurality of pieces of teaching data representing all possible combinations of the subject attributes and the recognition operation conditions. A teaching data candidate selecting section 2 selects, from the generated plurality of pieces of teaching data, teaching data candidates related to a subject to be mounted and a mounting machine for use. A subject image input section 3 is supplied with a simple subject image representing only the subject. An evaluation image generating section 4 generates predetermined evaluation images by using the simple subject image. A teaching data determining section 5 is supplied with the teaching data candidates and the evaluation images to compare and study both of them, and then determines a piece of teaching data as the optimum teaching data for the subject for output.