Monado OpenXR Runtime
Data Structures | Macros | Typedefs | Functions
t_calibration.cpp File Reference

Calibration code. More...

#include "util/u_sink.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_frame.h"
#include "util/u_format.h"
#include "tracking/t_tracking.h"
#include "tracking/t_calibration_opencv.hpp"
#include <opencv2/opencv.hpp>
#include <sys/stat.h>
Include dependency graph for t_calibration.cpp:

Data Structures

struct  ViewState
 Current state for each view, one view for mono cameras, two for stereo. More...
 
class  Calibration
 Main class for doing calibration. More...
 

Macros

#define P(...)   snprintf(c.text, sizeof(c.text), __VA_ARGS__)
 

Typedefs

typedef std::vector< cv::Point3f > ModelF32
 Model of the thing we are measuring to calibrate, 32 bit. More...
 
typedef std::vector< cv::Point3d > ModelF64
 Model of the thing we are measuring to calibrate, 64 bit. More...
 
typedef std::vector< cv::Point2f > MeasurementF32
 A measurement of the model as viewed on the camera. More...
 
typedef std::vector< cv::Point2d > MeasurementF64
 In doubles, because OpenCV can't agree on a single type to use. More...
 
typedef std::vector< ModelF32ArrayOfModelF32s
 For each MeasurementF32 we take we also save the ModelF32. More...
 
typedef std::vector< ModelF64ArrayOfModelF64s
 For each MeasurementF64 we take we also save the ModelF64. More...
 
typedef std::vector< MeasurementF32ArrayOfMeasurementF32s
 A array of MeasurementF32. More...
 
typedef std::vector< MeasurementF64ArrayOfMeasurementF64s
 A array of MeasurementF64. More...
 
typedef std::vector< cv::Rect > ArrayOfRects
 A array of bounding rects. More...
 

Functions

void t_calibration_frame (struct xrt_frame_sink *xsink, struct xrt_frame *xf)
 
int t_calibration_stereo_create (struct xrt_frame_context *xfctx, const struct t_calibration_params *params, struct t_calibration_status *status, struct xrt_frame_sink *gui, struct xrt_frame_sink **out_sink)
 Create the camera calibration frame sink. More...
 

Detailed Description

Calibration code.

Author
Pete Black pblac.nosp@m.k@co.nosp@m.llabo.nosp@m.ra.c.nosp@m.om
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om

Typedef Documentation

◆ ArrayOfMeasurementF32s

typedef std::vector<MeasurementF32> ArrayOfMeasurementF32s

A array of MeasurementF32.

◆ ArrayOfMeasurementF64s

typedef std::vector<MeasurementF64> ArrayOfMeasurementF64s

A array of MeasurementF64.

◆ ArrayOfModelF32s

typedef std::vector<ModelF32> ArrayOfModelF32s

For each MeasurementF32 we take we also save the ModelF32.

◆ ArrayOfModelF64s

typedef std::vector<ModelF64> ArrayOfModelF64s

For each MeasurementF64 we take we also save the ModelF64.

◆ ArrayOfRects

typedef std::vector<cv::Rect> ArrayOfRects

A array of bounding rects.

◆ MeasurementF32

typedef std::vector<cv::Point2f> MeasurementF32

A measurement of the model as viewed on the camera.

◆ MeasurementF64

typedef std::vector<cv::Point2d> MeasurementF64

In doubles, because OpenCV can't agree on a single type to use.

◆ ModelF32

typedef std::vector<cv::Point3f> ModelF32

Model of the thing we are measuring to calibrate, 32 bit.

◆ ModelF64

typedef std::vector<cv::Point3d> ModelF64

Model of the thing we are measuring to calibrate, 64 bit.

Function Documentation

◆ t_calibration_stereo_create()

int t_calibration_stereo_create ( struct xrt_frame_context xfctx,
const struct t_calibration_params params,
struct t_calibration_status status,
struct xrt_frame_sink gui,
struct xrt_frame_sink **  out_sink 
)

Create the camera calibration frame sink.

Parameters
xfctxContext for frame transport.
paramsParameters to use during calibration. Values copied, pointer not retained.
statusOptional pointer to structure for status information. Pointer retained, and pointed-to struct modified.
guiFrame sink
out_sinkOutput: created frame sink.

References xrt_frame_sink::push_frame.