Elaboradar 0.1
Caricamento in corso...
Ricerca in corso...
Nessun risultato
top.h
Vai alla documentazione di questo file.
1
5#ifndef RADARELAB_ALGO_TOP_H
6#define RADARELAB_ALGO_TOP_H
7
8#include <radarelab/volume.h>
9
10namespace radarelab {
11namespace algo {
12
13template<typename T>
14void compute_top(const Volume<T>& volume, T threshold, Matrix2D<unsigned char>& top)
15{
16 top.fill(0);
17
18 for (unsigned l=0; l < volume.size(); ++l)
19 {
20 const auto& scan = volume[l];
21 for (unsigned i = 0; i < scan.beam_count; ++i)
22 {
23 const double elevaz = scan.elevations_real(i); //--- elev reale in gradi
24 for (unsigned k = 0; k < scan.beam_size; ++k)
25 if (scan.get(i, k) > threshold)
26 //top in ettometri
27 top(i, k) = (unsigned char)(PolarScanBase::sample_height(
28 elevaz, (k + 0.5) * scan.cell_size) / 100.);
29 }
30 }
31}
32
33}
34}
35
36#endif
37
Homogeneous volume with a common beam count for all PolarScans.
Definition volume.h:431
Namespace per volume dati.
Definition elev_fin.h:12
String functions.
Definition cart.cpp:4
Base for all matrices we use, since we rely on row-major data.
Definition matrix.h:37
double sample_height(unsigned cell_idx) const
Return the height (in meters) of the sample at the given cell indexa.
Definition volume.cpp:37
Definisce le principali strutture che contengono i dati.