|
waterlinkedsonar
C++ client library for the Water Linked Sonar 3D-15
|
Conversions of decoded images to distances, point clouds and linear signal strength. More...
Go to the source code of this file.
Enumerations | |
| enum class | waterlinked::sonar::PointLayout : std::uint8_t { ORGANIZED , UNORGANIZED } |
| Layout of the point cloud produced by range_image_to_points(). More... | |
Functions | |
| bool | waterlinked::sonar::range_image_to_distances (const RangeImageView &image, std::vector< float > &distances) |
| Converts a range image to per-pixel distances in meters, 0 where a pixel has no reflection. | |
| bool | waterlinked::sonar::range_image_to_points (const RangeImageView &image, std::vector< float > &points, PointLayout layout) |
| Converts a range image to x, y, z triples in meters. | |
| bool | waterlinked::sonar::bitmap_to_strength_linear (const BitmapImageView &image, std::vector< std::uint16_t > &strength) |
| Converts a SIGNAL_STRENGTH bitmap to 15-bit linear signal strength, 0 where a pixel has no reflection. | |
Conversions of decoded images to distances, point clouds and linear signal strength.
Each function resizes its output vector and leaves it empty when the image is inconsistent. Reusing an output vector across calls avoids reallocating it.
|
strong |
| bool waterlinked::sonar::bitmap_to_strength_linear | ( | const BitmapImageView & | image, |
| std::vector< std::uint16_t > & | strength | ||
| ) |
Converts a SIGNAL_STRENGTH bitmap to 15-bit linear signal strength, 0 where a pixel has no reflection.
| bool waterlinked::sonar::range_image_to_distances | ( | const RangeImageView & | image, |
| std::vector< float > & | distances | ||
| ) |
Converts a range image to per-pixel distances in meters, 0 where a pixel has no reflection.
| bool waterlinked::sonar::range_image_to_points | ( | const RangeImageView & | image, |
| std::vector< float > & | points, | ||
| PointLayout | layout | ||
| ) |
Converts a range image to x, y, z triples in meters.
Pixel (px, py) at distance d maps to yaw = px / (width - 1) * fov_h - fov_h / 2 and pitch = py / (height - 1) * fov_v - fov_v / 2, and to (d cos(pitch) cos(yaw), d cos(pitch) sin(yaw), -d sin(pitch)).