{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/101669116","pull_request_review_id":22405532,"id":101669116,"diff_hunk":"@@ -0,0 +1,308 @@\n+import numpy as np\n+\n+\n+def get_radiance(images, exposure, radiance_map):\n+    \"\"\"\n+    Return the radiance for a series of images based upon a camera response\n+    function.\n+\n+    Parameters\n+    ----------\n+    images: list\n+        List of images in the for of numpy arrays. Either mono or color\n+        (RGB, MxNx3).\n+    exposure : numpy 1D array\n+        Array of exposure times in seconds.\n+    radiacenMap : numpy array\n+        Array mapping the counts to radiance\n+\n+    Returns\n+    -------\n+    hdr : numpy array\n+        Resulting image with radiance values.\n+    \"\"\"\n+\n+    den = np.ones(images[0].shape)\n+    num = np.zeros(images[0].shape)\n+    wf = np.vectorized(_weight_func)\n+    for idx, im in enumerate(images):\n+        gij = im.copy()\n+        # For colour\n+        if im.ndim == 3:\n+            for ii in range(im.shape[2]):\n+                gij[:, :, ii] = radiance_map[im[:, :, ii] + 1, ii]\n+        else:\n+            gij[:, :] = radiance_map[im[:, :, ii] + 1]\n+        gij = gij - np.log(exposure[idx])\n+\n+        wij = wf(gij)\n+        num = num + wij * gij\n+        den = den + wij\n+\n+    return num / den\n+\n+\n+def make_hdr(images, exposure, radiance_map, depth=16):\n+    \"\"\"\n+    Compute the HDR image from a series of images and a racianceMap.","path":"skimage/exposure/hdr.py","position":47,"original_position":47,"commit_id":"5c0439164965d7285a78b9169d1828247ed07803","original_commit_id":"5c0439164965d7285a78b9169d1828247ed07803","user":{"login":"stefanv","id":45071,"avatar_url":"https://avatars.githubusercontent.com/u/45071?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanv","html_url":"https://github.com/stefanv","followers_url":"https://api.github.com/users/stefanv/followers","following_url":"https://api.github.com/users/stefanv/following{/other_user}","gists_url":"https://api.github.com/users/stefanv/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanv/subscriptions","organizations_url":"https://api.github.com/users/stefanv/orgs","repos_url":"https://api.github.com/users/stefanv/repos","events_url":"https://api.github.com/users/stefanv/events{/privacy}","received_events_url":"https://api.github.com/users/stefanv/received_events","type":"User","site_admin":false},"body":"\"racianceMap\"","created_at":"2017-02-17T01:29:36Z","updated_at":"2017-02-17T01:31:01Z","html_url":"https://github.com/scikit-image/scikit-image/pull/1539#discussion_r101669116","pull_request_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539","_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/101669116"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/1539#discussion_r101669116"},"pull_request":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539","id":36828165,"html_url":"https://github.com/scikit-image/scikit-image/pull/1539","diff_url":"https://github.com/scikit-image/scikit-image/pull/1539.diff","patch_url":"https://github.com/scikit-image/scikit-image/pull/1539.patch","issue_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1539","number":1539,"state":"open","locked":false,"title":"Added hdr.py to skimage.io for doing HDR image. ","user":{"login":"paalge","id":1961991,"avatar_url":"https://avatars.githubusercontent.com/u/1961991?v=3","gravatar_id":"","url":"https://api.github.com/users/paalge","html_url":"https://github.com/paalge","followers_url":"https://api.github.com/users/paalge/followers","following_url":"https://api.github.com/users/paalge/following{/other_user}","gists_url":"https://api.github.com/users/paalge/gists{/gist_id}","starred_url":"https://api.github.com/users/paalge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paalge/subscriptions","organizations_url":"https://api.github.com/users/paalge/orgs","repos_url":"https://api.github.com/users/paalge/repos","events_url":"https://api.github.com/users/paalge/events{/privacy}","received_events_url":"https://api.github.com/users/paalge/received_events","type":"User","site_admin":false},"body":"This implements the method for HDR imaging as described in Debevec and Malik, J. (1997).\ndoi:10.1145/258734.258884 with additions to handle the complexity of 16\nbit images\n","created_at":"2015-06-03T12:43:48Z","updated_at":"2017-02-17T01:31:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f53f4b8250146b6368d44d21f049faaf98023bd6","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scikit-image/scikit-image/milestones/7","html_url":"https://github.com/scikit-image/scikit-image/milestone/7","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/milestones/7/labels","id":1646452,"number":7,"title":"0.14","description":"","creator":{"login":"soupault","id":1315589,"avatar_url":"https://avatars.githubusercontent.com/u/1315589?v=3","gravatar_id":"","url":"https://api.github.com/users/soupault","html_url":"https://github.com/soupault","followers_url":"https://api.github.com/users/soupault/followers","following_url":"https://api.github.com/users/soupault/following{/other_user}","gists_url":"https://api.github.com/users/soupault/gists{/gist_id}","starred_url":"https://api.github.com/users/soupault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soupault/subscriptions","organizations_url":"https://api.github.com/users/soupault/orgs","repos_url":"https://api.github.com/users/soupault/repos","events_url":"https://api.github.com/users/soupault/events{/privacy}","received_events_url":"https://api.github.com/users/soupault/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":5,"state":"open","created_at":"2016-03-15T19:16:06Z","updated_at":"2017-02-15T16:31:38Z","due_on":"2017-07-15T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539/commits","review_comments_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539/comments","review_comment_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1539/comments","statuses_url":"https://api.github.com/repos/scikit-image/scikit-image/statuses/5c0439164965d7285a78b9169d1828247ed07803","head":{"label":"paalge:hdr","ref":"hdr","sha":"5c0439164965d7285a78b9169d1828247ed07803","user":{"login":"paalge","id":1961991,"avatar_url":"https://avatars.githubusercontent.com/u/1961991?v=3","gravatar_id":"","url":"https://api.github.com/users/paalge","html_url":"https://github.com/paalge","followers_url":"https://api.github.com/users/paalge/followers","following_url":"https://api.github.com/users/paalge/following{/other_user}","gists_url":"https://api.github.com/users/paalge/gists{/gist_id}","starred_url":"https://api.github.com/users/paalge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paalge/subscriptions","organizations_url":"https://api.github.com/users/paalge/orgs","repos_url":"https://api.github.com/users/paalge/repos","events_url":"https://api.github.com/users/paalge/events{/privacy}","received_events_url":"https://api.github.com/users/paalge/received_events","type":"User","site_admin":false},"repo":{"id":35538983,"name":"scikit-image","full_name":"paalge/scikit-image","owner":{"login":"paalge","id":1961991,"avatar_url":"https://avatars.githubusercontent.com/u/1961991?v=3","gravatar_id":"","url":"https://api.github.com/users/paalge","html_url":"https://github.com/paalge","followers_url":"https://api.github.com/users/paalge/followers","following_url":"https://api.github.com/users/paalge/following{/other_user}","gists_url":"https://api.github.com/users/paalge/gists{/gist_id}","starred_url":"https://api.github.com/users/paalge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paalge/subscriptions","organizations_url":"https://api.github.com/users/paalge/orgs","repos_url":"https://api.github.com/users/paalge/repos","events_url":"https://api.github.com/users/paalge/events{/privacy}","received_events_url":"https://api.github.com/users/paalge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paalge/scikit-image","description":"Image Processing SciKit (Toolbox for SciPy)","fork":true,"url":"https://api.github.com/repos/paalge/scikit-image","forks_url":"https://api.github.com/repos/paalge/scikit-image/forks","keys_url":"https://api.github.com/repos/paalge/scikit-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paalge/scikit-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paalge/scikit-image/teams","hooks_url":"https://api.github.com/repos/paalge/scikit-image/hooks","issue_events_url":"https://api.github.com/repos/paalge/scikit-image/issues/events{/number}","events_url":"https://api.github.com/repos/paalge/scikit-image/events","assignees_url":"https://api.github.com/repos/paalge/scikit-image/assignees{/user}","branches_url":"https://api.github.com/repos/paalge/scikit-image/branches{/branch}","tags_url":"https://api.github.com/repos/paalge/scikit-image/tags","blobs_url":"https://api.github.com/repos/paalge/scikit-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paalge/scikit-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paalge/scikit-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/paalge/scikit-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paalge/scikit-image/statuses/{sha}","languages_url":"https://api.github.com/repos/paalge/scikit-image/languages","stargazers_url":"https://api.github.com/repos/paalge/scikit-image/stargazers","contributors_url":"https://api.github.com/repos/paalge/scikit-image/contributors","subscribers_url":"https://api.github.com/repos/paalge/scikit-image/subscribers","subscription_url":"https://api.github.com/repos/paalge/scikit-image/subscription","commits_url":"https://api.github.com/repos/paalge/scikit-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/paalge/scikit-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/paalge/scikit-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/paalge/scikit-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/paalge/scikit-image/contents/{+path}","compare_url":"https://api.github.com/repos/paalge/scikit-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paalge/scikit-image/merges","archive_url":"https://api.github.com/repos/paalge/scikit-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paalge/scikit-image/downloads","issues_url":"https://api.github.com/repos/paalge/scikit-image/issues{/number}","pulls_url":"https://api.github.com/repos/paalge/scikit-image/pulls{/number}","milestones_url":"https://api.github.com/repos/paalge/scikit-image/milestones{/number}","notifications_url":"https://api.github.com/repos/paalge/scikit-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paalge/scikit-image/labels{/name}","releases_url":"https://api.github.com/repos/paalge/scikit-image/releases{/id}","deployments_url":"https://api.github.com/repos/paalge/scikit-image/deployments","created_at":"2015-05-13T09:04:47Z","updated_at":"2016-09-16T15:02:10Z","pushed_at":"2017-02-15T05:47:54Z","git_url":"git://github.com/paalge/scikit-image.git","ssh_url":"git@github.com:paalge/scikit-image.git","clone_url":"https://github.com/paalge/scikit-image.git","svn_url":"https://github.com/paalge/scikit-image","homepage":"http://scikit-image.org","size":52559,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-image:master","ref":"master","sha":"30a19d0af0611aaeb7c315a4224ce75580656890","user":{"login":"scikit-image","id":897180,"avatar_url":"https://avatars.githubusercontent.com/u/897180?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-image","html_url":"https://github.com/scikit-image","followers_url":"https://api.github.com/users/scikit-image/followers","following_url":"https://api.github.com/users/scikit-image/following{/other_user}","gists_url":"https://api.github.com/users/scikit-image/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-image/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-image/subscriptions","organizations_url":"https://api.github.com/users/scikit-image/orgs","repos_url":"https://api.github.com/users/scikit-image/repos","events_url":"https://api.github.com/users/scikit-image/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-image/received_events","type":"Organization","site_admin":false},"repo":{"id":2014929,"name":"scikit-image","full_name":"scikit-image/scikit-image","owner":{"login":"scikit-image","id":897180,"avatar_url":"https://avatars.githubusercontent.com/u/897180?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-image","html_url":"https://github.com/scikit-image","followers_url":"https://api.github.com/users/scikit-image/followers","following_url":"https://api.github.com/users/scikit-image/following{/other_user}","gists_url":"https://api.github.com/users/scikit-image/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-image/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-image/subscriptions","organizations_url":"https://api.github.com/users/scikit-image/orgs","repos_url":"https://api.github.com/users/scikit-image/repos","events_url":"https://api.github.com/users/scikit-image/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-image/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-image/scikit-image","description":"Image Processing SciKit (Toolbox for SciPy)","fork":false,"url":"https://api.github.com/repos/scikit-image/scikit-image","forks_url":"https://api.github.com/repos/scikit-image/scikit-image/forks","keys_url":"https://api.github.com/repos/scikit-image/scikit-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-image/scikit-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-image/scikit-image/teams","hooks_url":"https://api.github.com/repos/scikit-image/scikit-image/hooks","issue_events_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-image/scikit-image/events","assignees_url":"https://api.github.com/repos/scikit-image/scikit-image/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-image/scikit-image/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-image/scikit-image/tags","blobs_url":"https://api.github.com/repos/scikit-image/scikit-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-image/scikit-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-image/scikit-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-image/scikit-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-image/scikit-image/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-image/scikit-image/languages","stargazers_url":"https://api.github.com/repos/scikit-image/scikit-image/stargazers","contributors_url":"https://api.github.com/repos/scikit-image/scikit-image/contributors","subscribers_url":"https://api.github.com/repos/scikit-image/scikit-image/subscribers","subscription_url":"https://api.github.com/repos/scikit-image/scikit-image/subscription","commits_url":"https://api.github.com/repos/scikit-image/scikit-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-image/scikit-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-image/scikit-image/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-image/scikit-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-image/scikit-image/merges","archive_url":"https://api.github.com/repos/scikit-image/scikit-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-image/scikit-image/downloads","issues_url":"https://api.github.com/repos/scikit-image/scikit-image/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-image/scikit-image/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-image/scikit-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/labels{/name}","releases_url":"https://api.github.com/repos/scikit-image/scikit-image/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-image/scikit-image/deployments","created_at":"2011-07-07T22:07:20Z","updated_at":"2017-02-16T05:51:38Z","pushed_at":"2017-02-17T00:21:16Z","git_url":"git://github.com/scikit-image/scikit-image.git","ssh_url":"git@github.com:scikit-image/scikit-image.git","clone_url":"https://github.com/scikit-image/scikit-image.git","svn_url":"https://github.com/scikit-image/scikit-image","homepage":"http://scikit-image.org","size":48896,"stargazers_count":1434,"watchers_count":1434,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":732,"mirror_url":null,"open_issues_count":334,"forks":732,"open_issues":334,"watchers":1434,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/1539"},"issue":{"href":"https://api.github.com/repos/scikit-image/scikit-image/issues/1539"},"comments":{"href":"https://api.github.com/repos/scikit-image/scikit-image/issues/1539/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1539/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-image/scikit-image/statuses/5c0439164965d7285a78b9169d1828247ed07803"}}}}
{"actor":{"display_login":"stefanv"}}