xiaohulugo / 3dlinedetection Goto Github PK
View Code? Open in Web Editor NEWA simple and efficient 3D line detection algorithm for large scale unorganized point cloud
License: BSD 2-Clause "Simplified" License
A simple and efficient 3D line detection algorithm for large scale unorganized point cloud
License: BSD 2-Clause "Simplified" License
`void main()
{
string fileData = "D://Facade//data.txt";
string fileOut = "D://Facade//data";
// read in data
PointCloud<double> pointData;
readDataFromFile( fileData, pointData );
int k = 20;
LineDetection3D detector;
std::vector<PLANE> planes;
std::vector<std::vector<cv::Point3d> > lines;
std::vector<double> ts;
detector.run( pointData, k, planes, lines, ts );
cout<<"lines number: "<<lines.size()<<endl;
cout<<"planes number: "<<planes.size()<<endl;
writeOutPlanes( fileOut, planes, detector.scale );
writeOutLines( fileOut, lines, detector.scale );
}`
What does the K value mean?
I have seen that the k value is used in other functions as well.
I'm curious about what k does and why it's set to 20.
And can better results be obtained by changing the value of k depending on the data used?
I want to test your code.
Could u plz provided some data file?
In the main.cpp there are lines:
string fileData = "D://Facade//data.txt";
string fileOut = "D://Facade//data";
I do not know how to change it in linux OS.
Thx in advance.
Hi,
The project looks really cool so I tried to build it. I have not touched C/C++ before so excuse me but I have an error during the make process that I can't understand.
I am on ubuntu 18.04. Cmake version 3.10.2. OpenCV version 3.4.2. I installed the following packages through the ubuntu to package manager for OpenMPI dependency:
The steps I take are as follows:
This produces the following error:
[ 25%] Building CXX object src/CMakeFiles/LineFromPointCloud.dir/main.cpp.o
/home/bigdoods/projects/3DLineDetection/src/main.cpp:115:11: error: ‘::main’ must return ‘int’
void main()
^
src/CMakeFiles/LineFromPointCloud.dir/build.make:110: recipe for target 'src/CMakeFiles/LineFromPointCloud.dir/main.cpp.o' failed
make[2]: *** [src/CMakeFiles/LineFromPointCloud.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/LineFromPointCloud.dir/all' failed
make[1]: *** [src/CMakeFiles/LineFromPointCloud.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Could you please advise how to get working please?
Hello, Is it need to install openCV libraries? Beacuse they show me this message when I build with CMake.
CMake Error at CMakeLists.txt:11 (message):
message called with incorrect number of arguments
error: ‘CV_RETR_LIST’ was not declared in this scope
cv::findContours(mask2, contours, hierarchy, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
^~~~~~~~~~~~
Inside this program line
3DLineDetection/src/LineDetection3D.cpp
Line 520 in 20e40b1
hello,
thank you for sharing such a nice code in advance
it's working well in my laptop :-)
but when I got my output files which are line.txt, plane.txt
I just don't know how to visualize this file like a picture in README.md file
能不能分享一下数据集,有的话发我一份2778087067@qqcom,谢谢
Could you please assist me to fix this issue?
'Starting build...
/usr/bin/g++ -fdiagnostics-color=always -g /home/amirabb/Desktop/3D_line_detection/3DLineDetection-1/src/main.cpp -o /home/amirabb/Desktop/3D_line_detection/3DLineDetection-1/src/main
/usr/bin/ld: /tmp/ccL2cPu8.o: in function main': /home/amirabb/Desktop/3D_line_detection/3DLineDetection-1/src/main.cpp:125: undefined reference to
LineDetection3D::LineDetection3D()'
/usr/bin/ld: /home/amirabb/Desktop/3D_line_detection/3DLineDetection-1/src/main.cpp:129: undefined reference to LineDetection3D::run(PointCloud<double>&, int, std::vector<PLANE, std::allocator<PLANE> >&, std::vector<std::vector<cv::Point3_<double>, std::allocator<cv::Point3_<double> > >, std::allocator<std::vector<cv::Point3_<double>, std::allocator<cv::Point3_<double> > > > >&, std::vector<double, std::allocator<double> >&)' /usr/bin/ld: /home/amirabb/Desktop/3D_line_detection/3DLineDetection-1/src/main.cpp:135: undefined reference to
LineDetection3D::~LineDetection3D()'
/usr/bin/ld: /home/amirabb/Desktop/3D_line_detection/3DLineDetection-1/src/main.cpp:135: undefined reference to `LineDetection3D::~LineDetection3D()'
collect2: error: ld returned 1 exit status
Build finished with error(s).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.