Giter Club home page Giter Club logo

pyoni's Introduction

# 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

pyoni's People

Contributors

eruffaldi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyoni's Issues

Installation not working

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

Trying to use from Anaconda prompt- Getting error

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

  1. Build error : Severity Code Description Project File Line Suppression State
    Error C2065 'packed': undeclared identifier anyregistration
    F:\pyoni\extern\anyregistration\anyregistration.cpp 12

2.Should Eigen3 folder be within pyoni folder. (Got Eigen3 from github).

  1. how to overcome this Error: F:\pyoni\src\pyonitool.py, line 31
    print sys.exc_info()

(FYI im not a python user)

thanks,
Mritula

Raw depth values

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 ?

Extracting frames

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

Build instructions

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.