bioidiap/xbob.flandmark — pull request #1 by ties (2013-06-12 15:37:45+00:00)
Title: Localizer.__call__ fails for grayscale images

When an `Localizer` is called with a grayscale image as input, the method fails due to a unbound variable.

```pytb
Traceback (most recent call last):
File "dataset_utils_bob.py", line 55, in
located = processor(input_item)
File "/home/kockt/.virtualenvs/ml/local/lib/python2.7/site-packages/xbob/flandmark/__init__.py", line 87, in __call__
return super(Localizer, self).__call__(gray)
UnboundLocalError: local variable 'gray' referenced before assignment
```

##### reproduction steps
Make sure that `input0.jpg` refers to a color picture and run the following script;
```python
import bob
from bob.ip import rgb_to_gray
from xbob import flandmark

# any color image
im_color = bob.io.load("input0.jpg")

processor = flandmark.Localizer()

# succeeds
processor(im_color)

#fails
processor(rgb_to_gray(im_color))
```

This pull request contains a fix for the cause, which is a small typo.

I did not add a test case using `rgb_to_gray` to the unit test, because I'm have not run them on my machine.