-
1. Re: Conflict in sample RF_ScenePerception while using QueryVertices()
Apr 17, 2017 2:57 PM (in response to HelloIntelWorld)This message was posted on behalf of Intel CorporationHi HelloIntelWorld,
Thanks for reaching out.
To be honest, we are not sure if the issue with QueryProjection() is because you are using another projection.
Did you check the DF_Projection sample? https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?sample_projection_cpp.html, I recommend you to check that sample to know how the function is used, and use it as a reference for your code.
I hope you find this useful.
Have a nice day.
Regards,
Leonardo R. -
2. Re: Conflict in sample RF_ScenePerception while using QueryVertices()
HelloIntelWorld Apr 18, 2017 1:02 AM (in response to Intel Corporation)Actually the way to use the function is the same as sample DF_Projection.
However the code in C++ samples looks very strange and unusual(for me at least). For example,
wcout << L"RF_ScenePerception: Starts." << endl;
What is common I think is cout<<"text"<<endl;
Thus I sincerely recommend you to provide a guide of how to use the "uncommon code" or add some annotations for beginner developers like me.
Well back to the topic, I have solved the problem by myself.
Before using m_pScenePerceptionController->QueryProjection() you need to initialize projection firstly. That is why QueryProjection() returned a null pointer when I tried first time.
I found InitializeProjection() in sp_controller.h. It puzzled me that the function has been declared but never used. Then I added m_pScenePerceptionController->InitializeProjection(); to initialize and used m_pScenePerceptionController->QueryProjection()->QueryVertices(pSample->depth, &myVertices[0]); in the main loop. Finally I got the vertices successfully.
Thank you a lot for your help! Hope that my work is helpful for others who need.
-
3. Re: Conflict in sample RF_ScenePerception while using QueryVertices()
Apr 18, 2017 2:28 PM (in response to HelloIntelWorld)This message was posted on behalf of Intel CorporationHi HelloIntelWorld,
That's awesome. It is good to know that you solved your issue.
We really appreciate that you have posted the solution, it definitely will be very helpful for the community, thank you so much.
Have a nice day.
Regards,
Leonardo R.