derzu / BodySkeletonTracker

Human body skeleton detection an tracking from video camera in real time. It was developed for an Orbbec Astra camera DRGB (Depth-RGB), uses the OpenNI2 driver, it also works with Asus Xtion and Prime sense. It works with normal webcam too, in the case of background is smooth and white.
MIT License
123 stars 45 forks source link

compile BodySkeletonTracker for webcam #4

Closed linzheming closed 6 years ago

linzheming commented 6 years ago

Hey Derzu, We wanted to run the code for webcam, so I comment out this line in Makefile。 #CFLAGS += -DDEPTH

It was compiled successfully. But when I tried to run BodySkeletonTracker , I got the following error:

james@james-virtual-machine:~/BodySkeletonTracker/Bin/x64-Release$ ./BodySkeletonTracker 
main::Compilado SEM Depth
Compilado SEM Depth
select timeout
select timeout
OpenCV Error: Assertion failed (total() == 0 || data != __null) in Mat, file /home/james/opencv/modules/core/include/opencv2/core/mat.inl.hpp, line 500
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/james/opencv/modules/core/include/opencv2/core/mat.inl.hpp:500: error: (-215) total() == 0 || data != __null in function Mat

Aborted (core dumped)

Could you please help me understand this?

Regards, james

derzu commented 6 years ago

Hi Linzheming,

Did you tried to compile with the original Makefile? If so, use the file Makefile.noDepth.

You can simply replace the files doing:

mv Makefile.noDepth Makefile

Please try that and give me a feedback.

Best regards,

Derzu.

linzheming commented 6 years ago

Hey Derzu, After changeing a webcam, it's works. Thank you for your reply.