- Notifications
You must be signed in to change notification settings - Fork5.9k
[GSoC] Point Cloud Object Fitting#2584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:4.x
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| #include <vector> | ||
| #include <utility> | ||
| #include "opencv2/viz.hpp" | ||
| #define PLANE_MODEL 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
enums are a better choice than defines
mihaibujanca commentedNov 11, 2020
@devanshbatra04 Any update on this, please? |
| bool getSphereFromPoints(const Vec3f* &points, const std::vector<unsigned> &inliers, Point3d& center, double& radius) { | ||
| // assert that size of points is 3. | ||
| Mat temp(5,5,CV_32FC1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this should be a 4x4 Mat, with the last column set to 1
(as it is now, it has 10 uninitialized values, wrecking any determinant calculated later)
| assert(normals_cld.cols == cloud.cols); | ||
| const Point3d* points = cloud.ptr<Point3d>(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this must be Point3f (the point cloud is in float format, not double)
| double magnitude_abc = sqrt(ModelCoefficients[0]*ModelCoefficients[0] + ModelCoefficients[1]* ModelCoefficients[1] + ModelCoefficients[2] * ModelCoefficients[2]); | ||
| assert (magnitude_abc == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
for sure you want != 0 here
| return result; | ||
| } | ||
| viz::WCylinder SACCylinderModel::WindowWidget () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
probably, we should outsource any drawing functionality to the samples.
having a dependancy of thelibrary code to the viz module (which again depends on vtk) is some major bummer, this could/should be made optional
| break; | ||
| } | ||
| vector<unsigned> latest_model_inliers = inliers.back(); | ||
| num_segmented_points += latest_model_inliers.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
bail out, ifnum_segmented_points==0 ?
(since the rng is reseeded insidefit_once() it cannot do anything different, if the labels array wasn't changed, leading to an infinite loop)
| } | ||
| if (model_type == CYLINDER_MODEL) { | ||
| assert(this->normals_available == true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
so, currently, normals are not optional here.
maybe we can add another method for adding a hypothesis based on 3 points (2 points parallel to the axis, just on the outer hull, and a 3rd, somewhat opposite) ?
generating normals from 12 (!) knn neighbours only seems to work nicely for very dense clouds, but not for sparse, synthetic or sfm generated clouds
mihaibujanca commentedJan 12, 2021
Hi,@devanshbatra04 it's been quite some time without an update. Can you please refactor the code as suggested so we can merge the PR? |
berak commentedFeb 23, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
would there be a way to work on this (and still keep the original commits /@devanshbatra04 as author) ? i think i gotsome improvements |
WanliZhong commentedMar 18, 2021
Hi, we notice that you are improving the object detection feature. Our group hopes to complete the feature. What do you think we can do for this feature? Thank you. |
berak commentedMar 18, 2021
if it is aboutthe gsoc idea, |
WanliZhong commentedMar 19, 2021
We really don't know that this project has been listed as GSoC project again. We will try to apply. Thank you. |
asenyaev commentedApr 9, 2021
jenkins cn please retry a build |
JoeHowse commentedOct 12, 2022
Is this pull request superseded byopencv/opencv#21276 ? |
Uh oh!
There was an error while loading.Please reload this page.
This PR would contain the work done towards the GSoC 2020 project on Point Cloud object fitting.
This is a test to see whether the PR builds. I will continue adding changes.
cc:@mihaibujanca
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.