Object Classification using LEGO Mindstorms NXT and MATLAB
MetadataShow full item record
- Studentoppgaver (TN-IDE) 
This master thesis involves further development of the physical sorter system that was developed in the preliminary project (MIK110). The system is built up by LEGO Technic parts and is controlled by MATLAB and LEGO Mind- storms NXT. The system basically consist of a conveyor belt, a sorter arm, a web camera and control system (MATLAB). The conveyor belt transfers desired objects from one end to the other and are controlled by a servo. The sorter arm can push a object off the conveyor belt and into a tray. The sorter arm is also controlled by a servo. Both servos are connected to the NXT Intelligent Brick (NXT). The web camera detect objects moving on the con- veyor belt. This web camera is connected to a computer running MATLAB. MATLAB runs the system (connected to NXT) and manages the handling of detected objects. To get MATLAB and LEGO Mindstorms NXT to in- teract, a toolbox called RWTH Toolbox is implemented. All computational task are handled in MATLAB. The web camera is controlled by a function called MOD. This function enables the web camera to capture one frame at a time. To detect movement from one frame to another a method called background subtraction (BS) is used. Since MOD is intended to only detect moving objects and not the movement of the conveyor belt, which creates a dynamic background, a method called background modeling (BM) is implemented. The BM method creates a model of the background and slowly updates the model when a new frame is captured. This method suppresses movement and illumination/reflection from the conveyor belt which can produce false positive detections. The frame containing the object of interest (OOI) is then pre processed by a function called ooi. This function is solely based on mathematical morphology and uses this to register, extract and represent the OOI. Representation includes both internal (area) and external (boundary/signature) character- istics, and these are used as features to describe the object. From a object, four different features are computed and they are the area, the mean and standard deviation computed from the signature and the amount of ver- tices/peaks in the signature. All features are gathered in a feature vector X and all features are normalized. There are two different objects that the system have to detect. These are two different types of LEGO Technic gears. Both have 24 teethes, but one gear is crowned and the other is normal. The features collected from these objects are very much a like. A classifier is implemented in the system to distinguish between these two objects and solve this 2-class problem. A method called Cross validation was used in the experiments to find the best classifier. The cross validation was performed on a three different classifiers which were based on Maximum Likelihood (ML) estimation, the Parzen Window technique and kn-nearest-neighbor (kNN) technique. The data set (consisting of gathered feature vectors from both objects) that each classifier was trained on, was 2-, 3- and 4-dimensional for each experiment. Also, in each experiment, raw and normalized data was used. The classifier that was implemented in the system, based on the results from the cross validation, was the kNN classifier for normalized 4-dimensional data. From the cross validation results, this classifier had a error rate of 6.43%, but this error rate is affected by illumination. Experiments showed that the error rate varies between 3 and 10% when the classifier was imple- mented in the system and new feature data was gathered. On YouTube there is a short video demonstration of the system when it is running. The clip can be found via this URL: http://www.youtube.com/ watch?v=AAGNuTu7Tfk&feature=plcp.
Master's thesis in Information technology