Code Monkey home page Code Monkey logo

cpf_segmentation's People

Contributors

markuseich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpf_segmentation's Issues

Uninitialized variables

Uninitialized variables seem to result in segmentation fault when I run code that I added to process the resulting clusters. After running Valgrind, it seems that the segmentation fault comes from uninitialized variables in the original code. Also, note an Eigen assertion failed, not sure if this is related.

Output of Valgrind on the original code (changed to Debug in the cmake) when running command:
valgrind --leak-check=yes ./segmentation_test ../test_data/tango-top.pcd -o
is attached.
valgrind_out.txt

Segmented point cloud only labelled with 0s

When running ./segmentation_test test_data/dining_room_0001a_redux.pcd -o,
the points in the resulting file are all labelled with 0 as 4th coordinate, e.g.
-1.8683062 0.56312746 0.78754455 0
-1.8874744 0.52467334 0.79544008 0
when the console mentions 8 labels: Creating graph with 13385 nodes and 8 labels

error when make

Hi, after cmake .. I tried to make but result in having these errors related to Eigen. Would you please give me some suggestions on where to find exactly the problem is? Many thanks!

The following statements are what I get with make command:

Scanning dependencies of target segmentation
[ 14%] Building CXX object CMakeFiles/segmentation.dir/src/segmentation.cpp.o
In file included from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:85:0,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h: In function ‘bool isConvex(Eigen::Vector3f, Eigen::Vector3f, Eigen::Vector3f, Eigen::Vector3f)’:
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h:30:73: error: too many arguments to function ‘double pcl::getAngle3D(const Vector4f&, const Vector4f&)’
float normal_angle = pcl::getAngle3D(source_normal, target_normal, true);
^
In file included from /usr/include/pcl-1.7/pcl/common/common.h:194:0,
from /usr/include/pcl-1.7/pcl/octree/impl/octree_pointcloud.hpp:45,
from /usr/include/pcl-1.7/pcl/octree/octree_impl.h:46,
from /usr/include/pcl-1.7/pcl/octree/octree_pointcloud_adjacency.h:46,
from /usr/include/pcl-1.7/pcl/segmentation/supervoxel_clustering.h:49,
from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:61,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/usr/include/pcl-1.7/pcl/common/impl/common.hpp:46:1: note: declared here
pcl::getAngle3D (const Eigen::Vector4f &v1, const Eigen::Vector4f &v2)
^
In file included from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:85:0,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h:61:70: error: too many arguments to function ‘double pcl::getAngle3D(const Vector4f&, const Vector4f&)’
float intersection_angle = pcl::getAngle3D (ncross, vec_t_to_s, true);
^
In file included from /usr/include/pcl-1.7/pcl/common/common.h:194:0,
from /usr/include/pcl-1.7/pcl/octree/impl/octree_pointcloud.hpp:45,
from /usr/include/pcl-1.7/pcl/octree/octree_impl.h:46,
from /usr/include/pcl-1.7/pcl/octree/octree_pointcloud_adjacency.h:46,
from /usr/include/pcl-1.7/pcl/segmentation/supervoxel_clustering.h:49,
from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:61,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/usr/include/pcl-1.7/pcl/common/impl/common.hpp:46:1: note: declared here
pcl::getAngle3D (const Eigen::Vector4f &v1, const Eigen::Vector4f &v2)
^
/home/claude/cpf_segmentation-master/src/segmentation.cpp: In member function ‘void APC::Segmentation::doSegmentation()’:
/home/claude/cpf_segmentation-master/src/segmentation.cpp:51:10: error: ‘class pcl::SupervoxelClusteringpcl::PointXYZRGBA’ has no member named ‘setUseSingleCameraTransform’
super.setUseSingleCameraTransform (config_.use_single_cam_transform);
^
In file included from /usr/include/eigen3/Eigen/Core:254:0,
from /usr/include/eigen3/Eigen/StdVector:14,
from /usr/include/pcl-1.7/pcl/point_cloud.h:46,
from /usr/include/pcl-1.7/pcl/io/pcd_io.h:43,
from /home/claude/cpf_segmentation-master/include/segmentation/segmentation.hpp:55,
from /home/claude/cpf_segmentation-master/src/segmentation.cpp:38:
/usr/include/eigen3/Eigen/src/Core/Assign.h: In instantiation of ‘Derived& Eigen::DenseBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; Derived = Eigen::Matrix<float, 4, 1>]’:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:411:46: required from ‘Derived& Eigen::PlainObjectBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; Derived = Eigen::Matrix<float, 4, 1>]’
/usr/include/eigen3/Eigen/src/Core/Assign.h:520:123: required from ‘static Derived& Eigen::internal::assign_selector<Derived, OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<float, 4, 1>; OtherDerived = Eigen::Matrix<float, 3, 1>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:618:105: required from ‘Derived& Eigen::PlainObjectBase::_set_noalias(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; Derived = Eigen::Matrix<float, 4, 1>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:281:31: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase&) [with OtherDerived = Eigen::Matrix<float, 3, 1>; _Scalar = float; int _Rows = 4; int _Cols = 1; int _Options = 0; int _MaxRows = 4; int _MaxCols = 1]’
/home/claude/cpf_segmentation-master/include/segmentation/segmentation_helpers.h:30:73: required from here
/usr/include/eigen3/Eigen/src/Core/Assign.h:492:3: error: ‘YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES’ is not a member of ‘Eigen::internal::static_assertion’
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
^
make[2]: *** [CMakeFiles/segmentation.dir/src/segmentation.cpp.o] Error 1
make[1]: *** [CMakeFiles/segmentation.dir/all] Error 2
make: *** [all] Error 2

