Questions Regarding Code & Algorithms

9194 views
Skip to first unread message

Rohan Anil

unread,
Nov 18, 2010, 3:02:41 AM11/18/10
to openk...@googlegroups.com
Hi All,

Have someone written the audio + motor control for Linux ? I tried
controlling the motor using PyUSB from
http://ladyada.net/learn/diykinect/ and It works - wondering if the C
directory on the git repository has support for it? I guess its all
about just sending the correct request and value using the libusb api.

Secondly, Can some one give me pointers on how to view the Cloud of
Points in Linux - Is there a utility out there ? I found
http://idav.ucdavis.edu/~okreylos/ResDev/Kinect/ this but It says you
need to wait for the next release of its dependency.


Regarding Algorithms,

I have seen some videos on youtube where they do back subtraction to
get the Human in front. Isn't there a better way to do this by keeping
a probability per pixel of background/foreground over time (Anyone
knows any link to any paper? ) - I am going to try out based change in
depth per pixel.

Also, if someone owns an Xbox, It would be a cool experiment to have a
person move the Kinect on one end and See if the games do actually
capture the gestures done by a person on the other end. Basically to
check if it requires Kinect to be stable.


Regards,
Rohan

Melonee Wise

unread,
Nov 18, 2010, 3:19:08 AM11/18/10
to openk...@googlegroups.com
Hi Rohan -

Stephane Magnenat and I have checked in code for controlling the motor, the led, and reading the accelerometer data in a branch here: https://github.com/ros-pkg-git/libfreenect

-Melonee
--
Senior Engineer
Intern Program Director
Willow Garage
68 Willow Rd.
Menlo Park, Ca 94025

Rohan Anil

unread,
Nov 18, 2010, 4:53:07 AM11/18/10
to openk...@googlegroups.com
Thanks Melonee,
I am able to use the APIs! Kinect looks like Wall-E's head :D

All,
another question:
Is this the code that takes care of the depth calibration for Kinect
in glview.c?
int i;
for (i=0; i<2048; i++) {
float v = i/2048.0;
v = powf(v, 3)* 6;
t_gamma[i] = v*6*256;
}

Thanks,
Rohan

Stéphane Magnenat

unread,
Nov 18, 2010, 4:59:07 AM11/18/10
to openk...@googlegroups.com
On 18/11/10 10:53, Rohan Anil wrote:
> Thanks Melonee,
> I am able to use the APIs! Kinect looks like Wall-E's head :D
>
> All,
> another question:
> Is this the code that takes care of the depth calibration for Kinect
> in glview.c?
> int i;
> for (i=0; i<2048; i++) {
> float v = i/2048.0;
> v = powf(v, 3)* 6;
> t_gamma[i] = v*6*256;
> }

No, the one in glview.c is wrong. Here is a better one (slightly better
than the 1/x one):
for (size_t i=0; i<2048; i++)
{
const float k1 = 1.1863;
const float k2 = 2842.5;
const float k3 = 0.1236;
const float depth = k3 * tanf(i/k2 + k1);
t_gamma[i] = depth;
}

Have a nice day,

St�phane

--
Dr St�phane Magnenat
http://stephane.magnenat.net

Radu Bogdan Rusu

unread,
Nov 18, 2010, 12:32:28 PM11/18/10
to openk...@googlegroups.com, Rohan Anil
Rohan,

On 11/18/2010 12:02 AM, Rohan Anil wrote:
> Secondly, Can some one give me pointers on how to view the Cloud of
> Points in Linux - Is there a utility out there ? I found
> http://idav.ucdavis.edu/~okreylos/ResDev/Kinect/ this but It says you
> need to wait for the next release of its dependency.

If you want to give our tools a try, go to http://www.ros.org and skim through the installation instructions. Sure,
you'll end up with a larger set of tools than just visualization (we're working on separating that as we speak, but it
will still take some time), but they will be useful for ... see below. The packages that you want to check are called
"RViz" and "PCL_Visualization".


> Regarding Algorithms,
>
> I have seen some videos on youtube where they do back subtraction to
> get the Human in front. Isn't there a better way to do this by keeping
> a probability per pixel of background/foreground over time (Anyone
> knows any link to any paper? ) - I am going to try out based change in
> depth per pixel.
>
> Also, if someone owns an Xbox, It would be a cool experiment to have a
> person move the Kinect on one end and See if the games do actually
> capture the gestures done by a person on the other end. Basically to
> check if it requires Kinect to be stable.


You can try looking at PCL (Point Cloud Library - http://pcl.ros.org) as a collection of segmentation, feature
estimation, etc algorithms that will be useful for that. We might just add full support for people segmentation soon
too, so it might be worthwhile "pinging" it from time to time. ;)

>
>
> Regards,
> Rohan

Cheers,
Radu.

Rohan Anil

unread,
Nov 19, 2010, 12:30:21 AM11/19/10
to Radu Bogdan Rusu, openk...@googlegroups.com


Thanks Stéphane & Radu!

I am checking out rviz and pcl from the svn! :) . I let you guys know
when I have something working !

Regards
Rohan

Radu Bogdan Rusu

unread,
Nov 19, 2010, 12:33:14 AM11/19/10
to Rohan Anil, openk...@googlegroups.com
If you have an Ubuntu box, you could try to use our binary packages. It's way easier than downloading everything via SVN
and compiling!

Also, see the instructions at http://www.ros.org/wiki/ROS/Installation - they could help. ;)

Cheers,
Radu.

> Thanks St�phane& Radu!

Reply all
Reply to author
Forward
0 new messages