Skip to content
Snippets Groups Projects
Commit 432fb028 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Small fixes, add filestream reset

parent 7ea91298
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ bool ArUco::apply(Frame &in, Frame &out, cudaStream_t stream) {
Frame *inptr = ∈
Frame *outptr = &out;
estimate_pose_ = config()->value("estimate_pose", false);
estimate_pose_ = config()->value("estimate_pose", true);
debug_ = config()->value("debug", false);
marker_size_ = config()->value("marker_size",0.1f);
......
......@@ -76,7 +76,10 @@ bool ClipScene::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cudaStr
auto sclip = clip;
sclip.origin = sclip.origin.getInverse() * pose;
if (!no_clip) ftl::cuda::clipping(f.createTexture<float>(Channel::Depth), f.getLeftCamera(), sclip, stream);
if (!no_clip) {
f.create<cv::cuda::GpuMat>(Channel::Depth); // Force reset.
ftl::cuda::clipping(f.createTexture<float>(Channel::Depth), f.getLeftCamera(), sclip, stream);
}
}
}
......
......@@ -24,6 +24,8 @@ bool Poser::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cudaStream_
std::vector<ftl::codecs::Shape3D> transforms;
in.get(Channel::Shapes3D, transforms);
//LOG(INFO) << "Found shapes 3D global: " << (int)transforms.size();
//for (auto &t : transforms) {
//LOG(INFO) << "Have FS transform: " << t.id;
//}
......@@ -37,6 +39,8 @@ bool Poser::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cudaStream_
std::vector<ftl::codecs::Shape3D> transforms;
f.get(Channel::Shapes3D, transforms);
//LOG(INFO) << "Found shapes 3D: " << (int)transforms.size();
for (auto &t : transforms) {
std::string idstr;
switch(t.type) {
......@@ -58,6 +62,7 @@ bool Poser::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cudaStream_
} else {
// TODO: Merge poses
if (!(*p).second.locked) (*p).second.pose = pose;
//LOG(INFO) << "POSE ID: " << idstr;
}
}
}
......
......@@ -29,6 +29,8 @@ class File : public Stream {
bool end() override;
bool active() override;
void reset() override;
/**
* Automatically tick through the frames using a timer. Threads are used.
*/
......
......@@ -364,6 +364,17 @@ bool File::end() {
return true;
}
void File::reset() {
UNIQUE_LOCK(mutex_, lk);
data_.clear();
buffer_in_.reset();
buffer_in_.remove_nonparsed_buffer();
_open();
timestart_ = (ftl::timer::get_time() / ftl::timer::getInterval()) * ftl::timer::getInterval();
timestamp_ = timestart_;
}
bool File::active() {
return active_;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment