We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I'm working with dLib-freenect (https://github.com/diwi/dLibs) to use kinect v1 with PC and Processing 3. The mirror method used with openKinect doesn't work : kinect_.enableMirror(true);
Same problem with kinect_.set Mirror(true);
There is no mirror method with dLib-freenect.
So I tried something like that :
int[] rawDepth = kinect_depth_.getRawDepth();
for(int i =0; i < kinectFrame_size_x; i++) {
for(int j =0; j < kinectFrame_size_y; j++) {
//int offset = i+j*kinectFrame_size_x;
//I try to flip the depth image
int offset = (kinectFrame_size_x-i-1)+j*kinectFrame_size_x;
int d = rawDepth[offset];
... } }
but the image is not flipped. Any idea ?
Thanks a lot !
Answers
I tried using :
int offset = i+j*kinectFrame_size_x;
orint offset = kinectFrame_size_x-i-1+j*kinectFrame_size_x;
as I saw this post : https://forum.processing.org/one/topic/un-mirror-an-image.html but nothing change, kinect image is not flipped. Can you help me ?I solved the problem :
@chambefort Thxs for sharing your answer!
Kf