KirillLykov / oni2avi

Command-line converter from oni (OpenNI) to avi data format
Other
12 stars 10 forks source link

Does this converter work for Orbbec camera? #9

Closed lixueyi83 closed 7 years ago

lixueyi83 commented 7 years ago

Right now i am using orbbec camera to do the test, i can record the .oni file from orbbec camera. My silly question is does this converter work for this oni file? Does the different camera make difference?

Thanks.

KirillLykov commented 7 years ago

I guess oni data format shall not depend on the camera, just try to use it and, in case, if it doesn't work, give me your oni and I will try.

lixueyi83 commented 7 years ago

I think i tried but i could not compile on Ubuntu 16.04, i have successfully installed OpenNI2 and OpenCV3 and basically i want to capture video streams from orbbec camera using OpenNi then save those video frames into a video file through OpenCV, better directly. I tried to find a solution but have succeed yet. Then i came across your oni2avi program, thanks for that.

Is there any other prerequisite before compile your program on Ubuntu 16.04? Thanks.

Sent from my iPhone

On May 11, 2017, at 1:23 AM, Kirill Lykov notifications@github.com wrote:

I guess oni data format shall not depend on the camera, just try to use it and, in case, if it doesn't work, give me your oni and I will try.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

KirillLykov commented 7 years ago

Boost should be installed, you can write here your compilation output. Btw, try both cmake and make. Check out Makefile for dependencies (LIBS variable), and path to them (if with Linux).

lixueyi83 commented 7 years ago

Boost was installed. the problem i am facing is the cmake, the opencv is apparently installed i can use opencv to do some image processing..but with this convertor it seems the opencv is not seen.

The below is the information when i run cmake..

OpenCV version i am using:

define CV_VERSION_EPOCH 2

define CV_VERSION_MAJOR 4

define CV_VERSION_MINOR 9

define CV_VERSION_REVISION 1

cmake ..

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find OpenCV (missing: contrib) (found version "3.2.0") Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/OpenCV/OpenCVConfig.cmake:260 (find_package_handle_standard_args) CMakeLists.txt:17 (find_package)

-- Configuring incomplete, errors occurred! See also "/media/sf_VBox/oni2avi-master/build/CMakeFiles/CMakeOutput.log".

On Thu, May 11, 2017 at 7:32 AM, Kirill Lykov notifications@github.com wrote:

Boost should be installed, you can write here your compilation output. Btw, try both cmake and make. Check out Makefile for dependencies (LIBS variable), and path to them (if with Linux).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KirillLykov/oni2avi/issues/9#issuecomment-300807791, or mute the thread https://github.com/notifications/unsubscribe-auth/AX5yMW4HYx4qv0wXw5PRS-GSiFCuv2N9ks5r4xvqgaJpZM4NXX03 .

KirillLykov commented 7 years ago

It writes that you don't have one of the opencv libraries called "contrib". Recheck that you have all the libs: opencv_video opencv_highgui opencv_core opencv_imgproc opencv_contrib. And also try both make also if cmake doesn't work.

KirillLykov commented 7 years ago

+lixueyi83, how is it going with your build problem? Have you tried installing contrib? Alternatively you can try to skip this lib in make file and check if it links. May be they moved functionality from contrib to the main libraries meanwhile.

lixueyi83 commented 7 years ago

Hi KirillLykov,

Thanks for your still concerning my issue and right I can successfully install opencv_contri module there is another small issue below for me to figure out. Maybe you know that, if so please spare me your suggestion. Thanks.

g++ -O2 -I/usr/local/include/ni -I/usr/local/include/opencv -c oni2avi.cpp oni2avi.cpp:19:26: fatal error: XnCppWrapper.h: No such file or directory compilation terminated. Makefile:43: recipe for target 'oni2avi.o' failed make: [oni2avi.o] Error 1 (ignored) g++ -o oni2avi oni2avi.o -L/usr/local/lib/ -lOpenNI -lboost_system-mt -lboost_program_options-mt -lboost_filesystem-mt -lopencv_video -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_contrib g++: error: oni2avi.o: No such file or directory Makefile:40: recipe for target 'oni2avi' failed make: [oni2avi] Error 1 (ignored)

On Thu, May 18, 2017 at 2:55 AM, Kirill Lykov notifications@github.com wrote:

+lixueyi83, how is it going with your build problem? Have you tried installing contrib? Alternatively you can try to skip this lib in make file and check if it links. May be they moved functionality from contrib to the main libraries meanwhile.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

KirillLykov commented 7 years ago

The problem is openni version - I tried only with v1.5.6, you use v2. I will try to have look later today what shall be modified to make it compile with openni2

lixueyi83 commented 7 years ago

Well, thanks for your spending so much time on this project. Stay in touch and wish you have a very lovely day.

Regards, Li Xueyi

On May 19, 2017, at 1:40 AM, Kirill Lykov notifications@github.com wrote:

The problem is openni version - I tried only with v1.5.6, you use v2. I will try to have look later today what shall be modified to make it compile with openni2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

KirillLykov commented 7 years ago

Hi again, try the following

git pull
git checkout openni2
make

I don't have linux with openni so check if the path to openni2 in Makefile are specified correctly

KirillLykov commented 7 years ago

Did you have time to check it out? I wanted to merge this branch with master if it seems so

lixueyi83 commented 7 years ago

Hi,

Sorry for the late response and i just downloaded zip file from the repository and i won't allow me cmake .., also i tried to directly make, still cannot compile.

Sorry again for the late response and recently days the projects keep me busy..stay in touch to see if there is anything else i can help.

Li

On Mon, May 29, 2017 at 5:54 AM, Kirill Lykov notifications@github.com wrote:

Did you have time to check it out? I wanted to merge this branch with master if it seems so

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

KirillLykov commented 7 years ago

What does make writes? I haven't touched cmake (i personally don't like it). I guess it cannot find some library pathes. Since I'm on mac, I don't know pathes for the dependencies

lixueyi83 commented 7 years ago

Hi,

I just have a chance tried and the result shows below:

g++ -O2 -I/usr/local/include/ni -I/usr/local/include/opencv -c oni2avi.cpp oni2avi.cpp:19:26: fatal error: XnCppWrapper.h: No such file or directory compilation terminated. Makefile:43: recipe for target 'oni2avi.o' failed make: [oni2avi.o] Error 1 (ignored) g++ -o oni2avi oni2avi.o -L/usr/local/lib/ -lOpenNI -lboost_system-mt -lboost_program_options-mt -lboost_filesystem-mt -lopencv_video -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_contrib g++: error: oni2avi.o: No such file or directory Makefile:40: recipe for target 'oni2avi' failed make: [oni2avi] Error 1 (ignored)

On Mon, May 29, 2017 at 12:34 PM, Kirill Lykov notifications@github.com wrote:

What does make writes? I haven't touched cmake (i personally don't like it)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KirillLykov/oni2avi/issues/9#issuecomment-304719959, or mute the thread https://github.com/notifications/unsubscribe-auth/AX5yMTbO1iVtmJ_cJFMlSHBF5gJHtH9Mks5r-x28gaJpZM4NXX03 .

KirillLykov commented 7 years ago

It looks like you use the old version. Did you do git pull and than checkout openni2 branch? Looks like you still use master branch. In case if you use zip download, you first need to choose corresponding branch and than download (https://github.com/KirillLykov/oni2avi/tree/openni2)

lixueyi83 commented 7 years ago

Hi,

I downloaded the latest one and there is some compile error with boost library: clang++ -o oni2avi oni2avi.o -L/usr/local/lib/ -lOpenNI2 -lboost_system-mt -lboost_program_options-mt -lboost_filesystem-mt -lopencv_video -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_contrib /usr/bin/ld: cannot find -lboost_system-mt /usr/bin/ld: cannot find -lboost_program_options-mt /usr/bin/ld: cannot find -lboost_filesystem-mt clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:40: recipe for target 'oni2avi' failed make: [oni2avi] Error 1 (ignored)

then i did some research and modified the Makefile, but still there is some error: clang++ -o oni2avi oni2avi.o -L/usr/local/lib/ -lOpenNI2 -lboost_system -lboost_program_options -lboost_filesystem -lopencv_video -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_contrib /usr/bin/ld: oni2avi.o: undefined reference to symbol '_ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE' //usr/local/lib/libopencv_imgcodecs.so.3.1: error adding symbols: DSO missing from command line clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:41: recipe for target 'oni2avi' failed make: [oni2avi] Error 1 (ignored)

Wish you enjoy a very wonderful day.

Li

On Wed, May 31, 2017 at 1:56 PM, Kirill Lykov notifications@github.com wrote:

It looks like you use the old version. Did you do git pull and than checkout openni2 branch? Looks like you still use master branch. In case if you use zip download, you first need to choose corresponding branch and than download (https://github.com/KirillLykov/oni2avi/tree/openni2)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KirillLykov/oni2avi/issues/9#issuecomment-305314980, or mute the thread https://github.com/notifications/unsubscribe-auth/AX5yMZokZcUN4ZtxTt75yEXtdJvo-14vks5r_dQWgaJpZM4NXX03 .

KirillLykov commented 7 years ago

I guess you are using opencv3, so I did some updates in the makefile (yet it is still using multithreading with boost, so fix it for your installation). try to download it again and if doesn't work, post compiler output. After checking make, could you also check cmake (I updated it as well)?