Comments (14)
Can you make sure geometry.live_vertex_confid.ArrayView()
has correct size? You can get it by geometry.live_vertex_confid.ArrayView().Size()
.
from surfelwarp.
Sory for the late reply~
The result is:
/home/jiajie/body-reconstruction/surfelwarp/apps/surfelwarp_app/main.cpp:40: The 0th Frame
geometry.live_vertex_confid.ArrayView().Size():76728
/home/jiajie/body-reconstruction/surfelwarp/apps/surfelwarp_app/main.cpp:40: The 1th Frame
geometry.live_vertex_confid.ArrayView().Size():76904
/home/jiajie/body-reconstruction/surfelwarp/apps/surfelwarp_app/main.cpp:40: The 2th Frame
geometry.live_vertex_confid.ArrayView().Size():77042
BTW,the subfuction :
//Also save the reference point cloud
Visualizer::SavePointCloud(geometry.reference_vertex_confid.ArrayView(), (save_dir / "reference.off").string());
inside the fuction saveCorrespondedCloud(observation,fused_geometry_idx,save_dir);
works well,
But somethings wrong with :
Visualizer::SaveMatchedCloudPair(
observation.vertex_config_map,
geometry.live_vertex_confid.ArrayView(),
m_camera.GetCamera2WorldEigen(),
cloud_1_name, cloud_2_name
);
from surfelwarp.
When i call:
void surfelwarp::Visualizer::SaveMatchedCloudPair(
cudaTextureObject_t cloud_1,
const DeviceArray<float4> &cloud_2,
const Eigen::Matrix4f &from1To2,
const std::string &cloud_1_name, const std::string &cloud_2_name
) {
const auto h_cloud_1 = downloadPointCloud(cloud_1);
const auto h_cloud_2 = downloadPointCloud(cloud_2);
SaveMatchedCloudPair(
h_cloud_1,
h_cloud_2,
from1To2,
cloud_1_name, cloud_2_name
);
}
h_cloud_1
return all zero value in h_cloud_1.points
,while h_cloud_2
return reasonable value.
For example:
Locals
cloud_1 <optimized out>
cloud_1_name "frame_1/observation.off" std::__cxx11::string &
cloud_2 @0x7fffffffd9a0 surfelwarp::DeviceArray &
cloud_2_name "frame_1/model.off" std::__cxx11::string &
from1To2 (4 x 4), ColumnMajor Eigen::Matrix4f &
h_cloud_1 @0x555570001660 std::shared_ptr<cilantro::PointCloud<float, 3> >
colors <not accessible> Eigen::Matrix<float, 3, -1, 0, 3, -1>
normals <not accessible> Eigen::Matrix<float, 3, -1, 0, 3, -1>
points (3 x 264000), ColumnMajor cilantro::VectorSet
[0,0] -0.0 float
[1,0] -0.0 float
[2,0] 0.0 float
[0,1] -0.0 float
[1,1] -0.0 float
[2,1] 0.0 float
[0,2] -0.0 float
[1,2] -0.0 float
[2,2] 0.0 float
[0,3] -0.0 float
[1,3] -0.0 float
[2,3] 0.0 float
......
h_cloud_1@1 <optimized out>
h_cloud_2 @0x55555dab58d0 std::shared_ptr<cilantro::PointCloud<float, 3> >
colors <not accessible> Eigen::Matrix<float, 3, -1, 0, 3, -1>
normals <not accessible> Eigen::Matrix<float, 3, -1, 0, 3, -1>
points (3 x 76728), ColumnMajor cilantro::VectorSet
[0,0] 290.2420959472656 float
[1,0] -174.35791015625 float
[2,0] 606.0 float
[0,1] 291.3052673339844 float
[1,1] -174.35791015625 float
[2,1] 606.0 float
[0,2] 292.3684387207031 float
[1,2] -174.35791015625 float
[2,2] 606.0 float
[0,3] 290.2420959472656 float
[1,3] -173.29473876953125 float
......
Is it something wrong occour when return the value from GPU device to host ?
from surfelwarp.
I guess you add the save command to a place where sync has not finished. Where did you add the code? Can you attach your file?
from surfelwarp.
I add the code in void surfelwarp::SurfelWarpSerial::ProcessNextFrameWithReinit(bool offline_save)
of SurfelWarpSerial.cpp
:
//Debug save
if(offline_save) {
const auto with_recent = draw_recent || use_reinit;
const auto& save_dir = createOrGetDataDirectory(m_frame_idx);
saveCameraObservations(observation, save_dir);
saveSolverMaps(solver_maps, save_dir);
const auto num_fused_vertex = m_surfel_geometry[fused_geometry_idx]->NumValidSurfels();
saveVisualizationMaps(
num_fused_vertex, fused_geometry_idx,
m_camera.GetWorld2CameraEigen(), m_camera.GetInitWorld2CameraEigen(),
save_dir, with_recent
);
//Here the place i add the code
saveCorrespondedCloud(observation,fused_geometry_idx,save_dir);
}
I did not chage any code of SurfelWarpSerial.cpp
except here.
from surfelwarp.
Can you add a line Visualizer::DrawPointCloud(observation.vertex_config_map)
before saveCorrespondedCloud(observation,fused_geometry_idx,save_dir)
to make sure the image processing is correct?
from surfelwarp.
I add it ,and show nothing~Whether or not i Comment saveCorrespondedCloud(observation,fused_geometry_idx,save_dir);
out
from surfelwarp.
It means the image processing is not correct as there is not valid vertex. I would recommend to debug the image processing using the surfelwarp/apps/imgproc_app/main.cpp
application to make sure the rgbd image, vertex and normal map are correct. Also make sure the far-away clipping value is reasonable.
from surfelwarp.
Thanks! I will work it out myselves~
from surfelwarp.
@Wjiajie hi, I got the same problem.
I want to reconstruct the mesh in form of obj or ply, @weigao95 Could you guild me how to generate the mesh from the generated *.png files?
from surfelwarp.
Thanks! I will work it out myselves~
I can also use this functionVisualizer::SavePointCloud
to save the point cloud,But can't usesaveCorrespondedCloud
It reported the following error on clion:
/home/wya/project/SW/surfelwarp/apps/surfelwarp_app/main.cpp:86: The 0th Frame
surfelwarp_app: /usr/local/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:365: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::Index, Eigen::Index) [with Derived = Eigen::Matrix<float, 3, -1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = float; Eigen::Index = long int]: Assertion `row >= 0 && row < rows() && col >= 0 && col < cols()' failed.
from surfelwarp.
@Wjiajie
Hi, can you ran Visualizer::SaveMatchedCloudPair successfully?
In my case, I can run Visualizer::SavePointCloud and the Visualizer::DrawPointCloud, but Visualizer::SaveMatchedCloudPair return malloc error.
from surfelwarp.
I used to fail in running Visualizer::SaveMatchedCloudPair
as well. But after I switched to building with PCL, the problem was gone. Perhaps this problem stems from cilantro. BTW, I also found PCL works on my Ubuntu 18 with CUDA 11.2.
from surfelwarp.
I used to fail in running
Visualizer::SaveMatchedCloudPair
as well. But after I switched to building with PCL, the problem was gone. Perhaps this problem stems from cilantro. BTW, I also found PCL works on my Ubuntu 18 with CUDA 11.2.
I've had similar experience (probably unrelated to original issue in this thread though). I think it has to do with custom memory aligned allocators used in Eigen (which is used by cilantro). Not 100% sure.
As far as I can tell, it was solved by using make_shared instead of (new T) in data_transfer.cu, e.g.:
PointCloud3f_Pointer point_cloud = std::make_shared<PointCloud3f>(); //(new PointCloud3f);
There was also some mis-use of input->points.size() instead of input.size().
from surfelwarp.
Related Issues (20)
- Headless mode HOT 2
- Windows Prebuilt binary doesn't seem right HOT 3
- Confused about the flip_color parameter. HOT 2
- Any idea to make it realtime? HOT 2
- The Boost Version HOT 1
- What is the purpose of using GPC in Surfelwarp ? HOT 4
- Running multiple instances at the same time HOT 1
- Can you share your own implementation of dynamic fusion? HOT 1
- Pangolin installation version specification for cilantro_build.md HOT 2
- Problem when running my examples
- Error building on Ubuntu 18.04
- Build error on windows vs2015: libucrtd.lib(log2f.obj) : error LNK2005: log2f 已经在 core_libd.lib(core_lib_generated_SurfelWarpSerial.cu.obj) 中定义 HOT 1
- Use kinect2.0 to get depthimages in Ubuntu 18.04
- confidence value from depth image
- The GLFW window is not correctly created, terminate called after throwing an instance of 'std::runtime_error*
- How can i export the final and complete reconstructed model in point cloud
- Windows binaries are missing
- Compiling failed in the environment of (cuda11.3, arch_sm=86) HOT 2
- how to reconstruction from png
- WarpFieldUpdater.cpp: Nan in node candidate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surfelwarp.