vision sensor calibration

Typically: "How do I... ", "How can I... " questions
Post Reply
zhy149
Posts: 132
Joined: 14 Apr 2021, 20:18

vision sensor calibration

Post by zhy149 »

hello, I have an intel real sense d435 camera in the real world. I want to do some surface grasping problems both in simulation and the real world. To simulate real-world noise, I plan to rotate and place the camera with some noise and do calibration, could you give me some hints on how to do this or is there any procedure that I should follow? I think the key point I need is just to map the image pixel position to a world coordinate system so that the robot knows where to go. Thank you!

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

Re: vision sensor calibration

Post by coppelia »

Hello,

for each vision sensor image pixel, you can compute the corresponding 3D position in the world. For that, you need to read the vision sensor's depth map with sim.getVisionSensorDepthBuffer. Then you can select one specific pixel, or iterate over all pixels and read the depth value. From that, and the resolution of the sensor and the pose of the sensor, you can easily compute 3D positions. Have a look at the demo model Models/components/sensors/Blob to 3D position.ttm

Cheers

zhy149
Posts: 132
Joined: 14 Apr 2021, 20:18

Re: vision sensor calibration

Post by zhy149 »

coppelia wrote: 16 Feb 2022, 13:42 Hello,

for each vision sensor image pixel, you can compute the corresponding 3D position in the world. For that, you need to read the vision sensor's depth map with sim.getVisionSensorDepthBuffer. Then you can select one specific pixel, or iterate over all pixels and read the depth value. From that, and the resolution of the sensor and the pose of the sensor, you can easily compute 3D positions. Have a look at the demo model Models/components/sensors/Blob to 3D position.ttm

Cheers
Thank you very much! What if the vision sensor is somewhat rotated? I remember seeing some papers say they do a projection to get their heightmap or something.

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

Re: vision sensor calibration

Post by coppelia »

What if the vision sensor is somewhat rotated?
That's exactly what is done in the model I mention. Did you try it?

cheers

zhy149
Posts: 132
Joined: 14 Apr 2021, 20:18

Re: vision sensor calibration

Post by zhy149 »

coppelia wrote: 16 Feb 2022, 16:05
What if the vision sensor is somewhat rotated?
That's exactly what is done in the model I mention. Did you try it?

cheers
yes, I see the model and moved it in a new scene. It seems that it captures all red color, is this normal? What's the difference between this model and a regular vision sensor? I mean, there is a script with it, but how can I try the function of this model to really understand camera calibration in coppeliasim? Thanks again!

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

Re: vision sensor calibration

Post by coppelia »

Have a look at this new model, which converts each image pixel to a 3D position.

Cheers

Post Reply