Why is Z data in [0..7] range?

65 lượt xem
Chuyển tới thư đầu tiên chưa đọc

rabidgremlin

chưa đọc,
16:14:21 1 thg 3, 20111/3/11
đến OSCeleton
Just wondering since X & Y are in [0..1] range ?

Jonathan

Ferhat Şen

chưa đọc,
17:19:33 1 thg 3, 20111/3/11
đến osce...@googlegroups.com
Hey Jonathan,

If you think of your skeleton, your hands can move within a certain range with reference to your body. Because, we have fixed bones :))
Consider that you open both of your arms sideways, that is the full range in X-axis that your hands can move. Same is true for the Y-axis if you think that you raise your arm upwards. But the depth range (the range in Z-axis) is much wider than two-arm distance. So I think it is a natural necessity to span the depth values into a wider range in order to have higher precision in z values.

I think this is is the reason, 
Ferhat

Tony Gonçalves

chưa đọc,
06:50:18 2 thg 3, 20112/3/11
đến osce...@googlegroups.com, Ferhat Şen
Ferhat's explanation is correct :)

The depth sensor on the kinect is supposed to sense up to 10 meters in depth, while the widht and height of the image are much more limited than this. I chose these values as a way to avoid distortion of the coordinates (for example, 0.1 should correspond to the same real-world distance in every axis).

I've been thinking of adding a mode that uses no normalization, and sends all the distances in milimetres. Do you guys think this could be useful?


Tony
--


Tony Gonçalves
Partner





IPN Incubadora

Rua Pedro Nunes

3030-199 Coimbra, Portugal


Tel  : +351 927 474 665

Tel  : +351 239 700 358

Fax : +351 239 700 301


in...@sensebloom.com

www.sensebloom.com


christoph.pickl

chưa đọc,
09:11:21 2 thg 3, 20112/3/11
đến OSCeleton
i already wondered what these numbers actually are... now i know, some
kind of normalized values to fit into 0-1/0-1/0-7, although i can
remember getting values for x/y higher than 1.0...?
adding a mode which sends coordinates in mm (millimeters) could be
quiet useful, i guess. depends on how much effort it would be to add
this functionality...

nevertheless (independent of these numbers are millimeters or
something else) i am thinking of two different approaches which are
more high-level:
1. add a calibration gesture to fix the position (of the torso)
initially, and then get coordinates only relatively to this position.
2. add a calibration process where the user has to move to the edges
to calculate the maximum values (of x/y/z and any body part), and then
construct a cube within this area to create kind of "valid
playground".

~christoph

BTW: great work tony! appreciate it a lot!

On Mar 2, 12:50 pm, Tony Gonçalves <t...@sensebloom.com> wrote:
> Ferhat's explanation is correct :)
>
> The depth sensor on the kinect is supposed to sense up to 10 meters in
> depth, while the widht and height of the image are much more limited than
> this. I chose these values as a way to avoid distortion of the coordinates
> (for example, 0.1 should correspond to the same real-world distance in every
> axis).
>
> I've been thinking of adding a mode that uses no normalization, and sends
> all the distances in milimetres. Do you guys think this could be useful?
>
> Tony
>
>
>
> On Tue, Mar 1, 2011 at 10:19 PM, Ferhat Şen <ferhat...@gmail.com> wrote:
> > Hey Jonathan,
>
> > If you think of your skeleton, your hands can move within a certain range
> > with reference to your body. Because, we have fixed bones :))
> > Consider that you open both of your arms sideways, that is the full range
> > in X-axis that your hands can move. Same is true for the Y-axis if you think
> > that you raise your arm upwards. But the depth range (the range in Z-axis)
> > is much wider than two-arm distance. So I think it is a natural necessity to
> > span the depth values into a wider range in order to have higher precision
> > in z values.
>
> > I think this is is the reason,
> > Ferhat
>
> > On Tue, Mar 1, 2011 at 11:14 PM, rabidgremlin <rabidgrem...@gmail.com>wrote:
>
> >> Just wondering since X & Y are in [0..1] range ?
>
> >> Jonathan
>
> --
>
> Tony Gonçalves
> Partner
>
> t...@sensebloom.com
>
> IPN Incubadora
>
> Rua Pedro Nunes
>
> 3030-199 Coimbra, Portugal
>
> Tel  : +351 927 474 665
>
> Tel  : +351 239 700 358
>
> Fax : +351 239 700 301
>
> i...@sensebloom.com
>
> www.sensebloom.com

Robbie Clemons

chưa đọc,
09:42:33 2 thg 3, 20112/3/11
đến OSCeleton
I think a format without normalization would be great. Currently I'm
taking the joint coordinates and converting them back to mm. This
works well, but it would be nice to not have to do that.

