Change font size
It is currently Tue Jun 30, 2026 10:33 am


Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
PostPosted: Wed Jan 16, 2013 4:29 am 

Joined: Sun Jun 26, 2011 10:17 pm
Posts: 2
I want to compare ipi soft tracking with openni/kinect sdk skeleton tracking.
Main idea is to record ONI file (using openni) or AVI file (using older version of iPi Recorder) and then convert one format to another.

Of course I choose to use iPi recorder because it is a software better suited for for recording long video sequences.
Quick look into frame structure and I got what I needed :
* component R was an Raw Bayer patter from RGB camera
* components B and G should be a 16 bit depth value.
I quickly written simple software to do this conversion, butt well I got stuck.
The problem is that value in B and G is not a '11bit raw depth' (it cannot by converted to depth by using equation depth = 0.1236f * Tan( val / 2842.5 + 1.1863 ) ), it isn't also correct depth value (in metres).

After some experimentation I know two things:
1. Value in G component can have only tree values : 3 ( pixel is before point X ), 4 ( point lies after point X ), 7 ( depth of point in not known )
2. Value in B is used to describe pseudo-depth.

Problem is that I don't know where point X lies or how to convert pseudo-depth to depth (in meters want to compare ipi soft tracking with openni/kinect sdk skeleton tracking.
Main idea is to record ONI file (using openni) or AVI file (using older version of iPi Recorder) and then convert one format to another.

Of course I choose to use iPi recorder because it is a software better suited for for recording long video sequences.
Quick look into frame structure and I got what I needed :
* component R was an Raw Bayer patter from RGB camera
* components B and G should be a depth value.
I quickly written simple software to do this conversion, butt well I got stuck.
The problem is that value in B and G is not a '11bit raw depth' (it cannot by converted to depth by using equation depth = 0.1236f * Tan( val / 2842.5 + 1.1863 ) ), it isn't also correct depth value.

After some experimentation I know two things:
1. Value in G component can have only tree values : 3 ( pixel is before point X ), 4 ( point lies after point X ), 7 ( depth of point in not known )
2. Value in B is used to describe pseudo-depth.

Problem is that I don't know where point X lies or how to convert pseudo-depth to depth (in meters).
I already tried function :
int depth(int G, int B) // in range <0, 512>
{
if (G == 7) { return 0; } // depth unknown
if (G == 3) { return B; }
return B + 255;
}

Is there any one from dev-team that could give equation to converting B, G components to depth (in meters), or 'raw depth value' ?


Top
 Profile  
 
PostPosted: Wed Jan 16, 2013 5:54 am 
iPi Soft

Joined: Wed Jan 11, 2012 6:12 am
Posts: 2355
Location: Moscow, Russia
Hi
Congratulations on successfully exploring details of AVI encoding employed in v1 of our software :)
You are correct about the meaning of Red component.
Green and Blue combined indeed represent raw depth value coming from the sensor. It is computed as Green * 256 + Blue (Blue is 8 low-order bits, Green is 3 high-order bits). Then, the formula you supplied is used to convert this raw value to meters.


Top
 Profile  
 
PostPosted: Wed Jan 16, 2013 6:57 am 

Joined: Sun Jun 26, 2011 10:17 pm
Posts: 2
Thank you very much.
I should have thought of this earlier, yet for some reason i was doing something like t= G + B<<8, or shuffling bits in t = t&0xF0 | (t&0xF<<8) | (t&0xF00>>8.

Again thank you very much and I hope that soon new iPi Recorder will be able to convert ipivideo to avi (or specification of ipivideo format will be available to public).


Top
 Profile  
 
PostPosted: Wed Jan 16, 2013 7:50 am 
iPi Soft

Joined: Wed Jan 11, 2012 6:12 am
Posts: 2355
Location: Moscow, Russia
dziwny_16 wrote:
I hope that soon new iPi Recorder will be able to convert ipivideo to avi (or specification of ipivideo format will be available to public).

Export to AVI will be intented solely for the purpose of getting color info from individual cameras in widely supported format. Not the same AVIs that were produced by iPi Recorder 1.x.
We do not plan to make any specification for iPiVideo format, as we do not expect it to be used anywhere outside of our software. If you are interested in using iPiVideo for another application, and have knowledge of Microsoft .NET, you can employ the iPiVideo.dll assembly from iPiRecorder. However, we cannot provide any support for this, and you will be on your own in exploring its API.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


Who is online

Users browsing this forum: No registered users and 69 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB® Forum Software © phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net