Skip to content

Documentation error: skimage.feature.graycomatrix, relationship between pixels #7919

Open

Description

@g2rob

Description:

Documentation and comment writes:

Compute 4 GLCMs using 1-pixel distance and 4 different angles. For example, an angle of 0 radians refers to the neighboring pixel to the right; pi/4 radians to the top-right diagonal neighbor; pi/2 radians to the pixel above, and so forth

0 rad refer to the right pixel --> OK
pi/4 radians to the top-right diagonal neighbor -->no, it refers to bottom right
pi/2 radians to the pixel above --> no, it refers to bottom

Means the rotation direction is clockwise, which is unusual. Possibly an error in the code....

Behaviour is different to Matlab:
https://de.mathworks.com/help/images/ref/graycomatrix.html

Way to reproduce:

No response

Version information:

Activity

  1. lagru commented on Nov 10, 2025

    @lagru
    Member

    Thanks for the feedback @g2rob. This was added in #7297, it could very well be that we mixed up something.

    That said, could you clarify what you think is the error here?

    • Do you think that the documentation doesn't match the code's behavior?
    • Do you think that the documentation matches the code, but the behavior is different from Matlab?
  2. added
    ❓ Needs info
    and removed
    ❓ Needs info
    on Nov 10, 2025
  3. g2rob commented on Nov 14, 2025

    @g2rob
    Author

    Hi lagru,
    the documentation doesn't match the code's behavior.
    The direction of rotation, as described in the documentation, is counterclockwise. The direction of rotation in the code is clockwise.

  4. added 2 commits that reference this issue on Dec 5, 2025
    3e957a3
    1e8252c
  5. stefanv commented on Dec 13, 2025

    @stefanv
    Member

    Confirmed in my investigation on #7980 (comment)

  6. github-actions commented on Jun 12, 2026

    @github-actions

    Hello scikit-image core devs! There hasn't been any activity on this issue for more than 180 days. I have marked it as "dormant" to make it easy to find.

    To our contributors, thank you for your contribution and apologies if this issue fell through the cracks! Hopefully this ping will help bring some fresh attention to the issue. If you need help, you can always reach out on our forum

    If you think that this issue is no longer relevant, you may close it, or we may do it at some point (either way, it will be done manually).

  7. removed
    😴 Dormant
    on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions