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

Change messages

parent 3fcab6e2
Branches
No related tags found
1 merge request!358Updates to SDK and alternative fusion
Pipeline #33767 passed
...@@ -50,9 +50,9 @@ voltu::PointCloudPtr FrameImpl::getPointCloud(voltu::PointCloudFormat cloudfmt, ...@@ -50,9 +50,9 @@ voltu::PointCloudPtr FrameImpl::getPointCloud(voltu::PointCloudFormat cloudfmt,
return nullptr; return nullptr;
} }
std::vector<std::string> FrameImpl::getMessages() std::vector<std::vector<std::string>> FrameImpl::getMessages()
{ {
std::vector<std::string> msgs; std::vector<std::vector<std::string>> allmsgs;
for (const auto &fs : framesets_) for (const auto &fs : framesets_)
{ {
...@@ -61,12 +61,13 @@ std::vector<std::string> FrameImpl::getMessages() ...@@ -61,12 +61,13 @@ std::vector<std::string> FrameImpl::getMessages()
if (f.hasChannel(ftl::codecs::Channel::Messages)) if (f.hasChannel(ftl::codecs::Channel::Messages))
{ {
const auto &m = f.get<std::vector<std::string>>(ftl::codecs::Channel::Messages); const auto &m = f.get<std::vector<std::string>>(ftl::codecs::Channel::Messages);
auto &msgs = allmsgs.emplace_back();
msgs.insert(msgs.end(), m.begin(), m.end()); msgs.insert(msgs.end(), m.begin(), m.end());
} }
} }
} }
return msgs; return allmsgs;
} }
void FrameImpl::pushFrameSet(const std::shared_ptr<ftl::data::FrameSet> &fs) void FrameImpl::pushFrameSet(const std::shared_ptr<ftl::data::FrameSet> &fs)
......
...@@ -20,7 +20,7 @@ public: ...@@ -20,7 +20,7 @@ public:
voltu::PointCloudPtr getPointCloud(voltu::PointCloudFormat cloudfmt, voltu::PointFormat pointfmt) override; voltu::PointCloudPtr getPointCloud(voltu::PointCloudFormat cloudfmt, voltu::PointFormat pointfmt) override;
std::vector<std::string> getMessages() override; std::vector<std::vector<std::string>> getMessages() override;
int64_t getTimestamp() override; int64_t getTimestamp() override;
......
...@@ -26,7 +26,7 @@ public: ...@@ -26,7 +26,7 @@ public:
PY_API PY_RV_LIFETIME_PARENT virtual voltu::PointCloudPtr getPointCloud(voltu::PointCloudFormat cloudfmt, voltu::PointFormat pointfmt) = 0; PY_API PY_RV_LIFETIME_PARENT virtual voltu::PointCloudPtr getPointCloud(voltu::PointCloudFormat cloudfmt, voltu::PointFormat pointfmt) = 0;
PY_API virtual std::vector<std::string> getMessages() = 0; PY_API virtual std::vector<std::vector<std::string>> getMessages() = 0;
PY_API virtual int64_t getTimestamp() = 0; PY_API virtual int64_t getTimestamp() = 0;
}; };
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Bump these for each release // Bump these for each release
#define VOLTU_VERSION_MAJOR 0 // For API incompatible changes #define VOLTU_VERSION_MAJOR 0 // For API incompatible changes
#define VOLTU_VERSION_MINOR 2 // For binary compatibility and extensions #define VOLTU_VERSION_MINOR 3 // For binary compatibility and extensions
#define VOLTU_VERSION_PATCH 0 // Binary compatible internal fixes #define VOLTU_VERSION_PATCH 0 // Binary compatible internal fixes
#define VOLTU_VERSION ((VOLTU_VERSION_MAJOR*10000) + (VOLTU_VERSION_MINOR*100) + VOLTU_VERSION_PATCH) #define VOLTU_VERSION ((VOLTU_VERSION_MAJOR*10000) + (VOLTU_VERSION_MINOR*100) + VOLTU_VERSION_PATCH)
......
...@@ -102,11 +102,13 @@ int main(int argc, char **argv) ...@@ -102,11 +102,13 @@ int main(int argc, char **argv)
break; break;
} }
std::vector<std::string> msgs = frame->getMessages(); std::vector<std::vector<std::string>> msgs = frame->getMessages();
for (const auto &s : msgs) if (msgs.size() > 0) {
for (const auto &s : msgs[0])
{ {
cout << s << endl; cout << s << endl;
} }
}
cv::waitKey(-1); cv::waitKey(-1);
......
...@@ -113,6 +113,8 @@ bool GTAnalysis::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t ...@@ -113,6 +113,8 @@ bool GTAnalysis::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t
); );
} }
cudaStreamSynchronize(stream);
cudaMemcpy(&err, output_, sizeof(err), cudaMemcpyDeviceToHost); cudaMemcpy(&err, output_, sizeof(err), cudaMemcpyDeviceToHost);
msgs.push_back(" "); msgs.push_back(" ");
if (use_disp) { report(msgs, err, o, npixels, "px", 1.0); } if (use_disp) { report(msgs, err, o, npixels, "px", 1.0); }
......
...@@ -74,8 +74,7 @@ __global__ void reverse_check_kernel( ...@@ -74,8 +74,7 @@ __global__ void reverse_check_kernel(
float d = depth_in[y*pitch4+x]; float d = depth_in[y*pitch4+x];
// TODO: Externally provide the error coefficient const float err_coef = depthErrorCoef(ointrin);
const float err_coef = 0.0005f; //depthErrorCoef(ointrin);
int ox = 0; int ox = 0;
int oy = 0; int oy = 0;
...@@ -95,7 +94,7 @@ __global__ void reverse_check_kernel( ...@@ -95,7 +94,7 @@ __global__ void reverse_check_kernel(
// TODO: Threshold comes from depth error characteristics // TODO: Threshold comes from depth error characteristics
// If the value is significantly further then carve. Depth error // If the value is significantly further then carve. Depth error
// is not always easy to calculate, depends on source. // is not always easy to calculate, depends on source.
// FIXME: Use length between 3D points, not depth // FIXME: Use length between 3D points, not depth?
if (!(d2 < ointrin.maxDepth && d2 - campos.z > d2*d2*err_coef)) { if (!(d2 < ointrin.maxDepth && d2 - campos.z > d2*d2*err_coef)) {
match = fabsf(campos.z - d2) < d2*d2*err_coef; break; match = fabsf(campos.z - d2) < d2*d2*err_coef; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment