eruffaldi / pyoni Goto Github PK
View Code? Open in Web Editor NEWPure python tool for manipulating OpenNI recorded files (oni). This tool supports extraction of data, time rescaling and fix of broken files.
License: MIT License
Pure python tool for manipulating OpenNI recorded files (oni). This tool supports extraction of data, time rescaling and fix of broken files.
License: MIT License
# pyoni Pure python tool for manipulating OpenNI recorded files (oni). This tool supports extraction of data, time rescaling and fix of broken files. Options ======================= ``` usage: pyonitool.py [-h] [--info] [--times] [--seeks] [--dump] [--copy] [--rescale RESCALE] [--fixcut] [--checkcut] [--dupframes DUPFRAMES] [--stripcolor] [--stripdepth] [--stripir] [--registercolor] [--registerdepth] [--mjpeg] [--extractcolor EXTRACTCOLOR] [--extractdepth EXTRACTDEPTH] [--extractir EXTRACTIR] [--fseek FSEEK] [--fduration FDURATION] [--skipframes SKIPFRAMES] [--coloreddepth] [--output OUTPUT] [--cutbytime CUTBYTIME] [--cutbyframe CUTBYFRAME] file Scan OpenNI ONI files positional arguments: file ONI filename optional arguments: -h, --help show this help message and exit --info --times print times of each frame --seeks print seeks --dump --copy simply copies the content of the ONI via parsing (rebuilds the seektable only) --rescale RESCALE rescale timings --fixcut fixes cut file NOT TESTED HERE --checkcut checks if file was cut NOT TESTED HERE --dupframes DUPFRAMES duplicate frames --stripcolor --stripdepth --stripir removes IR --registercolor registers color over depth --registerdepth registers depth over color --mjpeg extract the color stream as motion jpeg --extractcolor EXTRACTCOLOR extract the color stream single jpeg or png images. This option specifies the target path, numbering is the frame number --extractdepth EXTRACTDEPTH extract the depth stream single png images. This option specifies the target path, numbering is the frame number --extractir EXTRACTIR extract the depth stream single png images. This option specifies the target path, numbering is the frame number --fseek FSEEK seek frame for extract --fduration FDURATION duration of extraction in frames --skipframes SKIPFRAMES skip n frames --coloreddepth colored depth --output OUTPUT --cutbytime CUTBYTIME cut by specifing time in seconds: startseconds,endseconds --cutbyframe CUTBYFRAME cut by specifing time in frames: startframe,endframe ``` Build ======================= Just: python setup.py install References ======================= https://github.com/OpenNI/OpenNI2/blob/master/Source/Drivers/OniFile/DataRecords.cpp https://github.com/OpenNI/OpenNI2/blob/master/Source/Core/OniRecorder.cpp https://github.com/OpenNI/OpenNI2/blob/master/Source/Core/OniDataRecords.cpp CODECS: https://github.com/OpenNI/OpenNI2/blob/5b88c95e4f8d19b95713e3c873c7d07e48e5605b/Source/Drivers/OniFile/Formats/Xn16zEmbTablesCodec.h https://github.com/OpenNI/OpenNI2/blob/5b88c95e4f8d19b95713e3c873c7d07e48e5605b/Source/Drivers/OniFile/Formats/XnStreamCompression.cpp
Hi !
I'm actually in Master 2 degree intership and I work on OpenNi recorded files for my subject, I found your git deposit with many intersting functions, but I have a lot of problem to install and use it. Firstly I clone your deposit and change all '.py' code to Python 3.8 version (change 'print' lines) and I run 'python setup.py install' in my terminal (I need to work on Anaconda for Windows 10, I try on Ubuntu 20. and it wasn't worked), to process I had to install "Visual Studio C++" on my computer. The installation of setup still doesn't work and I have this error : "error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2"
I don't know how resolve it, and why it's not working on Ubuntu device ; do you have an idea and/or solution for me ?
Thanks a lot
Hi Im trying to use pyoni tool (from anaconda prompt but getting error) to extract the jpg frames from oni's . Im not able to build it and experiencing the following errors, would be great if you could help, thanks
2.Should Eigen3 folder be within pyoni folder. (Got Eigen3 from github).
(FYI im not a python user)
thanks,
Mritula
Hello,
thank you for the very useful tool.
I'd like to retrieve the actual depth values (e.g. centimeters) from the exported png depth images.
Is that possible ? Can you provide me any insight about how a pixel value is established on the basis of the raw depth within your tool ?
Dear Dr. Ruffaldi,
I am very much interested in human action recognition. I found your tool very useful. However, I am not able to extract the frames and depth from an oni file. Could you please provide the arguments needed after --extractframes or --extractdepth? What EXTRACTFRAME and EXTRACTDEPTH exactly mean?
Thank you for your response.
Kind regards,
Rollyn Labuguen
I was happy to have found this project, as I am playing around with ONI recordings right now.
However, I cannot get it to build. I have no experience with CMake, so excuse my naivity.
cd extern/anyregistration
cmake .
# seems to have worked
cd ../xndec
cmake .
# seems to also have worked
Now what do I need to do? I tried pip install .
which failed:
extern/anyregistration/anyregistration.cpp:4:10: fatal error: 'Eigen/Dense' file not found
#include <Eigen/Dense>
^
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/var/folders/xw/99wk0h_n2kv6h04l9p5f_c800000gn/T/pip-Vn53cU-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xw/99wk0h_n2kv6h04l9p5f_c800000gn/T/pip-3cXMKU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/folders/xw/99wk0h_n2kv6h04l9p5f_c800000gn/T/pip-Vn53cU-build/
Also, I tried to run cmake .
on the top level as well, which also failed:
CMake Error at CMakeLists.txt:3 (add_library):
Cannot find source file:
xn16zdec.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: xn16zdec
CMake Error: Cannot determine link language for target "xn16zdec".
Can you give me any pointers to how I can get this working?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.