# Recognize Objects with Green Classify

Distinguishing different objects under various viewing angles and lighting conditions is a common, yet difficult task. Approaches like pattern matching or color histogram comparison may be viable in certain cases. In general, however, they do not work reliably, are difficult to tune, and need to be carefully selected on a case-by-case basis by a vision expert.

In this tutorial, we will use the Green Classify Tool and its simple and intuitive interface to work on an image classification database containing 150 different objects. There are 24 images from different viewing angles for each object. The goal is to use a subset of images from each class to train, and then to test the resulting performance on the remaining, untrained images.

1. Add the images for the Classify tutorial.
2. Add a Green Classify tool.
3. Process the images (in other words, image segmentation).

4. Label the images according to the image filename, using the following regular expression: (\d*)_.*

   The images are given the following name, n_Ixcy.png, where n is the object number, composed of 1 to 3 characters, and x and y are numbers describing the incidence of light.

   We want to tag them according to the object number. To do this, we will use a regex (regular expression):

       (^.*)_.*
       select: ()
       all characters at the beginning: ^.*
       before '_': _
       and ignore the rest: .*

5. Now that the images are correctly tagged, it is possible to run the first training. Let's keep all the parameters at their default values.
6. Verify that the Training Set dialog is set to 50%.
7. Train the tool, using the images you imported.
8. Review the results. This training does not rely on cross validation data, which means that all the data used for the training is the same as that used to measure the performance. There is no indication that this training will generalize to new data.