5,337
edits
Line 36: | Line 36: | ||
* Clone the carla repo and download assets. | * Clone the carla repo and download assets. | ||
}} | }} | ||
==Sensors== | |||
[https://carla.readthedocs.io/en/latest/ref_sensors/ Sensors Reference] | |||
===RGB Image=== | |||
===Depth Image=== | |||
Depths images encode as z-depth to camera as 8-bit images. | |||
To get the meters from the 8-bit RGB image, apply the following formula: | |||
<pre> | |||
normalized = (R + G * 256 + B * 256 * 256) / (256 * 256 * 256 - 1) | |||
in_meters = 1000 * normalized | |||
</pre> | |||
I recommend resaving the depth images as 16-bit PNG images. | |||
This makes the depth values less sensitive to rounding errors, even though 8-bit PNG images are lossless. | |||
To convert depth values to euclidean distance, you need to divide by \(\cos(\theta)\) where \(\theta\) is the angle to the center of the image. | |||
==Fixed time step== | ==Fixed time step== |