{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/723","repository_url":"https://api.github.com/repos/OpenKinect/libfreenect2","labels_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/723/labels{/name}","comments_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/723/comments","events_url":"https://api.github.com/repos/OpenKinect/libfreenect2/issues/723/events","html_url":"https://github.com/OpenKinect/libfreenect2/issues/723","id":178182811,"number":723,"title":"Can't get frame data from libfreenect2.... Must I use the default ImageFormat format in Viewer.h?","user":{"login":"Edwinzero","id":5100412,"avatar_url":"https://avatars.githubusercontent.com/u/5100412?v=3","gravatar_id":"","url":"https://api.github.com/users/Edwinzero","html_url":"https://github.com/Edwinzero","followers_url":"https://api.github.com/users/Edwinzero/followers","following_url":"https://api.github.com/users/Edwinzero/following{/other_user}","gists_url":"https://api.github.com/users/Edwinzero/gists{/gist_id}","starred_url":"https://api.github.com/users/Edwinzero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Edwinzero/subscriptions","organizations_url":"https://api.github.com/users/Edwinzero/orgs","repos_url":"https://api.github.com/users/Edwinzero/repos","events_url":"https://api.github.com/users/Edwinzero/events{/privacy}","received_events_url":"https://api.github.com/users/Edwinzero/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-20T21:18:07Z","updated_at":"2016-09-20T21:19:56Z","closed_at":"2016-09-20T21:19:56Z","body":"Here is the code which I think is the core of Protonect.cpp\r\n`\r\nint main(){\r\n\tlibfreenect2::Freenect2 freenect2;\r\n\tlibfreenect2::Freenect2Device *dev = 0;\r\n\tlibfreenect2::PacketPipeline *pipeline = ;\r\n\tint numD = freenect2.enumerateDevices();\r\n\tif (numD < 0) {\r\n\t\treturn 1;\r\n\t}\r\n\tpipeline = new libfreenect2::OpenCLPacketPipeline(0);\r\n\tstd::string serial = freenect2.getDefaultDeviceSerialNumber();\r\n\tdev = freenect2.openDevice(serial, pipeline);\r\n\t\r\n\tlibfreenect2::SyncMultiFrameListener listener(libfreenect2::Frame::Color | libfreenect2::Frame::Ir | libfreenect2::Frame::Depth);\r\n\tdev->setColorFrameListener(&listener);\r\n\tdev->setIrAndDepthFrameListener(&listener);\r\n\r\n\tdev->start();\r\n\tlibfreenect2::FrameMap frames;\r\n\twhile (1) {\r\n\t\tif (!listener.waitForNewFrame(frames, 10 * 1000)) // 10 sconds\r\n\t\t{\r\n\t\t\tstd::cout << \"timeout!\" << std::endl;\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\tlibfreenect2::Frame *rgb = frames[libfreenect2::Frame::Color];\r\n\t\tlibfreenect2::Frame *ir = frames[libfreenect2::Frame::Ir];\r\n\t\tlibfreenect2::Frame *depth = frames[libfreenect2::Frame::Depth];\r\n\r\n\t\tstd::vector<unsigned char> rgb_buf;\r\n\t\trgb_buf.resize(rgb->width * rgb->height * rgb->bytes_per_pixel);\r\n\t\tstd::copy(rgb->data, rgb->data + rgb->width * rgb->height * rgb->bytes_per_pixel, rgb_buf.data());\r\n\r\n\t\tlistener.release(frames);\r\n\t}\r\n}\r\n`\r\n\r\nWhen run to *rgb, *ir, *dep, the frame is <NULL>, is there something I missing or now libfreenect2 has to use the data format in flextGL.h?"}}
{"actor":{"display_login":"Edwinzero"}}