Merge branch 'develop' of http://gitlab.mynt.com/mynteye/mynt-eye-s-sdk into develop

This commit is contained in:
Osenberg 2019-03-15 17:01:15 +08:00
commit a6f7112f82
5 changed files with 12 additions and 14 deletions

View File

@ -34,8 +34,8 @@ int main(int argc, char *argv[]) {
api->Start(Source::VIDEO_STREAMING); api->Start(Source::VIDEO_STREAMING);
cv::namedWindow("frame"); cv::namedWindow("frame");
cv::namedWindow("disparity"); // cv::namedWindow("disparity");
// cv::namedWindow("disparity_normalized"); cv::namedWindow("disparity_normalized");
while (true) { while (true) {
api->WaitForStreams(); api->WaitForStreams();
@ -49,16 +49,16 @@ int main(int argc, char *argv[]) {
cv::imshow("frame", img); cv::imshow("frame", img);
} }
auto &&disp_data = api->GetStreamData(Stream::DISPARITY); // auto &&disp_data = api->GetStreamData(Stream::DISPARITY);
if (!disp_data.frame.empty()) { // if (!disp_data.frame.empty()) {
cv::imshow("disparity", disp_data.frame); // cv::imshow("disparity", disp_data.frame);
}
// auto &&disp_norm_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
// if (!disp_norm_data.frame.empty()) {
// cv::imshow("disparity_normalized", disp_norm_data.frame); // CV_8UC1
// } // }
auto &&disp_norm_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
if (!disp_norm_data.frame.empty()) {
cv::imshow("disparity_normalized", disp_norm_data.frame); // CV_8UC1
}
char key = static_cast<char>(cv::waitKey(1)); char key = static_cast<char>(cv::waitKey(1));
if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q
break; break;

View File

@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
*/ */
painter.DrawImgData(img, *left_data.img); painter.DrawImgData(img, *left_data.img);
if (!motion_datas.empty()) { if (!motion_datas.empty() && motion_datas.size() > 0) {
painter.DrawImuData(img, *motion_datas[0].imu); painter.DrawImuData(img, *motion_datas[0].imu);
} }

View File

@ -119,7 +119,7 @@ int main(int argc, char *argv[]) {
/* /*
painter.DrawImgData(img, *left_data.img); painter.DrawImgData(img, *left_data.img);
if (!motion_datas.empty()) { if (!motion_datas.empty() && motion_datas.size() > 0) {
painter.DrawImuData(img, *motion_datas[0].imu); painter.DrawImuData(img, *motion_datas[0].imu);
} }
*/ */

View File

@ -27,7 +27,6 @@ int main(int argc, char *argv[]) {
auto &&request = api->SelectStreamRequest(&ok); auto &&request = api->SelectStreamRequest(&ok);
if (!ok) return 1; if (!ok) return 1;
api->ConfigStreamRequest(request); api->ConfigStreamRequest(request);
api->SetDisparityComputingMethodType(DisparityComputingMethod::BM);
api->EnableStreamData(Stream::POINTS); api->EnableStreamData(Stream::POINTS);

View File

@ -154,7 +154,6 @@ int main(int argc, char *argv[]) {
auto &&request = api->SelectStreamRequest(&ok); auto &&request = api->SelectStreamRequest(&ok);
if (!ok) return 1; if (!ok) return 1;
api->ConfigStreamRequest(request); api->ConfigStreamRequest(request);
api->SetDisparityComputingMethodType(DisparityComputingMethod::BM);
api->SetOptionValue(Option::IR_CONTROL, 80); api->SetOptionValue(Option::IR_CONTROL, 80);