Comments (17)
Hi,
I had not considered to add playback. Is there any benefit on using the built in record function instead of saving the images using OpenCV?
However, I think adding playback to visualize already recorded data could be interesting. For example, record the data using the visualizer in the Kinect Azure SDK and then read that playback in python to perform some processing. I will look into that this weekend if I have time.
Ibai
from pykinectazure.
Hi
I have already resolved it,
record and playback functions are in k4arecord.dll.
Thank you for your reply.
from pykinectazure.
I am glad to hear that. Could you add a link to your code?
It might help other people that want that also.
Ibai
from pykinectazure.
class k4a:
def __init__(self, modulePath):
try:
dll = ctypes.CDLL(modulePath)
recorddll = ctypes.CDLL(modulePath.replace('k4a.dll', 'k4arecord.dll'))
except Exception as e:
try:
dll = ctypes.CDLL('k4a.so')
recorddll = ctypes.CDLL('k4arecord.so')
except Exception as ee:
print("Failed to load library", e, ee)
sys.exit(1)
self.k4a_record_create = recorddll.k4a_record_create
self.k4a_record_create.restype = k4a_result_t
self.k4a_record_create.argtypes = (ctypes.POINTER(ctypes.c_char), \
k4a_device_t, \
k4a_device_configuration_t, \
ctypes.POINTER(k4a_record_t),\
)
self.k4a_record_write_header = recorddll.k4a_record_write_header
self.k4a_record_write_header.restype = k4a_result_t
self.k4a_record_write_header.argtypes = (k4a_record_t,)
self.k4a_record_write_capture = recorddll.k4a_record_write_capture
self.k4a_record_write_capture.restype = k4a_result_t
self.k4a_record_write_capture.argtypes = (k4a_record_t, \
k4a_capture_t)
self.k4a_record_flush = recorddll.k4a_record_flush
self.k4a_record_flush.restype = k4a_result_t
self.k4a_record_flush.argtypes = (k4a_record_t,)
self.k4a_record_close = recorddll.k4a_record_close
self.k4a_record_close.restype = None
self.k4a_record_close.argtypes = (k4a_record_t,)
self.k4a_playback_open = recorddll.k4a_playback_open
self.k4a_playback_open.restype = k4a_result_t
self.k4a_playback_open.argtypes = (ctypes.POINTER(ctypes.c_char), \
ctypes.POINTER(k4a_playback_t),)
self.k4a_playback_close = recorddll.k4a_playback_close
self.k4a_playback_close.restype = None
self.k4a_playback_close.argtypes = (k4a_playback_t,)
self.k4a_playback_get_next_capture = recorddll.k4a_playback_get_next_capture
self.k4a_playback_get_next_capture.restype = k4a_stream_result_t
self.k4a_playback_get_next_capture.argtypes = (k4a_playback_t, \
ctypes.POINTER(k4a_capture_t),)
self.k4a_playback_get_calibration = recorddll.k4a_playback_get_calibration
self.k4a_playback_get_calibration.restype = k4a_result_t
self.k4a_playback_get_calibration.argtypes = (k4a_playback_t, \
ctypes.POINTER(k4a_calibration_t), \
)
from pykinectazure.
Thank you @lsding, I will try to test it this weekend and added it to the repository.
from pykinectazure.
Thank you @lsding, I will try to test it this weekend and added it to the repository.
Hi, Did you add it to the repos?
from pykinectazure.
Actually, I did not. In order to test it I had to also modify other parts of the code.
I might give it a try now.
from pykinectazure.
Actually, I did not. In order to test it I had to also modify other parts of the code.
I might give it a try now.
Great! Could you give some examples of playback and record?
from pykinectazure.
Working on that now. I will try to upload them in a couple of hours.
from pykinectazure.
Working on that now. I will try to upload them in a couple of hours.
Thank you so much. Looking forward to your good news.
from pykinectazure.
Working on that now. I will try to upload them in a couple of hours.
Nice job! Very glad to see the recording example.
Could you add a playback example in the following hours? Thank you.
from pykinectazure.
Working on that also, but it is a bit more nested with the k4a library. It might take a while.
from pykinectazure.
Working on that also, but it is a bit more nested with the k4a library. It might take a while.
Thanks for your efforts. Have you made any progress on it?
from pykinectazure.
I have ended up doing a major refactor to the repository, I almost have finished but there are some parts that are not working correctly.
I will probably finish it this weekend (no time during the week).
from pykinectazure.
Any updates here?
from pykinectazure.
I am still busy with other projects, my recommendation for now is to use this other repository:
https://github.com/etiennedub/pyk4a/tree/master/pyk4a
from pykinectazure.
As mentioned in #35:
"I have uploaded a major refactor that was long overdue. I have added an example "examplePlaybackBodyTracker.py" to perform body tracking in a recording that did not have body tracking enabled."
from pykinectazure.
Related Issues (20)
- AttributeError: 'Tracker' object has no attribute '_handle' HOT 2
- Add record-length option to configuration?
- How can I save colored point clouds as .pcd or .ply by depthimage and colorimage? HOT 3
- Support for converting "k4arecorder" recordings?
- Open3dVisualizer runs slowly
- Offset in Y direction
- how to change color image and transformed color image to bgra32 format? HOT 1
- Support for synchronized captures? HOT 2
- Put K4ABT_JOINT_ constants into enum and use them consistently
- how to set exposure time/whilt balance/brightness value manually? HOT 1
- 'Tracker' object has no attribute '_handle', is the version problem?
- Run on GPU?
- something worng with infraredimage.py
- Set up the project again HOT 2
- Integration with ros
- How do I convert smoothed depth data to point cloud data?
- how to set colored image
- Persistence of body_id HOT 2
- Body and gesture tracking HOT 1
- Problem recording depth and color videos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pykinectazure.