Merge branch 'develop' of http://gitlab.mynt.com/mynteye/mynt-eye-sdk-2 into develop
This commit is contained in:
commit
456613a030
|
@ -29,7 +29,7 @@ DepthProcessor::DepthProcessor(
|
||||||
std::int32_t proc_period)
|
std::int32_t proc_period)
|
||||||
: Processor(std::move(proc_period)),
|
: Processor(std::move(proc_period)),
|
||||||
calib_infos_(calib_infos) {
|
calib_infos_(calib_infos) {
|
||||||
VLOG(2) << __func__ << ": proc_period=" << proc_period;
|
VLOG(2) << __func__;
|
||||||
}
|
}
|
||||||
|
|
||||||
DepthProcessor::~DepthProcessor() {
|
DepthProcessor::~DepthProcessor() {
|
||||||
|
@ -51,7 +51,7 @@ bool DepthProcessor::OnProcess(
|
||||||
ObjMat *output = Object::Cast<ObjMat>(out);
|
ObjMat *output = Object::Cast<ObjMat>(out);
|
||||||
int rows = input->value.rows;
|
int rows = input->value.rows;
|
||||||
int cols = input->value.cols;
|
int cols = input->value.cols;
|
||||||
// std::cout << calib_infos_->T_mul_f << std::endl;
|
std::cout << calib_infos_->T_mul_f << std::endl;
|
||||||
// 0.0793434
|
// 0.0793434
|
||||||
cv::Mat depth_mat = cv::Mat::zeros(rows, cols, CV_16U);
|
cv::Mat depth_mat = cv::Mat::zeros(rows, cols, CV_16U);
|
||||||
for (int i = 0; i < rows; i++) {
|
for (int i = 0; i < rows; i++) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ PointsProcessor::PointsProcessor(
|
||||||
std::int32_t proc_period)
|
std::int32_t proc_period)
|
||||||
: Processor(std::move(proc_period)),
|
: Processor(std::move(proc_period)),
|
||||||
calib_infos_(calib_infos) {
|
calib_infos_(calib_infos) {
|
||||||
VLOG(2) << __func__ << ": proc_period=" << proc_period;
|
VLOG(2) << __func__;
|
||||||
}
|
}
|
||||||
|
|
||||||
PointsProcessor::~PointsProcessor() {
|
PointsProcessor::~PointsProcessor() {
|
||||||
|
|
|
@ -339,6 +339,13 @@ void RectifyProcessor::InitParams(
|
||||||
generateCameraFromIntrinsicsEquidistant(in_left);
|
generateCameraFromIntrinsicsEquidistant(in_left);
|
||||||
camodocal::CameraPtr camera_odo_ptr_right =
|
camodocal::CameraPtr camera_odo_ptr_right =
|
||||||
generateCameraFromIntrinsicsEquidistant(in_right);
|
generateCameraFromIntrinsicsEquidistant(in_right);
|
||||||
|
auto calib_infos_temp =
|
||||||
|
stereoRectify(camera_odo_ptr_left,
|
||||||
|
camera_odo_ptr_right,
|
||||||
|
in_left,
|
||||||
|
in_right,
|
||||||
|
ex_right_to_left);
|
||||||
|
*calib_infos = *calib_infos_temp;
|
||||||
auto calib_info_tmp = stereoRectify(camera_odo_ptr_left,
|
auto calib_info_tmp = stereoRectify(camera_odo_ptr_left,
|
||||||
camera_odo_ptr_right,
|
camera_odo_ptr_right,
|
||||||
in_left,
|
in_left,
|
||||||
|
@ -380,7 +387,6 @@ RectifyProcessor::RectifyProcessor(
|
||||||
std::int32_t proc_period)
|
std::int32_t proc_period)
|
||||||
: Processor(std::move(proc_period)),
|
: Processor(std::move(proc_period)),
|
||||||
calib_model(CalibrationModel::UNKNOW) {
|
calib_model(CalibrationModel::UNKNOW) {
|
||||||
VLOG(2) << __func__ << ": proc_period=" << proc_period;
|
|
||||||
calib_infos = std::make_shared<struct camera_calib_info_pair>();
|
calib_infos = std::make_shared<struct camera_calib_info_pair>();
|
||||||
InitParams(
|
InitParams(
|
||||||
*std::dynamic_pointer_cast<IntrinsicsEquidistant>(intr_left),
|
*std::dynamic_pointer_cast<IntrinsicsEquidistant>(intr_left),
|
||||||
|
|
|
@ -95,7 +95,6 @@ void Dataset::SaveMotionData(const device::MotionData &data) {
|
||||||
auto &&writer = GetMotionWriter();
|
auto &&writer = GetMotionWriter();
|
||||||
// auto seq = data.imu->serial_number;
|
// auto seq = data.imu->serial_number;
|
||||||
auto seq = motion_count_;
|
auto seq = motion_count_;
|
||||||
if (data.imu->flag == 1 || data.imu->flag == 2) {
|
|
||||||
writer->ofs << seq << ", " << static_cast<int>(data.imu->flag) << ", "
|
writer->ofs << seq << ", " << static_cast<int>(data.imu->flag) << ", "
|
||||||
<< data.imu->timestamp << ", " << data.imu->accel[0] << ", "
|
<< data.imu->timestamp << ", " << data.imu->accel[0] << ", "
|
||||||
<< data.imu->accel[1] << ", " << data.imu->accel[2] << ", "
|
<< data.imu->accel[1] << ", " << data.imu->accel[2] << ", "
|
||||||
|
@ -103,7 +102,6 @@ void Dataset::SaveMotionData(const device::MotionData &data) {
|
||||||
<< data.imu->gyro[2] << ", " << data.imu->temperature
|
<< data.imu->gyro[2] << ", " << data.imu->temperature
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
++motion_count_;
|
++motion_count_;
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
if(motion_count_ != seq) {
|
if(motion_count_ != seq) {
|
||||||
LOG(INFO) << "motion_count_ != seq !" << " motion_count_: " << motion_count_
|
LOG(INFO) << "motion_count_ != seq !" << " motion_count_: " << motion_count_
|
||||||
|
|
|
@ -310,7 +310,7 @@
|
||||||
- 'image_transport/compressedDepth'
|
- 'image_transport/compressedDepth'
|
||||||
</rosparam>
|
</rosparam>
|
||||||
</group>
|
</group>
|
||||||
<group ns="$(arg right_rect_topic)">
|
<group ns="$(arg left_mono_topic)">
|
||||||
<rosparam param="disable_pub_plugins">
|
<rosparam param="disable_pub_plugins">
|
||||||
- 'image_transport/compressedDepth'
|
- 'image_transport/compressedDepth'
|
||||||
</rosparam>
|
</rosparam>
|
||||||
|
@ -320,6 +320,16 @@
|
||||||
- 'image_transport/compressedDepth'
|
- 'image_transport/compressedDepth'
|
||||||
</rosparam>
|
</rosparam>
|
||||||
</group>
|
</group>
|
||||||
|
<group ns="$(arg right_mono_topic)">
|
||||||
|
<rosparam param="disable_pub_plugins">
|
||||||
|
- 'image_transport/compressedDepth'
|
||||||
|
</rosparam>
|
||||||
|
</group>
|
||||||
|
<group ns="$(arg right_rect_topic)">
|
||||||
|
<rosparam param="disable_pub_plugins">
|
||||||
|
- 'image_transport/compressedDepth'
|
||||||
|
</rosparam>
|
||||||
|
</group>
|
||||||
<group ns="$(arg disparity_topic)">
|
<group ns="$(arg disparity_topic)">
|
||||||
<rosparam param="disable_pub_plugins">
|
<rosparam param="disable_pub_plugins">
|
||||||
- 'image_transport/compressedDepth'
|
- 'image_transport/compressedDepth'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user