|
|
@ -157,8 +157,8 @@ struct Scene |
|
|
|
{ |
|
|
|
{ |
|
|
|
virtual ~Scene() {} |
|
|
|
virtual ~Scene() {} |
|
|
|
static Ptr<Scene> create(Size sz, Matx33f _intr, float _depthFactor, bool onlySemisphere); |
|
|
|
static Ptr<Scene> create(Size sz, Matx33f _intr, float _depthFactor, bool onlySemisphere); |
|
|
|
virtual Mat depth(Affine3f pose) = 0; |
|
|
|
virtual Mat_<float> depth(Affine3f pose) = 0; |
|
|
|
virtual Mat rgb(Affine3f pose) = 0; |
|
|
|
virtual Mat_<Vec3f> rgb(Affine3f pose) = 0; |
|
|
|
virtual std::vector<Affine3f> getPoses() = 0; |
|
|
|
virtual std::vector<Affine3f> getPoses() = 0; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -198,7 +198,7 @@ struct SemisphereScene : Scene |
|
|
|
return res; |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Mat depth(Affine3f pose) override |
|
|
|
Mat_<float> depth(Affine3f pose) override |
|
|
|
{ |
|
|
|
{ |
|
|
|
Mat_<float> frame(frameSize); |
|
|
|
Mat_<float> frame(frameSize); |
|
|
|
Reprojector reproj(intr); |
|
|
|
Reprojector reproj(intr); |
|
|
@ -206,10 +206,10 @@ struct SemisphereScene : Scene |
|
|
|
Range range(0, frame.rows); |
|
|
|
Range range(0, frame.rows); |
|
|
|
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere)); |
|
|
|
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere)); |
|
|
|
|
|
|
|
|
|
|
|
return std::move(frame); |
|
|
|
return frame; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Mat rgb(Affine3f pose) override |
|
|
|
Mat_<Vec3f> rgb(Affine3f pose) override |
|
|
|
{ |
|
|
|
{ |
|
|
|
Mat_<Vec3f> frame(frameSize); |
|
|
|
Mat_<Vec3f> frame(frameSize); |
|
|
|
Reprojector reproj(intr); |
|
|
|
Reprojector reproj(intr); |
|
|
@ -217,7 +217,7 @@ struct SemisphereScene : Scene |
|
|
|
Range range(0, frame.rows); |
|
|
|
Range range(0, frame.rows); |
|
|
|
parallel_for_(range, RenderColorInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere)); |
|
|
|
parallel_for_(range, RenderColorInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere)); |
|
|
|
|
|
|
|
|
|
|
|
return std::move(frame); |
|
|
|
return frame; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::vector<Affine3f> getPoses() override |
|
|
|
std::vector<Affine3f> getPoses() override |
|
|
|