ethz-asl/kalibr — pull request #15 by pkok (2014-09-09 14:01:06+00:00)
Title: Grayscale images sometimes problem in calibration.

When the sensor_msgs/Image is converted to its numpy `ndarray`
representation, it sometimes has the shape `(n, m, 1)`. This gives an
error even though it is a `sensor_msgs::image_encodings::MONO8`.

The underlying algorithm only supports 2D arrays, and the images were
stored as 3D objects. Error:

```
TypeError: Conversion is only valid for arrays with 1 or 2
dimensions. Argument has 3 dimensions
```

Transforming the image with a reshape if and only if it has a dimension
of lenght 1 solves this problem.