On Mar 2, 6:50 am, Tony Gonçalves <t...@sensebloom.com> wrote:
> Ferhat's explanation is correct :)
>
> The depth sensor on the kinect is supposed to sense up to 10 meters in
> depth, while the widht and height of the image are much more limited than
> this. I chose these values as a way to avoid distortion of the coordinates
> (for example, 0.1 should correspond to the same real-world distance in every
> axis).
>
> I've been thinking of adding a mode that uses no normalization, and sends
> all the distances in milimetres. Do you guys think this could be useful?
>
> Tony
>
>
>
>
>
>
>
>
>
> On Tue, Mar 1, 2011 at 10:19 PM, Ferhat Şen <ferhat...@gmail.com> wrote:
> > Hey Jonathan,
>
> > If you think of your skeleton, your hands can move within a certain range
> > with reference to your body. Because, we have fixed bones :))
> > Consider that you open both of your arms sideways, that is the full range
> > in X-axis that your hands can move. Same is true for the Y-axis if you think
> > that you raise your arm upwards. But the depth range (the range in Z-axis)
> > is much wider than two-arm distance. So I think it is a natural necessity to
> > span the depth values into a wider range in order to have higher precision
> > in z values.
>
> > I think this is is the reason,
> > Ferhat
>
> > On Tue, Mar 1, 2011 at 11:14 PM, rabidgremlin <rabidgrem...@gmail.com>wrote:
>
> >> Just wondering since X & Y are in [0..1] range ?
>
> >> Jonathan
>
> --
>
> Tony Gonçalves
> Partner
>
> t...@sensebloom.com
>
> IPN Incubadora
>
> Rua Pedro Nunes
>
> 3030-199 Coimbra, Portugal
>
> Tel  : +351 927 474 665
>
> Tel  : +351 239 700 358
>
> Fax : +351 239 700 301
>
> i...@sensebloom.com
>
> www.sensebloom.com

Toby Freeman

chưa đọc,
15:39:41 7 thg 3, 20117/3/11
đến OSCeleton
How do you convert from the coordinates to mm? This would greatly help
my project if it could tell me mm.

Robbie Clemons

chưa đọc,
18:21:46 7 thg 3, 20117/3/11
đến osce...@googlegroups.com
I'm using:
            x = 1280 - x * 2560
            y = 960 - y * 1920
            z = -args[4] * 1280

This just puts the coordinates back in original form, but I think I may have negated the z value for my project, don't remember.

Toby Freeman

chưa đọc,
06:07:19 8 thg 3, 20118/3/11
đến OSCeleton
Thank you very much. This will help a lot. However I am using
Processing for my coding and I don't know what the "args[4]" bit is.
Is it just multiplying the z value by 1280?

Toby Freeman

chưa đọc,
06:25:22 8 thg 3, 20118/3/11
đến OSCeleton
Tried it and it works perfectly thank you again.

rabidgremlin

chưa đọc,
16:43:24 14 thg 3, 201114/3/11
đến OSCeleton
But why did you settle on 7 ? (Just curious)

Getting the data in mm would be very useful as would joint rotations.

In fact I have forked the code and I have been making these types of
changes for a specific project I am working on:
https://github.com/rabidgremlin/OSCeleton-Puppet

Cheers

Jonathan

On Mar 3, 12:50 am, Tony Gonçalves <t...@sensebloom.com> wrote:
> Ferhat's explanation is correct :)
>
> The depth sensor on the kinect is supposed to sense up to 10 meters in
> depth, while the widht and height of the image are much more limited than
> this. I chose these values as a way to avoid distortion of the coordinates
> (for example, 0.1 should correspond to the same real-world distance in every
> axis).
>
> I've been thinking of adding a mode that uses no normalization, and sends
> all the distances in milimetres. Do you guys think this could be useful?
>
> Tony
>
>
>
> On Tue, Mar 1, 2011 at 10:19 PM, Ferhat Şen <ferhat...@gmail.com> wrote:
> > Hey Jonathan,
>
> > If you think of your skeleton, your hands can move within a certain range
> > with reference to your body. Because, we have fixed bones :))
> > Consider that you open both of your arms sideways, that is the full range
> > in X-axis that your hands can move. Same is true for the Y-axis if you think
> > that you raise your arm upwards. But the depth range (the range in Z-axis)
> > is much wider than two-arm distance. So I think it is a natural necessity to
> > span the depth values into a wider range in order to have higher precision
> > in z values.
>
> > I think this is is the reason,
> > Ferhat
>
> > On Tue, Mar 1, 2011 at 11:14 PM, rabidgremlin <rabidgrem...@gmail.com>wrote:
>
> >> Just wondering since X & Y are in [0..1] range ?
>
> >> Jonathan
>
> --
>
> Tony Gonçalves
> Partner
>
> t...@sensebloom.com
>
> IPN Incubadora
>
> Rua Pedro Nunes
>
> 3030-199 Coimbra, Portugal
>
> Tel  : +351 927 474 665
>
> Tel  : +351 239 700 358
>
> Fax : +351 239 700 301
>
> i...@sensebloom.com
>
> www.sensebloom.com

christoph.pickl

chưa đọc,
20:23:39 20 thg 3, 201120/3/11
đến OSCeleton
yes, after thinking about this a couple of days, i agree as well: it
would be definitely helpful to to have millimeters (as well as
normalized data; which is BTW strangely not [0.0..1.0] for X/Y, but
rather [-0.2..1.2] ;)

