Calibration Library
1.0.0
A C++ library for camera calibration and vision-related geometric transformations
Loading...
Searching...
No Matches
stream_capture.h
Go to the documentation of this file.
1
#pragma once
2
3
// std
4
#include <ostream>
5
#include <sstream>
6
#include <string>
7
8
namespace
calib
{
9
10
class
StreamCapture
{
11
std::ostream& stream_;
12
std::ostringstream buffer_;
13
std::streambuf* old_buf_;
14
15
public
:
16
explicit
StreamCapture
(std::ostream& stream)
17
: stream_(stream), old_buf_(stream.rdbuf(buffer_.rdbuf())) {}
18
StreamCapture
(
const
StreamCapture
&) =
delete
;
19
StreamCapture
&
operator=
(
const
StreamCapture
&) =
delete
;
20
~StreamCapture
() { stream_.rdbuf(old_buf_); }
21
22
[[nodiscard]]
auto
str
() const -> std::
string
{
return
buffer_.str(); }
23
};
24
25
}
// namespace calib
calib::StreamCapture
Definition
stream_capture.h:10
calib::StreamCapture::StreamCapture
StreamCapture(const StreamCapture &)=delete
calib::StreamCapture::operator=
StreamCapture & operator=(const StreamCapture &)=delete
calib::StreamCapture::~StreamCapture
~StreamCapture()
Definition
stream_capture.h:20
calib::StreamCapture::StreamCapture
StreamCapture(std::ostream &stream)
Definition
stream_capture.h:16
calib::StreamCapture::str
auto str() const -> std::string
Definition
stream_capture.h:22
calib
Linear multi-camera extrinsics initialisation (DLT)
Definition
intrinsics_utils.h:10
runner
work
calibration
calibration
include
calib
io
stream_capture.h
Generated by
1.9.8