{"action":"created","issue":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/253","labels_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/253/comments","events_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/253/events","html_url":"https://github.com/OpenKinect/libfreenect2/pull/253","id":83942798,"number":253,"title":"Added filtering of shadowed color regions to registration","user":{"login":"wiedemeyer","id":4972318,"avatar_url":"https://avatars.githubusercontent.com/u/4972318?v=3","gravatar_id":"","url":"https://api.github.com/users/wiedemeyer","html_url":"https://github.com/wiedemeyer","followers_url":"https://api.github.com/users/wiedemeyer/followers","following_url":"https://api.github.com/users/wiedemeyer/following{/other_user}","gists_url":"https://api.github.com/users/wiedemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/wiedemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiedemeyer/subscriptions","organizations_url":"https://api.github.com/users/wiedemeyer/orgs","repos_url":"https://api.github.com/users/wiedemeyer/repos","events_url":"https://api.github.com/users/wiedemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/wiedemeyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/milestones/1","html_url":"https://github.com/OpenKinect/libfreenect2/milestones/0.1","labels_url":"https://api.github.com/repos/OpenKinect/libfreenect2/milestones/1/labels","id":1123857,"number":1,"title":"0.1","description":null,"creator":{"login":"floe","id":90756,"avatar_url":"https://avatars.githubusercontent.com/u/90756?v=3","gravatar_id":"","url":"https://api.github.com/users/floe","html_url":"https://github.com/floe","followers_url":"https://api.github.com/users/floe/followers","following_url":"https://api.github.com/users/floe/following{/other_user}","gists_url":"https://api.github.com/users/floe/gists{/gist_id}","starred_url":"https://api.github.com/users/floe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floe/subscriptions","organizations_url":"https://api.github.com/users/floe/orgs","repos_url":"https://api.github.com/users/floe/repos","events_url":"https://api.github.com/users/floe/events{/privacy}","received_events_url":"https://api.github.com/users/floe/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":8,"state":"open","created_at":"2015-05-21T18:48:07Z","updated_at":"2015-06-09T12:57:36Z","due_on":null,"closed_at":null},"comments":33,"created_at":"2015-06-02T09:40:56Z","updated_at":"2015-06-11T13:58:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/pulls/253","html_url":"https://github.com/OpenKinect/libfreenect2/pull/253","diff_url":"https://github.com/OpenKinect/libfreenect2/pull/253.diff","patch_url":"https://github.com/OpenKinect/libfreenect2/pull/253.patch"},"body":"Hi,\r\n\r\nI tested the registration and it works fine, nice work! But it ran a bit slow on my system, so I decided to improve it. The original version took ~5.1 ms on my system. With this changes it went down to ~1 ms.\r\n\r\nI achieved this by replacing the multi dimensional array with a one dimensional one, which is structured similar to the image data. `map[i]` is the value for `depth[i]`, etc. So you only need to walk through the array with a pointer and you are done.\r\n\r\nThe new maps also include some static multiplications and additions which where computed at runtime before. There is also a new map for y image offsets, to reduce computations while runtime even more.\r\n\r\nThe rounding of the x coordinate is replaced by `const int cx = rx + 0.5f;`, which should be the same for positive numbers. But all valid x coordinates should be greater equals 0 anyway. To make sure that x is positive, a check for `rx > -0.5f` is added to the if statement below.\r\n\r\nThe last thing I changed is the API of the `apply` method. I changed the type for the registered image to libfreenect2::Frame, so that it is possible to check for the correct size."},"comment":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/comments/111144428","html_url":"https://github.com/OpenKinect/libfreenect2/pull/253#issuecomment-111144428","issue_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/253","id":111144428,"user":{"login":"floe","id":90756,"avatar_url":"https://avatars.githubusercontent.com/u/90756?v=3","gravatar_id":"","url":"https://api.github.com/users/floe","html_url":"https://github.com/floe","followers_url":"https://api.github.com/users/floe/followers","following_url":"https://api.github.com/users/floe/following{/other_user}","gists_url":"https://api.github.com/users/floe/gists{/gist_id}","starred_url":"https://api.github.com/users/floe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floe/subscriptions","organizations_url":"https://api.github.com/users/floe/orgs","repos_url":"https://api.github.com/users/floe/repos","events_url":"https://api.github.com/users/floe/events{/privacy}","received_events_url":"https://api.github.com/users/floe/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T13:58:26Z","updated_at":"2015-06-11T13:58:26Z","body":"OK, from what I've seen, any OpenGL implementation which can deal with libfreenect2 should also be able to handle BGRA just fine."}}