The depth info extract from the depth image generated by vision senor is a relative value, which can only reflect the depth of color of objects(from 0~255).
How to btain exactly depth value of a depth image generated by the vision sensor?
Looking forward to your reply. Thank you!
How to get the real depth information from the vision sensor?
Re: How to get the real depth information from the vision sensor?
Hello,
are you using sim.getVisionSensorDepth for that? If yes, make sure to call it with a second argument set to 1.0: in that case the returned depth map indicates values in meters.
Cheers
are you using sim.getVisionSensorDepth for that? If yes, make sure to call it with a second argument set to 1.0: in that case the returned depth map indicates values in meters.
Cheers
Re: How to get the real depth information from the vision sensor?
I use this function sim.getVisionSensorDepth, but I cannot sure the meaning of return value. For example, I set a depth sensor which have 2X2 resolution and pointing to the ground(the sensor height is 1.47m).And the return value I get is [0 0 96 94 0 0 96 94 0 0 96 94 0 0 96 94].I cannot understand that. Why it isn't [1.47 1.47 1.47 1.47]?
Re: How to get the real depth information from the vision sensor?
Please read the documentation. The returned depth data is packed. Do something like:
Cheers
Code: Select all
local packedDepth = sim.getVisionSensorDepth(sensorHandle, 1)
local depthValues = sim.unpackFloatTable(packedDepth)