waterlinkedsonar
C++ client library for the Water Linked Sonar 3D-15
Loading...
Searching...
No Matches
Namespaces | Functions
conversions.hpp File Reference

Conversions from range images to distances and point clouds, and from signal-strength images to linear strength. More...

#include <cstdint>
#include <vector>
#include <waterlinkedsonar/messages.hpp>

Go to the source code of this file.

Namespaces

namespace  waterlinked
 
namespace  waterlinked::sonar
 

Functions

bool waterlinked::sonar::range_image_to_distances (const RangeImageView &img, std::vector< float > &out)
 Converts a range image to per-pixel distances.
 
bool waterlinked::sonar::range_image_to_points (const RangeImageView &img, std::vector< float > &out, bool organized)
 Converts a range image to XYZ float32 triples using the pixel-to-angle mapping from the Water Linked docs:
 
bool waterlinked::sonar::bitmap_to_strength_linear (const BitmapImageView &img, std::vector< std::uint16_t > &out)
 Recovers linear 15-bit signal strength from a SIGNAL_STRENGTH bitmap, inverting the device's logarithmic mapping: pixel = 100 * log10(linear / 30).
 

Detailed Description

Conversions from range images to distances and point clouds, and from signal-strength images to linear strength.

These functions never throw: inconsistent input is reported through the return value. Output vectors keep their capacity across calls, so a caller that reuses one converts without allocating in steady state.