fix(api): use BM as default ,only use sgbm when get_disparity
This commit is contained in:
parent
43e356e617
commit
e28e34eafa
|
@ -27,7 +27,7 @@ int main(int argc, char *argv[]) {
|
||||||
if (!ok) return 1;
|
if (!ok) return 1;
|
||||||
api->ConfigStreamRequest(request);
|
api->ConfigStreamRequest(request);
|
||||||
|
|
||||||
// api->EnableStreamData(Stream::DISPARITY);
|
api->SetDisparityComputingMethodType(DisparityComputingMethod::SGBM);
|
||||||
api->EnableStreamData(Stream::DISPARITY_NORMALIZED);
|
api->EnableStreamData(Stream::DISPARITY_NORMALIZED);
|
||||||
|
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
|
@ -45,8 +45,6 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
api->SetDisparityComputingMethodType(DisparityComputingMethod::BM);
|
|
||||||
|
|
||||||
api->Start(Source::VIDEO_STREAMING);
|
api->Start(Source::VIDEO_STREAMING);
|
||||||
|
|
||||||
cv::namedWindow("frame");
|
cv::namedWindow("frame");
|
||||||
|
|
|
@ -28,8 +28,6 @@ int main(int argc, char *argv[]) {
|
||||||
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);
|
||||||
|
|
||||||
api->Start(Source::VIDEO_STREAMING);
|
api->Start(Source::VIDEO_STREAMING);
|
||||||
|
|
|
@ -25,7 +25,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->Start(Source::VIDEO_STREAMING);
|
api->Start(Source::VIDEO_STREAMING);
|
||||||
|
|
||||||
cv::namedWindow("frame");
|
cv::namedWindow("frame");
|
||||||
|
|
|
@ -25,7 +25,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::LEFT_RECTIFIED);
|
api->EnableStreamData(Stream::LEFT_RECTIFIED);
|
||||||
api->EnableStreamData(Stream::RIGHT_RECTIFIED);
|
api->EnableStreamData(Stream::RIGHT_RECTIFIED);
|
||||||
|
|
|
@ -326,7 +326,7 @@ void Synthetic::InitProcessors() {
|
||||||
std::shared_ptr<Processor> depth_processor = nullptr;
|
std::shared_ptr<Processor> depth_processor = nullptr;
|
||||||
|
|
||||||
auto &&disparity_processor =
|
auto &&disparity_processor =
|
||||||
std::make_shared<DisparityProcessor>(DisparityComputingMethod::SGBM,
|
std::make_shared<DisparityProcessor>(DisparityComputingMethod::BM,
|
||||||
DISPARITY_PROC_PERIOD);
|
DISPARITY_PROC_PERIOD);
|
||||||
auto &&disparitynormalized_processor =
|
auto &&disparitynormalized_processor =
|
||||||
std::make_shared<DisparityNormalizedProcessor>(
|
std::make_shared<DisparityNormalizedProcessor>(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user