feat(*): change doc of 2100 info.
This commit is contained in:
@@ -81,6 +81,8 @@ DisparityProcessor::DisparityProcessor(DisparityComputingMethod type,
|
||||
sgbm_matcher->setSpeckleWindowSize(100);
|
||||
sgbm_matcher->setSpeckleRange(32);
|
||||
sgbm_matcher->setDisp12MaxDiff(1);
|
||||
disparity_min_sgbm = sgbm_matcher->getMinDisparity();
|
||||
disparity_max_sgbm = sgbm_matcher->getNumDisparities();
|
||||
|
||||
bm_matcher = cv::StereoBM::create(0, 3);
|
||||
bm_matcher->setPreFilterSize(9);
|
||||
@@ -93,8 +95,8 @@ DisparityProcessor::DisparityProcessor(DisparityComputingMethod type,
|
||||
bm_matcher->setSpeckleWindowSize(100);
|
||||
bm_matcher->setSpeckleRange(4);
|
||||
bm_matcher->setPreFilterType(cv::StereoBM::PREFILTER_XSOBEL);
|
||||
// DISPARITY_MIN = bm_matcher->getMinDisparity();
|
||||
// DISPARITY_MAX = bm_matcher->getMinDisparity();
|
||||
disparity_min_bm = bm_matcher->getMinDisparity();
|
||||
disparity_max_bm = bm_matcher->getNumDisparities();
|
||||
#endif
|
||||
NotifyComputingTypeChanged(type_);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,20 @@ class DisparityProcessor : public Processor {
|
||||
const DisparityComputingMethod &MethodType);
|
||||
void NotifyComputingTypeChanged(const DisparityComputingMethod &MethodType);
|
||||
bool ConfigFromFile(const std::string& config);
|
||||
double GetMinDisparity() {
|
||||
if (type_ == DisparityComputingMethod::BM) {
|
||||
return disparity_min_bm;
|
||||
} else {
|
||||
return disparity_min_sgbm;
|
||||
}
|
||||
}
|
||||
double GetMaxDisparity() {
|
||||
if (type_ == DisparityComputingMethod::BM) {
|
||||
return disparity_max_bm;
|
||||
} else {
|
||||
return disparity_max_sgbm;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
@@ -56,6 +70,10 @@ class DisparityProcessor : public Processor {
|
||||
cv::Ptr<cv::StereoBM> bm_matcher;
|
||||
DisparityComputingMethod type_;
|
||||
double cx1_minus_cx2_;
|
||||
double disparity_min_bm;
|
||||
double disparity_max_bm;
|
||||
double disparity_min_sgbm;
|
||||
double disparity_max_sgbm;
|
||||
};
|
||||
|
||||
MYNTEYE_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user