-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D reconstruction demo (Windows) - datumsPtr is nullptr in reconstruction3D post-process worker #235
Comments
Is |
Yes, just tested and the images are being grabbed and put into Datum in std::shared_ptr<std::vector<Datum3D>> WPs3Eye::workProducer()
{
try
{
// Grab image from each camera
const auto cvMats = acquireImages(cameraList, matList);
// Images to userDatum
auto datums3d = std::make_shared<std::vector<Datum3D>>(cvMats.size());
for (auto i = 0u; i < cvMats.size(); i++)
{
datums3d->at(i).cvInputData = cvMats.at(i);
}
// TEST: Display images from camera 1 and 2
if (!datums3d->empty())
{
cv::imshow("TEST CAM 1", datums3d->at(0).cvInputData);
cv::imshow("TEST CAM 2", datums3d->at(1).cvInputData);
cv::waitKey(0);
}
// Return Datum
return datums3d;
}
catch (const std::exception& e)
{
this->stop();
op::error(e.what(), __LINE__, __FUNCTION__, __FILE__);
return nullptr;
}
}
|
No idea. Maybe the OpenGL visualization is not working on your system? Can you try imshow in the wRender3D and to try to output the keypoints with cout in both wRender3D and WReconstruction3D? |
In WReconstruction3D, I simply get a nullptr for the incoming datumPtr in the work method. In WRender3D I'm able to display the images and print out the keypoints from the workConsumer method (image below). The OpenGL view itself works fine, but of course doesn't show the body pose as WReconstruction3D is never able to make the calculations since it's receiving no data. |
But And I am sorry, I have no idea what the error might actually be. As I do not have the multi-system camera installed anymore, I cannot debug it. Please, feel free to post the solution when you find it. Best |
Yeah, I also thought it was a bit weird that |
Figured it out... it was a silly mistake on my part. In the if (datumsPtr != nullptr && /* !datumsPtr->empty() && */ datumsPtr->size() == 3) The confusing part was that the work method receives a bunch of nullptr data between the real data, which is all I was seeing coming in. I'm not sure this is something I can change in Anyway, sorry for the bother! Thanks for your help! |
OK thanks for the feed-back! |
@pichiste Great that it works! Could you fork the repo with your added PS3Eye support or upload your modification somewhere? This would be awesome! |
@carstenschwede EDITED: Sorry, I missed the part about PS3Eye support. No, that part is not incorporated, the incorporated part is to automatically adapt the code to the number of cameras. Sorry for the confusion. pichiste answered with his code. |
@gineshidalgo99 Sorry, must have missed it. Thanks for the info. |
Hi @carstenschwede, in case you just want the WPs3Eye producer, I've attached the files here (ps3Eye.hpp and ps3Eye.cpp). You should be able to use it the same as the WPointGrey producer, as stated in the first post. I should note this is for Windows 10 + VS2015, and that WPs3Eye relies on these drivers: Here are my (old) notes on how to get the PS3EYEDriver drivers into the VS2015 project:
I ended up putting this on the backburner before I fully got 3d reconstruction working, but I think it was just a matter of entering more accurate camera calibration parameters. Would be curious to hear if you get this working! |
Hi, can i have the full code please? |
Issue summary
Hi there,
I'm attempting to get the 3D reconstruction demo working with input from some PS3 Eye cameras. I've got a custom producer (based on the
WPointGrey
class) handling the camera input and can see the pose detection working for each camera just fine. However, it seems thereconstruction3D
worker is not receiving the pose data.This is how the custom classes are initialized in
openpose3d.cpp
:I've only changed two lines, where I've swapped the
WPointGrey
producer for the customWPs3Eye
. As I mentioned above, 2D pose detection is working (it renders the webcam images + poses just fine!), but for some reason the pose data never shows up in theWReconstruction3D
post-process.More specifically, in
reconstruction3D.cpp
at the beginning ofwork
function,datumsPtr
is anullptr
:Any help with this would be much appreciated! If it's useful I can send along the webcam code, although it seems like it would be totally unrelated to the post-process stage (?).
Many thanks in advance!
Type of issue
System configuration
Operating system: Windows 10 Pro
CUDA version: 8.0
cuDNN version: 5.1
GPU model: NVIDIA GeForce 1080 Ti
Caffe version: default
OpenCV version: default
Compiler: Visual Studio 2015
The text was updated successfully, but these errors were encountered: