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

Change messages

parent 3fcab6e2
No related branches found
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,
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_)
{
......@@ -61,12 +61,13 @@ std::vector<std::string> FrameImpl::getMessages()
if (f.hasChannel(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());
}
}
}
return msgs;
return allmsgs;
}
void FrameImpl::pushFrameSet(const std::shared_ptr<ftl::data::FrameSet> &fs)
......
......@@ -20,7 +20,7 @@ public:
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;
......
......@@ -26,7 +26,7 @@ public:
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;
};
......
......@@ -8,7 +8,7 @@
// Bump these for each release
#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 ((VOLTU_VERSION_MAJOR*10000) + (VOLTU_VERSION_MINOR*100) + VOLTU_VERSION_PATCH)
......
......@@ -102,10 +102,12 @@ int main(int argc, char **argv)
break;
}
std::vector<std::string> msgs = frame->getMessages();
for (const auto &s : msgs)
{
cout << s << endl;
std::vector<std::vector<std::string>> msgs = frame->getMessages();
if (msgs.size() > 0) {
for (const auto &s : msgs[0])
{
cout << s << endl;
}
}
cv::waitKey(-1);
......
......@@ -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);
msgs.push_back(" ");
if (use_disp) { report(msgs, err, o, npixels, "px", 1.0); }
......
......@@ -74,8 +74,7 @@ __global__ void reverse_check_kernel(
float d = depth_in[y*pitch4+x];
// TODO: Externally provide the error coefficient
const float err_coef = 0.0005f; //depthErrorCoef(ointrin);
const float err_coef = depthErrorCoef(ointrin);
int ox = 0;
int oy = 0;
......@@ -95,7 +94,7 @@ __global__ void reverse_check_kernel(
// TODO: Threshold comes from depth error characteristics
// If the value is significantly further then carve. Depth error
// 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)) {
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.
Finish editing this message first!
Please register or to comment