i think i read somewhere that this is even what is the underlying
framework providing?

for the sake of completeness: do you agree with the following:
* 0.4 in X and Y direction is about 1 meter
* 0.8 in Z (exactly twice as much) is about 1 meter

@Robbie Clemons: i guess you are using similar assumptions to
calculate the mm??

~christoph

Robbie Clemons

chưa đọc,
11:20:35 21 thg 3, 201121/3/11
đến osce...@googlegroups.com
I believe GetSkeletonJointPosition provides joint positions in mm by default and that is what OSCeleton is using.  But if you look on lines 160-162 of OSCeleton.cpp the coordinates are being modified as follows:

jointCoords[0] = off_x + (mult_x * (1280 - joint.position.X) / 2560); //Normalize coords to 0..1 interval
jointCoords[1] = off_y + (mult_y * (960 - joint.position.Y) / 1920); //Normalize coords to 0..1 interval
jointCoords[2] = off_z + (mult_z * joint.position.Z * 7.8125 / 10000); //Normalize coords to 0..7.8125 interval

I just reversed that in my code.

christoph.pickl

chưa đọc,
12:03:36 22 thg 3, 201122/3/11
đến OSCeleton
nice :)

"Do you guys think this could be useful?" => yes! VOTE UP for adding a
command line argument which disables normalization.

PS: i am receiving negative values on the edges, so probably "1280 -
joint.position.X" is incorrect?

On Mar 21, 4:20 pm, Robbie Clemons <robclem...@gmail.com> wrote:
> I believe GetSkeletonJointPosition provides joint positions in mm by default
> and that is what OSCeleton is using.  But if you look on lines 160-162 of
> OSCeleton.cpp the coordinates are being modified as follows:
>
> jointCoords[0] = off_x + (mult_x * (1280 - joint.position.X) / 2560);
> //Normalize coords to 0..1 interval
> jointCoords[1] = off_y + (mult_y * (960 - joint.position.Y) / 1920);
> //Normalize coords to 0..1 interval
> jointCoords[2] = off_z + (mult_z * joint.position.Z * 7.8125 / 10000);
> //Normalize coords to 0..7.8125 interval
>
> I just reversed that in my code.
>
> On Sun, Mar 20, 2011 at 8:23 PM, christoph.pickl
> <christoph.pi...@gmail.com>wrote:

Carl Faia

chưa đọc,
12:43:56 22 thg 3, 201122/3/11
đến osce...@googlegroups.com
Also receiving negative values...

Yes to disable normalization..

Tony Gonçalves

chưa đọc,
10:11:43 23 thg 3, 201123/3/11
đến osce...@googlegroups.com, christoph.pickl
No need to vote, I'm adding it in the next version ;)

PS: Sorry for taking so long, but I've been under alot of work in the last weeks.
--


Tony Gonçalves
Partner





IPN Incubadora

Rua Pedro Nunes

3030-199 Coimbra, Portugal


Tel  : +351 927 474 665

Tel  : +351 239 700 358

Fax : +351 239 700 301



Robbie Clemons

chưa đọc,
10:54:05 23 thg 3, 201123/3/11
đến osce...@googlegroups.com
I believe the comments are wrong.  It should give you values from -1 to 1 or from -1280 to 1280 and -960 to 960 if you undo the "normalization".

2011/3/23 Tony Gonçalves <to...@sensebloom.com>

Tony Gonçalves

chưa đọc,
07:40:27 24 thg 3, 201124/3/11
đến osce...@googlegroups.com, Robbie Clemons
Actually, the normalization performed by OSCeleton is wrong. Since I didn't know at the time that OpenNI provided measurements in mm I just used values that seemed sane when I visualized them in 3D.

I had thoughts on correcting it since, but that might break some people's software, so I guess I'll just add new options for the time being ;)

Carl Faia

chưa đọc,
07:43:32 24 thg 3, 201124/3/11
đến osce...@googlegroups.com
Great!

christoph.pickl

chưa đọc,
09:47:23 24 thg 3, 201124/3/11
đến OSCeleton
@Tony: agree, not breaking the API (even when correcting things) is
indeed something one should not mess with :)

many thanks, much appreciate it!

~christoph


On Mar 24, 12:40 pm, Tony Gonçalves <t...@sensebloom.com> wrote:
> Actually, the normalization performed by OSCeleton is wrong. Since I didn't
> know at the time that OpenNI provided measurements in mm I just used values
> that seemed sane when I visualized them in 3D.
>
> I had thoughts on correcting it since, but that might break some people's
> software, so I guess I'll just add new options for the time being ;)
>
> On Wed, Mar 23, 2011 at 2:54 PM, Robbie Clemons <robclem...@gmail.com>wrote:
>
>
>
> > I believe the comments are wrong.  It should give you values from -1 to 1
> > or from -1280 to 1280 and -960 to 960 if you undo the "normalization".
>
> > 2011/3/23 Tony Gonçalves <t...@sensebloom.com>
Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới