{"action":"created","issue":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/485","labels_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/485/labels{/name}","comments_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/485/comments","events_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/485/events","html_url":"https://github.com/OpenKinect/libfreenect2/issues/485","id":119372566,"number":485,"title":"Getting depth of an area on the Color image","user":{"login":"hvictor","id":1229400,"avatar_url":"https://avatars.githubusercontent.com/u/1229400?v=3","gravatar_id":"","url":"https://api.github.com/users/hvictor","html_url":"https://github.com/hvictor","followers_url":"https://api.github.com/users/hvictor/followers","following_url":"https://api.github.com/users/hvictor/following{/other_user}","gists_url":"https://api.github.com/users/hvictor/gists{/gist_id}","starred_url":"https://api.github.com/users/hvictor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvictor/subscriptions","organizations_url":"https://api.github.com/users/hvictor/orgs","repos_url":"https://api.github.com/users/hvictor/repos","events_url":"https://api.github.com/users/hvictor/events{/privacy}","received_events_url":"https://api.github.com/users/hvictor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-11-29T17:41:26Z","updated_at":"2015-12-01T08:15:42Z","closed_at":null,"body":"Dear all, I am using libfreenect2 on the Jetson. \r\nSuppose I identify a tennis ball with HSV thresholding and Hough circle transforms. Then I have a circular area on the Color frame.\r\nI want to get the depth for those pixels in the big Color frame. So I am integrating Registration::apply in the libfreenect2 modified for Jetson, but I cannot understand a thing:\r\nIn a post I read that \"undistorted\" is the rectified depth map. Is it equivalent to the argument Frame *depth ? If no, could you tell me how to get all necessary parameters, in order to have bigdepth filled correctly? Or an area of it..."},"comment":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/comments/160890864","html_url":"https://github.com/OpenKinect/libfreenect2/issues/485#issuecomment-160890864","issue_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/485","id":160890864,"user":{"login":"hvictor","id":1229400,"avatar_url":"https://avatars.githubusercontent.com/u/1229400?v=3","gravatar_id":"","url":"https://api.github.com/users/hvictor","html_url":"https://github.com/hvictor","followers_url":"https://api.github.com/users/hvictor/followers","following_url":"https://api.github.com/users/hvictor/following{/other_user}","gists_url":"https://api.github.com/users/hvictor/gists{/gist_id}","starred_url":"https://api.github.com/users/hvictor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvictor/subscriptions","organizations_url":"https://api.github.com/users/hvictor/orgs","repos_url":"https://api.github.com/users/hvictor/repos","events_url":"https://api.github.com/users/hvictor/events{/privacy}","received_events_url":"https://api.github.com/users/hvictor/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T08:15:42Z","updated_at":"2015-12-01T08:15:42Z","body":"I found that here (I added a printf) in registration.cpp:\n\n// check if c_off is outside of rgb image\n// checking rx/cx is not needed because the color image is much wider then\nthe depth image\n    if(c_off < 0 || c_off >= size_color){\n      printf(\"size_color = %d, C_off = %d = cx + cy * 1920 = %d + %d * 1920\n---> outside RGB image\\n\", size_color, c_off, cx, cy);\n      *map_c_off = -1;\n      continue;\n    }\n\nI have values such as:\n\nsize_color = 2073600, C_off = 2269238 = cx + cy * 1920 = 1718 + 1181 * 1920\n---> outside RGB image\nsize_color = 2073600, C_off = 2269241 = cx + cy * 1920 = 1721 + 1181 * 1920\n---> outside RGB image\nsize_color = 2073600, C_off = 2269244 = cx + cy * 1920 = 1724 + 1181 * 1920\n---> outside RGB image\nsize_color = 2073600, C_off = 2269247 = cx + cy * 1920 = 1727 + 1181 * 1920\n---> outside RGB image\nsize_color = 2073600, C_off = 2269250 = cx + cy * 1920 = 1730 + 1181 * 1920\n---> outside RGB image\n\nand get c_off set to -1 later. What do you think?\n\n\n\n2015-11-30 16:36 GMT+01:00 Lingzhu Xiang <notifications@github.com>:\n\n> In fact, I don't know.\n>\n> Just follow the code and print some more. Where does it start being all\n> zeros and there can you fix it.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/OpenKinect/libfreenect2/issues/485#issuecomment-160663171>\n> .\n>\n"}}