A commutator is an important and very sensitive part of the commutator electric motor. Located on the motor axis, it periodicaly changes the direction of the electric current, enabling the motor to run. For this reason, the quality of commutator production is crucial for the quality of the electric motor. Manual quality control is time-consuming and unreliable, therefore it is reasonable to introduce automated quality control in the key steps of commutator production. The graphite commutator consists of two main parts, a metalized graphite disc and a copper base. One of the crucial steps in graphite commutator production is soldering of these parts. This thesis deals with the development of an embedded application for automated inspection of the commutator quality after soldering of the metalized graphite disc and the copper base. The goal of the application is to detect four types of defects occurring during the soldering process. Methods of machine vision are used first to acquire attributes from the commutator images. From these attributes decision trees are then constructed through machine learning that make it possible to determine defects on commutators. Finally, other learning methods are tested and their results compared with the results of decision trees.