Co-ordinates of a point

Typically: "How do I... ", "How can I... " questions
Post Reply
adityaraj52
Posts: 11
Joined: 19 Jun 2013, 14:29

Co-ordinates of a point

Post by adityaraj52 » 02 Jul 2013, 10:08

Is it possible to know the co-ordinates of a point in the default floor ?(before or after simulation)

coppelia
Site Admin
Posts: 7272
Joined: 14 Dec 2012, 00:25

Re: Co-ordinates of a point

Post by coppelia » 02 Jul 2013, 10:20

Hello,

Yes, of course! But the question is, what point?

To get the coordinates of an object (be it a dummy or another one), just use the simGetObjectPosition API function.

.. or are you talking about coordinate transformations?

Cheers

hassan
Posts: 10
Joined: 20 Aug 2013, 12:31

Re: Co-ordinates of a point

Post by hassan » 02 Sep 2013, 12:51

Hello,

I have a question regarding the conversion of depth values into 3D point clouds and transformation to the world reference frame. I am using a Kinect Vision sensor. I set the angle of view using the focal length which i got by calibrating a real camera e.g. for a camera with focal length in pixels=534 i use the formula Angle=2*atan(640/ (534*2)), converting into degrees it came to about 61.86 degrees.

After that I retrieved the depth buffer, I write the depth buffer to a .txt file as explained in the other post a few days ago. Now using MATLAB i convert this depth map into a point cloud using the following code:

Code: Select all

%%dImage contains the depth values retrieved from v-rep
for m=1:480
            for n=1:640
                Z=dImage(m,n)*1000;%%from mm to m
                PointCloud(1,Count)=(n-cx)*(Z/fx);%%X
                PointCloud(2,Count)=(m-cy)*(Z/fy);%%Y
                PointCloud(3,Count)=Z;
                Count=Count+1;
            end
        end
I also get the absolute position of the sensor using 'simGetObjectMatrix'. Now i apply this transformation matrix to the computed point cloud for two different sensors. I should actually get a well registered point cloud from both the sensors but instead i get weird transformations. I know there is something wrong in my interpretation fo the coordinate system. But i am not quite able to interpret what exactly is it?

I hope you will be able to help.

best regards

coppelia
Site Admin
Posts: 7272
Joined: 14 Dec 2012, 00:25

Re: Co-ordinates of a point

Post by coppelia » 02 Sep 2013, 14:10

Hello,

could you post this question to a new topic? This is not really related to current topic.

Thanks

Post Reply