{"action":"opened","issue":{"url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1761","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1761/labels{/name}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1761/comments","events_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1761/events","html_url":"https://github.com/scikit-image/scikit-image/issues/1761","id":113244910,"number":1761,"title":"Infinite loop in exposure.equalize_adapthist()","user":{"login":"mjharte","id":1426162,"avatar_url":"https://avatars.githubusercontent.com/u/1426162?v=3","gravatar_id":"","url":"https://api.github.com/users/mjharte","html_url":"https://github.com/mjharte","followers_url":"https://api.github.com/users/mjharte/followers","following_url":"https://api.github.com/users/mjharte/following{/other_user}","gists_url":"https://api.github.com/users/mjharte/gists{/gist_id}","starred_url":"https://api.github.com/users/mjharte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjharte/subscriptions","organizations_url":"https://api.github.com/users/mjharte/orgs","repos_url":"https://api.github.com/users/mjharte/repos","events_url":"https://api.github.com/users/mjharte/events{/privacy}","received_events_url":"https://api.github.com/users/mjharte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-25T19:09:12Z","updated_at":"2015-10-25T19:09:12Z","closed_at":null,"body":"The `equalize_adapthist()` function can hang, caused by the following:\r\n\r\nWhen using a very small clip_limit parameter (e.g. 0.001) on a grayscale image with low contrast, the function `clip_histogram()` in `_adapthist.py` hangs in an infinite loop because the `n_excess` variable is not being lowered in the `while n_excess > 0` loop."}}