make error

Hi, @trungtpham ,

I got the following make error. I had compiled and installed pcl 1.8.

root@milton-All-Series:/data/code/cpf_segmentation/build# make
Scanning dependencies of target segmentation
[ 14%] Building CXX object CMakeFiles/segmentation.dir/src/segmentation.cpp.o
[ 28%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/maxflow.cpp.o
[ 42%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/LinkedBlockList.cpp.o
[ 57%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/GCoptimization.cpp.o
[ 71%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/graph.cpp.o
Linking CXX shared library libsegmentation.so
[ 71%] Built target segmentation
Scanning dependencies of target segmentation_kinect_test
[ 85%] Building CXX object CMakeFiles/segmentation_kinect_test.dir/src/segmentation_kinect_test.cpp.o
Linking CXX executable segmentation_kinect_test
/usr/bin/ld: CMakeFiles/segmentation_kinect_test.dir/src/segmentation_kinect_test.cpp.o: undefined reference to symbol 'pthread_mutex_trylock@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [segmentation_kinect_test] Error 1
make[1]: *** [CMakeFiles/segmentation_kinect_test.dir/all] Error 2
make: *** [all] Error 2
root@milton-All-Series:/data/code/cpf_segmentation/build# 

Could you suggest me how to fix it?

THX~

LNK Error 2001 when trying to build on MS VS 2015

Hey,

I would like to try your code but have problems building it. I'm using Windows 10 x64 with MS VS 2015, release configuration x64. Following errors occur when I try to build your project:

segmentation.lib(segmentation.obj): error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual bool __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::computeModelCoefficients(class std::vector<int,class std::allocator<int> > const &,class Eigen::Matrix<float,-1,1,0,-1,1> &)" (?computeModelCoefficients@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAA_NAEBV?$vector@HV?$allocator@H@std@@@std@@AEAV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::getDistancesToModel(class Eigen::Matrix<float,-1,1,0,-1,1> const &,class std::vector<double,class std::allocator<double> > &)" (?getDistancesToModel@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAAXAEBV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@AEAV?$vector@NV?$allocator@N@std@@@std@@@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::selectWithinDistance(class Eigen::Matrix<float,-1,1,0,-1,1> const &,double,class std::vector<int,class std::allocator<int> > &)" (?selectWithinDistance@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAAXAEBV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@NAEAV?$vector@HV?$allocator@H@std@@@std@@@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual int __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::countWithinDistance(class Eigen::Matrix<float,-1,1,0,-1,1> const &,double)" (?countWithinDistance@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAAHAEBV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@N@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::optimizeModelCoefficients(class std::vector<int,class std::allocator<int> > const &,class Eigen::Matrix<float,-1,1,0,-1,1> const &,class Eigen::Matrix<float,-1,1,0,-1,1> &)" (?optimizeModelCoefficients@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAAXAEBV?$vector@HV?$allocator@H@std@@@std@@AEBV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@AEAV56@@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::projectPoints(class std::vector<int,class std::allocator<int> > const &,class Eigen::Matrix<float,-1,1,0,-1,1> const &,class pcl::PointCloud<struct pcl::PointNormal> &,bool)" (?projectPoints@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAAXAEBV?$vector@HV?$allocator@H@std@@@std@@AEBV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@AEAV?$PointCloud@UPointNormal@pcl@@@2@_N@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual bool __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::doSamplesVerifyModel(class std::set<int,struct std::less<int>,class std::allocator<int> > const &,class Eigen::Matrix<float,-1,1,0,-1,1> const &,double)" (?doSamplesVerifyModel@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@UEAA_NAEBV?$set@HU?$less@H@std@@V?$allocator@H@2@@std@@AEBV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@N@Z)".
segmentation.lib(segmentation.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""private: virtual bool __cdecl pcl::SampleConsensusModelPlane<struct pcl::PointNormal>::isSampleGood(class std::vector<int,class std::allocator<int> > const &)const " (?isSampleGood@?$SampleConsensusModelPlane@UPointNormal@pcl@@@pcl@@EEBA_NAEBV?$vector@HV?$allocator@H@std@@@std@@@Z)".

Segmentation fault after ./segmentation_test

Hi, @trungtpham ,

After make install the package, I test it as follows and got the Segmentation fault error:

root@milton-All-Series:/data/code2/cpf_segmentation/build# ./segmentation_test ../test_data/tum_small.pcd
Loading pointcloud
Number of points: 749580
Number of points after filtered 733102
Segmentation fault (core dumped)

Any suggestions?

Thx~

Make error

Hello, I am new to Linux, and I am currently working on a unbuntu16.04 system, with PCL 1.8, openni, openCV 3.1.0 installed. I have encounter some issues during "make", I got the following error messages:

/home/michael/cpf_segmentation/src/segmentation_kinect_test.cpp: In function ‘int main(int, char**)’:
/home/michael/cpf_segmentation/src/segmentation_kinect_test.cpp:85:3: error: ‘OpenNIGrabber’ is not a member of ‘pcl’
pcl::OpenNIGrabber grabber;
^
/home/michael/cpf_segmentation/src/segmentation_kinect_test.cpp:86:3: error: ‘Grabber’ is not a member of ‘pcl’
pcl::Grabber* interface = grabber;
^
/home/michael/cpf_segmentation/src/segmentation_kinect_test.cpp:86:17: error: ‘interface’ was not declared in this scope
pcl::Grabber* interface = grabber;
^
/home/michael/cpf_segmentation/src/segmentation_kinect_test.cpp:86:29: error: ‘grabber’ was not declared in this scope
pcl::Grabber* interface = grabber;
^
I checked the header files of grabber.h, it was pointing to the right folder. I really have no idea what's the problem here.

Puzzles about codes in segmentation.cpp

Hi, recently, I have read your paper (Geometrically Consistent Plane Extraction for Dense Indoor 3D Maps Segmentation), and I have found the code you provided, it's really of great help to me, thank you.
I have some puzzles and have tried to send you an e-mail, but the e-mail was not sent successfully. Therefore, I'm here to post my puzzles.
As the main procedure is done in doSegmentation in segmentation.cpp, my puzzles are mainly caused by code of the function.

  1. In line 209, why min_num_supervoxel_per_plan is equal to config_.min_plane_area/(config_.seed_resolution*config_.seed_resolution/4/M_PI)
  2. From line 170 to line 172, the steps of Hough accumulator are defined as
    double step_theta = 1;double step_phi = 1;double step_rho = 0.025; are they empirically set? In my experiment, step_rho is set to 0.2, and I also set the other two steps as yours , however, as the bin effect, I don't obtain the desired result even two planes with 0.5 degree angle difference and 0.1 meter rho difference (the two planes don't vote to the same bin in Hough accumulator).
  3. Are the thresholds ( 0.8, 0.5, and 0.25)() set empirically?(line 245: float normal_dis = dotprod < 0.8 ? 100 : 1; line 295: dot_prod = dot_prod < 0.5 ? dot_prod : 1 - dot_prod; line 296: double angle_cost = 1 - exp(-dot_prod/0.25);)
  4. From line 254 to line 256, I'm puzzled about the way of processing plane_score and the reason of setting confidence_threshold to 0.1, I tried to find some information from your paper, but nowhere referred to this.
    Additionally, there are no label cost terms in the energy functions you constructed, I think this is probability because you treated the model selection as label cost, is this right?
    Hoping for your reply!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.