{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/738","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/738/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/738/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/738/events","html_url":"https://github.com/mshabunin/test2/issues/738","id":95465712,"number":738,"title":"log function behavior differs from documentation, returns -inf for 0 value elements","user":{"login":"mshabunin","id":3304494,"avatar_url":"https://avatars.githubusercontent.com/u/3304494?v=3","gravatar_id":"","url":"https://api.github.com/users/mshabunin","html_url":"https://github.com/mshabunin","followers_url":"https://api.github.com/users/mshabunin/followers","following_url":"https://api.github.com/users/mshabunin/following{/other_user}","gists_url":"https://api.github.com/users/mshabunin/gists{/gist_id}","starred_url":"https://api.github.com/users/mshabunin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshabunin/subscriptions","organizations_url":"https://api.github.com/users/mshabunin/orgs","repos_url":"https://api.github.com/users/mshabunin/repos","events_url":"https://api.github.com/users/mshabunin/events{/privacy}","received_events_url":"https://api.github.com/users/mshabunin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test2/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20documentation","name":"category: documentation","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/priority:%20normal","name":"priority: normal","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T15:55:30Z","updated_at":"2015-07-16T15:55:30Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/4319\r\n```\n|| Louis Bouchard on 2015-05-06 16:57\n|| Priority: Normal\n|| Affected: branch 'master' (3.0-dev)\n|| Category: documentation\n|| Tracker: Bug\n|| Difficulty: \n|| PR: \n|| Platform: x64 / Windows\n```\n\nlog function behavior differs from documentation, returns -inf for 0 value elements\n-----------\n```\nAs per the documentation (http://docs.opencv.org/3.0-beta/modules/core/doc/operations_on_arrays.html#log), the log function should return -700 for elements of the input array that are 0.\r\n\r\nIn the current stable version (3.0-rc1) however, the function returns -INF for zero values.\r\n\r\nThis has an impact on TonemapDurand::process(), where BilateralFilter() is called on the result of a log() which returns -INF values when process is called on a grayscale image.  BilateralFilter() crashes on arrays containing -INF values. Perhaps BilateralFilter() is not working as intended either.\r\n\r\nthank you\n```\n\nHistory\n-------\n##### Vadim Pisarevsky on 2015-05-14 17:01\n```\nthe crash in TonemapDurand is now avoided: https://github.com/Itseez/opencv/pull/4018. The documentation still needs to be changed\n-   Category changed from core to documentation\n```"}}