EyeAI
Loading...
Searching...
No Matches
CalculateSoundOrigin.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4
5/*
6This class converts a pixel of the depth estimation
7data into a position in 3d space, depending on the FOV
8of the camera and the distance of the object in the pixel
9*/
10
12 public:
13 std::array<float, 3> calculateSoundOrigin(
14 std::array<int, 2> pixelCoordinates,
15 float distanceToObject, int pictureXResolution
16 );
17
18 private:
19 //FOV of the camera to ONE side
20 float maxAngle = 80;
21 float distanceToObject =0;
22 //coordinates of the pixel: from 1 to Resolution
23 int pixelXCoordinate = 0;
24 //int pixelYCoordinate;
25 int pictureXResolution =0;
26 //int pictureYResolution;
27 [[nodiscard]] float getPixelAngle() const;
28
29 static std::array<float, 3> getVectorToOrigin(float pixelAngle);
30 [[nodiscard]] std::array<float, 3> getOrigin(std::array<float, 3> directionalVector) const;
31};
Definition CalculateSoundOrigin.hpp:11
std::array< float, 3 > calculateSoundOrigin(std::array< int, 2 > pixelCoordinates, float distanceToObject, int pictureXResolution)
Definition CalculateSoundOrigin.cpp:6