Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grayscale images sometimes problem in calibration. #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 9, 2014

  1. 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.
    Patrick de Kok committed Sep 9, 2014
    Configuration menu
    Copy the full SHA
    2c209c1 View commit details
    Browse the repository at this point in the history