refactor(synthetic): use shared_ptr for parent_
This commit is contained in:
@@ -45,7 +45,8 @@ Object *DepthProcessor::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool DepthProcessor::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat *input = Object::Cast<ObjMat>(in);
|
||||
ObjMat *output = Object::Cast<ObjMat>(out);
|
||||
|
||||
@@ -36,7 +36,8 @@ class DepthProcessor : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
private:
|
||||
std::shared_ptr<struct camera_calib_info_pair> calib_infos_;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,8 @@ Object *DepthProcessorOCV::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool DepthProcessorOCV::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat *input = Object::Cast<ObjMat>(in);
|
||||
ObjMat *output = Object::Cast<ObjMat>(out);
|
||||
|
||||
@@ -33,7 +33,8 @@ class DepthProcessorOCV : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
};
|
||||
|
||||
MYNTEYE_END_NAMESPACE
|
||||
|
||||
@@ -43,7 +43,8 @@ Object *DisparityNormalizedProcessor::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool DisparityNormalizedProcessor::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat *input = Object::Cast<ObjMat>(in);
|
||||
ObjMat *output = Object::Cast<ObjMat>(out);
|
||||
|
||||
@@ -33,7 +33,8 @@ class DisparityNormalizedProcessor : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
};
|
||||
|
||||
MYNTEYE_END_NAMESPACE
|
||||
|
||||
@@ -66,7 +66,6 @@ DisparityProcessor::DisparityProcessor(DisparityProcessorType type,
|
||||
#endif
|
||||
#ifdef WITH_BM_SOBEL_FILTER
|
||||
} else if (type_ == DisparityProcessorType::BM) {
|
||||
int bmWinSize = 3;
|
||||
#ifdef WITH_OPENCV2
|
||||
LOG(ERROR) << "not supported in opencv 2.x";
|
||||
// int bmWinSize = 3;
|
||||
@@ -147,7 +146,8 @@ Object *DisparityProcessor::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool DisparityProcessor::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat2 *input = Object::Cast<ObjMat2>(in);
|
||||
ObjMat *output = Object::Cast<ObjMat>(out);
|
||||
|
||||
@@ -49,7 +49,8 @@ class DisparityProcessor : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
|
||||
private:
|
||||
cv::Ptr<cv::StereoSGBM> sgbm_matcher;
|
||||
|
||||
@@ -73,7 +73,8 @@ Object *PointsProcessor::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool PointsProcessor::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
|
||||
float fx = calib_infos_->left.K[0];
|
||||
|
||||
@@ -38,7 +38,8 @@ class PointsProcessor : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<struct camera_calib_info_pair> calib_infos_;
|
||||
|
||||
@@ -41,7 +41,8 @@ Object *PointsProcessorOCV::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool PointsProcessorOCV::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat *input = Object::Cast<ObjMat>(in);
|
||||
ObjMat *output = Object::Cast<ObjMat>(out);
|
||||
|
||||
@@ -35,7 +35,8 @@ class PointsProcessorOCV : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
|
||||
private:
|
||||
cv::Mat Q_;
|
||||
|
||||
@@ -417,7 +417,8 @@ Object *RectifyProcessor::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool RectifyProcessor::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat2 *input = Object::Cast<ObjMat2>(in);
|
||||
ObjMat2 *output = Object::Cast<ObjMat2>(out);
|
||||
|
||||
@@ -77,7 +77,8 @@ class RectifyProcessor : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
|
||||
private:
|
||||
void InitParams(IntrinsicsEquidistant in_left,
|
||||
|
||||
@@ -61,7 +61,8 @@ Object *RectifyProcessorOCV::OnCreateOutput() {
|
||||
}
|
||||
|
||||
bool RectifyProcessorOCV::OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) {
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) {
|
||||
MYNTEYE_UNUSED(parent)
|
||||
const ObjMat2 *input = Object::Cast<ObjMat2>(in);
|
||||
ObjMat2 *output = Object::Cast<ObjMat2>(out);
|
||||
|
||||
@@ -51,7 +51,8 @@ class RectifyProcessorOCV : public Processor {
|
||||
protected:
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out, Processor *const parent) override;
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
|
||||
private:
|
||||
void InitParams(IntrinsicsPinhole in_left,
|
||||
|
||||
Reference in New Issue
Block a user