YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IntrinsicParams.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_SIG_INTRINSICPARAMS_H
7#define YARP_SIG_INTRINSICPARAMS_H
8
9#include <yarp/os/Log.h>
10#include <yarp/os/Portable.h>
11#include <yarp/os/Property.h>
12#include <yarp/sig/api.h>
13
14namespace yarp::sig {
26enum class YarpDistortion : std::int32_t
27{
34#ifndef YARP_NO_DEPRECATED // Since YARP 3.5
35 YARP_PLUM_BOB YARP_DEPRECATED_MSG("Use YARP_PLUMB_BOB instead") = YARP_PLUMB_BOB,
36#endif
37};
38
44{
50 {
51 double k1;
52 double k2;
53 double t1;
54 double t2;
55 double k3;
57
58 DistortionModel(): k1(0.0), k2(0.0),
59 t1(0.0), t2(0.0),
60 k3(0.0), type(YarpDistortion::YARP_DISTORTION_NONE) {}
61 };
62
67
77 IntrinsicParams(const yarp::os::Property &intrinsic, bool isOptional=false);
78
83 void toProperty(yarp::os::Property& intrinsic) const;
84
92 void fromProperty(const yarp::os::Property& intrinsic);
93
94 bool read(yarp::os::ConnectionReader& reader) override;
95 bool write(yarp::os::ConnectionWriter& writer) const override;
96
104};
105
106} // namespace yarp::sig
107
108
109#endif // YARP_SIG_INTRINSICPARAMS_H
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
Definition Portable.h:25
A class for storing options and configuration information.
Definition Property.h:33
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition compiler.h:2885
YarpDistortion
The YarpDistortion enum to define the type of the distortion model of the camera.
@ YARP_DISTORTION_COUNT
Number of enumeration values.
@ YARP_UNSUPPORTED
Unsupported distortion model.
@ YARP_PLUMB_BOB
Plumb bob distortion model.
@ YARP_PLUM_BOB
Deprecated name for plumb bob distortion model.
@ YARP_DISTORTION_NONE
Rectilinear images.
@ YARP_FISH_EYE
Fish eye distortion model.
The DistortionModel struct representing the distortion model of the camera.
The IntrinsicParams struct to handle the intrinsic parameter of cameras(RGB and RGBD either).
double focalLengthY
Result of the product of the physical focal length(mm) and the size sy of the individual imager eleme...
DistortionModel distortionModel
Distortion model of the image.
double focalLengthX
Result of the product of the physical focal length(mm) and the size sx of the individual imager eleme...
double physFocalLength
Physical focal length of the lens (m)
double principalPointX
Horizontal coordinate of the principal point of the image, as a pixel offset from the left edge.
double principalPointY
Vertical coordinate of the principal point of the image, as a pixel offset from the top edge.
#define YARP_sig_API
Definition api.h:18