fix(api): use BM as default ,only use sgbm when get_disparity

This commit is contained in:
TinyOh 2019-04-04 09:22:26 +08:00
parent 43e356e617
commit e28e34eafa
5 changed files with 2 additions and 8 deletions

View File

@ -27,7 +27,7 @@ int main(int argc, char *argv[]) {
if (!ok) return 1;
api->ConfigStreamRequest(request);
// api->EnableStreamData(Stream::DISPARITY);
api->SetDisparityComputingMethodType(DisparityComputingMethod::SGBM);
api->EnableStreamData(Stream::DISPARITY_NORMALIZED);
if (argc == 2) {
@ -45,8 +45,6 @@ int main(int argc, char *argv[]) {
}
}
api->SetDisparityComputingMethodType(DisparityComputingMethod::BM);
api->Start(Source::VIDEO_STREAMING);
cv::namedWindow("frame");

View File

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

View File

@ -25,7 +25,6 @@ int main(int argc, char *argv[]) {
auto &&request = api->SelectStreamRequest(&ok);
if (!ok) return 1;
api->ConfigStreamRequest(request);
api->SetDisparityComputingMethodType(DisparityComputingMethod::BM);
api->Start(Source::VIDEO_STREAMING);
cv::namedWindow("frame");

View File

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

View File

@ -326,7 +326,7 @@ void Synthetic::InitProcessors() {
std::shared_ptr<Processor> depth_processor = nullptr;
auto &&disparity_processor =
std::make_shared<DisparityProcessor>(DisparityComputingMethod::SGBM,
std::make_shared<DisparityProcessor>(DisparityComputingMethod::BM,
DISPARITY_PROC_PERIOD);
auto &&disparitynormalized_processor =
std::make_shared<DisparityNormalizedProcessor>(