2#include "RasterPointScanner/Headers/ViewportPointSmoother.hpp"
3#include "RasterPointScanner/Headers/RasterFrame.h"
4#include "Base/Headers/Matrix.hpp"
22 m_view_size_f = m_view_size_i.
as<2,
fltp04>();
34 pixel[X] = (pixel[X] - cx) * pixel[Z] *
m_inv_fov[X];
35 pixel[Y] = (pixel[Y] - cy) * pixel[Z] *
m_inv_fov[Y];
47 location[X] = (location[X] / location[Z] * fx) + cx;
48 location[Y] = (location[Y] / location[Z] * fy) + cy;
55 ViewportPointSmoother::setViewSize(view_size);
65 smoother->setBlockTransform(m_block_mat);
66 smoother->m_frame_reduction = m_frame_reduction;
Vector< 2, fltp04 > m_inv_fov
Inverse focal lengths (1/fx, 1/fy).
void setViewSize(const Vector< 2, uint04 > &view_size) final override
Updates the viewport size and recalculates pixel scaling factors.
Vertex< 3, fltp04 > pixelToPoint(Vertex< 3, fltp04 > pixel) const final override
Converts a pixel coordinate with depth into a 3D point.
Vector< 2, uint04 > m_original_size
Native camera image resolution.
DepthAISmoother(const Vector< 2, uint04 > &size, const Matrix< fltp04 > &intrinsics)
Constructs the smoother with the camera's native size and intrinsic matrix.
Matrix< fltp04 > m_intrinics
Camera intrinsic matrix (fx, fy, cx, cy).
fltp04 m_pixel_multiplier
Scale factor from native to current viewport size.
DepthAISmoother * clone()
Creates a copy of this smoother with the same parameters.
fltp04 m_inv_pixel_multiplier
Inverse of the pixel multiplier.
Vertex< 2, fltp04 > pointToPixel(Vertex< 3, fltp04 > location) const final override
Projects a 3D point onto the image plane as a pixel coordinate.
Templated logic for doing matrix multiplication.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
constexpr decltype(auto) as() const
Returns the vector as a new time of vector.
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.