16#include <libcamera/base/span.h>
81 void setScale(
const float scale) { scale_ = scale; }
82 float effectiveScale()
const {
return (effectiveScaleX_ + effectiveScaleY_) * 0.5; }
110 double rotation_ = 0.0;
112 double effectiveScaleX_;
113 double effectiveScaleY_;
114 Point effectiveOffset_;
117 std::optional<DewarpParams> dewarpParams_;
118 bool lensDewarpEnable_ =
true;
Helper class to compute dw100 vertex maps.
Definition converter_dw100_vertexmap.h:27
void setOutputSize(const Size &size)
Set the output size.
Definition converter_dw100_vertexmap.h:75
const Size & outputSize() const
Get the output size.
Definition converter_dw100_vertexmap.h:76
std::vector< uint32_t > getVertexMap()
Get the dw100 vertex map.
Definition converter_dw100_vertexmap.cpp:503
void setScalerCrop(const Rectangle &rect)
Set the requested scaler crop.
Definition converter_dw100_vertexmap.h:72
float effectiveScale() const
Get the effective scale.
Definition converter_dw100_vertexmap.h:82
void setOffset(const Point &offset)
Sets the offset to apply.
Definition converter_dw100_vertexmap.h:87
ScaleMode
The scale modes available for a vertex map.
Definition converter_dw100_vertexmap.h:29
@ Crop
Crop the input.
Definition converter_dw100_vertexmap.h:31
@ Fill
Scale the input to fill the output.
Definition converter_dw100_vertexmap.h:30
const Transform & transform() const
Get the transform.
Definition converter_dw100_vertexmap.h:79
void setTransform(const Transform &transform)
Sets the transform to apply.
Definition converter_dw100_vertexmap.h:78
void setMode(const ScaleMode mode)
Sets the scaling mode to apply.
Definition converter_dw100_vertexmap.h:90
void setRotation(const float rotation)
Sets the rotation to apply.
Definition converter_dw100_vertexmap.h:84
void setScale(const float scale)
Sets the scale to apply.
Definition converter_dw100_vertexmap.h:81
const Rectangle & effectiveScalerCrop() const
Get the effective scaler crop.
Definition converter_dw100_vertexmap.h:73
void setLensDewarpEnable(bool enable)
Enables or disables lens dewarping.
Definition converter_dw100_vertexmap.h:95
void setDewarpParams(const DewarpParams ¶ms)
Set the dewarp parameters.
Definition converter_dw100_vertexmap.h:93
float rotation() const
Get the rotation.
Definition converter_dw100_vertexmap.h:85
bool lensDewarpEnable()
Returns if lens dewarping is enabled.
Definition converter_dw100_vertexmap.h:96
const Point & effectiveOffset() const
Get the effective offset.
Definition converter_dw100_vertexmap.h:88
void setInputSize(const Size &size)
Set the size of the input data.
Definition converter_dw100_vertexmap.h:64
void applyLimits()
Apply limits on scale and offset.
Definition converter_dw100_vertexmap.cpp:300
void setSensorCrop(const Rectangle &rect)
Set the crop rectangle that represents the input data.
Definition converter_dw100_vertexmap.h:70
ScaleMode mode() const
Get the scaling mode.
Definition converter_dw100_vertexmap.h:91
Matrix class.
Definition matrix.h:31
Describe a point in two-dimensional space.
Definition geometry.h:19
Describe a rectangle's position and dimensions.
Definition geometry.h:247
Describe a two-dimensional size.
Definition geometry.h:51
Vector class.
Definition vector.h:35
Data structures related to geometric objects.
Top-level libcamera namespace.
Definition backtrace.h:17
Transform
Enum to represent a 2D plane transform.
Definition transform.h:14
Structure combining all dewarp parameters.
Definition converter_dw100_vertexmap.h:34
Matrix< double, 3, 3 > cmNew
The new camera matrix after dewarping.
Definition converter_dw100_vertexmap.h:45
int setCoefficients(Span< const double > coeffs)
Fill the coefficients with a list of coefficients.
Definition converter_dw100_vertexmap.cpp:258
Matrix< double, 3, 3 > cm
The camera matrix.
Definition converter_dw100_vertexmap.h:44
struct libcamera::Dw100VertexMap::DewarpParams::@4 coefficients
Structure containing the lens dewarp coefficients.