payload: {"action":"created","comment":{"url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/comments/275844933","pull_request_review_id":227255454,"id":275844933,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3NTg0NDkzMw==","diff_hunk":"@@ -74,3 +75,260 @@ function visualize_flow(method::ColorBased, flow::Array{SVector{2, Float64}, 2};\n     return hsv\n     \n end\n+\n+\n+function is_flow_known(p::SVector{2, Float64})\n+    return !isnan(first(p)) && !isnan(last(p)) && abs(first(p)) < 1e9 && abs(last(p)) < 1e9\n+end\n+\n+\n+\"\"\"\n+```\n+read_flow_file(file_path)\n+```\n+\n+Returns a 2-Dimensional array that depicts the optical flow.\n+\n+# Details\n+Reads simple .flo file format which is used for optical flow evaluation.\n+The .flo file should store 2-band float image for horizontal (u) and vertical (v) flow components.\n+Floats are stored in little endian format.\n+\n+bytes contain -\n+  0-3     tag: \"PIEH\" in ASCII, which in little endian happens to be the float 202021.25\n+          (just a sanity check that floats are represented correctly)\n+  4-7     width as an integer\n+  8-11    height as an integer\n+  12-end  data (width*height*2*4 bytes total)\n+          the float values for u and v, interleaved, in row order, i.e.,\n+          u[row0,col0], v[row0,col0], u[row0,col1], v[row0,col1], ...\n+\n+# Arguements\n+The file_path parameter needs to be a string, storing the address of .flo file.\n+\n+# Example\n+\n+Read flow file from .flo file and visualize the flow in HSV\n+```julia\n+\n+using ImageTracking\n+\n+file_path = \"./Example_flow.flo\"\n+flow = read_flow_file(file_path)\n+result = visualize_flow(flow, ColorBased(), RasterConvention())\n+imshow(RGB.(result))\n+```\n+\n+# References\n+[1] http://vision.middlebury.edu/flow/data/\n+\"\"\"\n+# first four bytes to be same in little endian\n+# check this when reading a .flo file\n+FLOAT_TAG = 202021.25\n+function read_flow_file(file_path::String)\n+    \n+    io = open(file_path, \"r\")\n+    seekstart(io)\n+    \n+    tag = read(io, Float32) # reading the initial tag \n+    \n+    if tag != FLOAT_TAG\n+        print(\"read_from_file: Problem reading file \", filepath)\n+        return -1\n+    end\n+    \n+    width  = read(io, Int32)\n+    height = read(io, Int32)\n+    \n+    flow = Array{Array{Float64 ,1}, 2}(undef, height, width)\n+    for i in 1:height\n+        for j in 1:width\n+            if eof(io) == false\n+                fx = read(io, Float32)\n+                fy = read(io, Float32)\n+                flow[i, j] = [fx, fy]\n+            end\n+        end\n+    end\n+    close(io)\n+    return convert(Array{SArray{Tuple{2},Float64,1,2},2}, flow)","path":"src/utility.jl","position":164,"original_position":164,"commit_id":"05284fd8336fd8f18e98b895771172123dfb6e29","original_commit_id":"05284fd8336fd8f18e98b895771172123dfb6e29","user":{"login":"Deepank308","id":32814077,"node_id":"MDQ6VXNlcjMyODE0MDc3","avatar_url":"https://avatars0.githubusercontent.com/u/32814077?v=4","gravatar_id":"","url":"https://api.github.com/users/Deepank308","html_url":"https://github.com/Deepank308","followers_url":"https://api.github.com/users/Deepank308/followers","following_url":"https://api.github.com/users/Deepank308/following{/other_user}","gists_url":"https://api.github.com/users/Deepank308/gists{/gist_id}","starred_url":"https://api.github.com/users/Deepank308/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deepank308/subscriptions","organizations_url":"https://api.github.com/users/Deepank308/orgs","repos_url":"https://api.github.com/users/Deepank308/repos","events_url":"https://api.github.com/users/Deepank308/events{/privacy}","received_events_url":"https://api.github.com/users/Deepank308/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2019-04-16T15:01:47Z","updated_at":"2019-04-16T15:01:47Z","html_url":"https://github.com/JuliaImages/ImageTracking.jl/pull/19#discussion_r275844933","pull_request_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/comments/275844933"},"html":{"href":"https://github.com/JuliaImages/ImageTracking.jl/pull/19#discussion_r275844933"},"pull_request":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19"}},"in_reply_to_id":275760411},"pull_request":{"url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19","id":259680317,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU5NjgwMzE3","html_url":"https://github.com/JuliaImages/ImageTracking.jl/pull/19","diff_url":"https://github.com/JuliaImages/ImageTracking.jl/pull/19.diff","patch_url":"https://github.com/JuliaImages/ImageTracking.jl/pull/19.patch","issue_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues/19","number":19,"state":"open","locked":false,"title":"[WIP]Add flow evaluation functions","user":{"login":"Deepank308","id":32814077,"node_id":"MDQ6VXNlcjMyODE0MDc3","avatar_url":"https://avatars0.githubusercontent.com/u/32814077?v=4","gravatar_id":"","url":"https://api.github.com/users/Deepank308","html_url":"https://github.com/Deepank308","followers_url":"https://api.github.com/users/Deepank308/followers","following_url":"https://api.github.com/users/Deepank308/following{/other_user}","gists_url":"https://api.github.com/users/Deepank308/gists{/gist_id}","starred_url":"https://api.github.com/users/Deepank308/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deepank308/subscriptions","organizations_url":"https://api.github.com/users/Deepank308/orgs","repos_url":"https://api.github.com/users/Deepank308/repos","events_url":"https://api.github.com/users/Deepank308/events{/privacy}","received_events_url":"https://api.github.com/users/Deepank308/received_events","type":"User","site_admin":false},"body":"Added end point error evaluation function. Currently, the function evaluates error iff ground truth flow is also provided as an array.  ","created_at":"2019-03-09T10:36:57Z","updated_at":"2019-04-16T15:01:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4dd72d007d76b172e5b1c3e778f3090b75c2e4f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19/commits","review_comments_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19/comments","review_comment_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues/19/comments","statuses_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/statuses/05284fd8336fd8f18e98b895771172123dfb6e29","head":{"label":"Deepank308:master","ref":"master","sha":"05284fd8336fd8f18e98b895771172123dfb6e29","user":{"login":"Deepank308","id":32814077,"node_id":"MDQ6VXNlcjMyODE0MDc3","avatar_url":"https://avatars0.githubusercontent.com/u/32814077?v=4","gravatar_id":"","url":"https://api.github.com/users/Deepank308","html_url":"https://github.com/Deepank308","followers_url":"https://api.github.com/users/Deepank308/followers","following_url":"https://api.github.com/users/Deepank308/following{/other_user}","gists_url":"https://api.github.com/users/Deepank308/gists{/gist_id}","starred_url":"https://api.github.com/users/Deepank308/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deepank308/subscriptions","organizations_url":"https://api.github.com/users/Deepank308/orgs","repos_url":"https://api.github.com/users/Deepank308/repos","events_url":"https://api.github.com/users/Deepank308/events{/privacy}","received_events_url":"https://api.github.com/users/Deepank308/received_events","type":"User","site_admin":false},"repo":{"id":166698206,"node_id":"MDEwOlJlcG9zaXRvcnkxNjY2OTgyMDY=","name":"ImageTracking.jl","full_name":"Deepank308/ImageTracking.jl","private":false,"owner":{"login":"Deepank308","id":32814077,"node_id":"MDQ6VXNlcjMyODE0MDc3","avatar_url":"https://avatars0.githubusercontent.com/u/32814077?v=4","gravatar_id":"","url":"https://api.github.com/users/Deepank308","html_url":"https://github.com/Deepank308","followers_url":"https://api.github.com/users/Deepank308/followers","following_url":"https://api.github.com/users/Deepank308/following{/other_user}","gists_url":"https://api.github.com/users/Deepank308/gists{/gist_id}","starred_url":"https://api.github.com/users/Deepank308/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deepank308/subscriptions","organizations_url":"https://api.github.com/users/Deepank308/orgs","repos_url":"https://api.github.com/users/Deepank308/repos","events_url":"https://api.github.com/users/Deepank308/events{/privacy}","received_events_url":"https://api.github.com/users/Deepank308/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Deepank308/ImageTracking.jl","description":null,"fork":true,"url":"https://api.github.com/repos/Deepank308/ImageTracking.jl","forks_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/forks","keys_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/teams","hooks_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/hooks","issue_events_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/issues/events{/number}","events_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/events","assignees_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/assignees{/user}","branches_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/branches{/branch}","tags_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/tags","blobs_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/languages","stargazers_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/stargazers","contributors_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/contributors","subscribers_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/subscribers","subscription_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/subscription","commits_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/contents/{+path}","compare_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/merges","archive_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/downloads","issues_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/issues{/number}","pulls_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/labels{/name}","releases_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/releases{/id}","deployments_url":"https://api.github.com/repos/Deepank308/ImageTracking.jl/deployments","created_at":"2019-01-20T19:04:13Z","updated_at":"2019-04-13T13:37:50Z","pushed_at":"2019-04-13T13:37:48Z","git_url":"git://github.com/Deepank308/ImageTracking.jl.git","ssh_url":"git@github.com:Deepank308/ImageTracking.jl.git","clone_url":"https://github.com/Deepank308/ImageTracking.jl.git","svn_url":"https://github.com/Deepank308/ImageTracking.jl","homepage":null,"size":2392,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaImages:master","ref":"master","sha":"a83b91ff9f856804ce22203bcc1852a64d66d2c7","user":{"login":"JuliaImages","id":13722934,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzIyOTM0","avatar_url":"https://avatars1.githubusercontent.com/u/13722934?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaImages","html_url":"https://github.com/JuliaImages","followers_url":"https://api.github.com/users/JuliaImages/followers","following_url":"https://api.github.com/users/JuliaImages/following{/other_user}","gists_url":"https://api.github.com/users/JuliaImages/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaImages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaImages/subscriptions","organizations_url":"https://api.github.com/users/JuliaImages/orgs","repos_url":"https://api.github.com/users/JuliaImages/repos","events_url":"https://api.github.com/users/JuliaImages/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaImages/received_events","type":"Organization","site_admin":false},"repo":{"id":132273621,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIyNzM2MjE=","name":"ImageTracking.jl","full_name":"JuliaImages/ImageTracking.jl","private":false,"owner":{"login":"JuliaImages","id":13722934,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzIyOTM0","avatar_url":"https://avatars1.githubusercontent.com/u/13722934?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaImages","html_url":"https://github.com/JuliaImages","followers_url":"https://api.github.com/users/JuliaImages/followers","following_url":"https://api.github.com/users/JuliaImages/following{/other_user}","gists_url":"https://api.github.com/users/JuliaImages/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaImages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaImages/subscriptions","organizations_url":"https://api.github.com/users/JuliaImages/orgs","repos_url":"https://api.github.com/users/JuliaImages/repos","events_url":"https://api.github.com/users/JuliaImages/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaImages/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaImages/ImageTracking.jl","description":null,"fork":false,"url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl","forks_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/forks","keys_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/teams","hooks_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/events","assignees_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/tags","blobs_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/subscription","commits_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/merges","archive_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/downloads","issues_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/deployments","created_at":"2018-05-05T18:20:45Z","updated_at":"2019-03-29T16:27:02Z","pushed_at":"2019-04-13T13:37:49Z","git_url":"git://github.com/JuliaImages/ImageTracking.jl.git","ssh_url":"git@github.com:JuliaImages/ImageTracking.jl.git","clone_url":"https://github.com/JuliaImages/ImageTracking.jl.git","svn_url":"https://github.com/JuliaImages/ImageTracking.jl","homepage":null,"size":1802,"stargazers_count":7,"watchers_count":7,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":8,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19"},"html":{"href":"https://github.com/JuliaImages/ImageTracking.jl/pull/19"},"issue":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues/19"},"comments":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaImages/ImageTracking.jl/statuses/05284fd8336fd8f18e98b895771172123dfb6e29"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"Deepank308"}}