-
Notifications
You must be signed in to change notification settings - Fork 5.8k
ICP Docs #2964
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICP Docs #2964
Conversation
Why is this documentation added to the rgbd module? I can see that ICP algorithm is implemented in the surface_matching module: https://docs.opencv.org/master/dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html I propose extracting this section to separate page and referring it in the rgbd and ICP descriptions. In order to do it you have to add a page to the |
modules/rgbd/doc/kinfu_icp.markdown
Outdated
The Iterative closest point (ICP) function minimizes the PointToPlane Distance (PPD) between the corresponding points in two clouds of points and normals. | ||
Specifically, it is the distance from the point ***P*** to the plane with the normal ***N*** in which the point ***Q*** located | ||
|
||
The main equetion, which it needs to minimize: |
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.
*equation
Need to add the notion about projective correspondence:
"Two points P and Q are considered correspondent if given current camera pose they are projected in the same pixel"
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.
*which needs to be minimized
modules/rgbd/doc/kinfu_icp.markdown
Outdated
|
||
***q*** - i'th point in the old cloud of points | ||
|
||
***n*** - i'th normal in the old cloud of normals |
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.
*i'th normal in the point Q in the old point cloud
modules/rgbd/doc/kinfu_icp.markdown
Outdated
|
||
***ppd(...)***- is the distance ergo its formula is the dot product of (difference between ***p*** and ***q***) and (***n***): | ||
|
||
<img src="https://render.githubusercontent.com/render/math?math=dot(T_{p2q}(p)-q, n)=dot((R\cdot p+t)-q,n)=[(R\cdot p+t)-q]^{T}\cdot n"> |
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.
plus sign is not rendered here
modules/rgbd/doc/kinfu_icp.markdown
Outdated
Where ***R*** - rotation, ***t*** - translation. | ||
|
||
We use the Gauss-Newton method for the minimization of function. | ||
In the beginning, we will perform some mathematical operations: |
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.
It's better to say something like "Here's a formula we're going to minimize by changing R and t:"
modules/rgbd/doc/kinfu_icp.markdown
Outdated
|
||
***n*** - i'th normal in the old cloud of normals | ||
|
||
***ppd(...)***- is the distance ergo its formula is the dot product of (difference between ***p*** and ***q***) and (***n***): |
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.
*is the point-to-plane distance ergo ...
In the beginning, we will perform some mathematical operations: | ||
|
||
<img src="https://render.githubusercontent.com/render/math?math=E=\sum\left\|[(R\cdot p %2B t)-q]^{T}\cdot n\right\|_{2}"> | ||
|
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.
It's better to add something like this:
In Gauss-Newton method we do sequential steps by changing R and t in the direction of the function E decrease, i.e. in the direction of its gradient:
- At each step we approximate the function E linearly as its current value plus Jacobian matrix multiplied by delta x which is concatenated delta R and delta t vectors.
- We find delta R and delta t by solving the equation E_approx(delta_x) = 0
- We apply delta R and delta t to current Rt transform and proceed to next iteration
To linearize E, let's approximate it in infinitesimal neighborhood.
modules/rgbd/doc/kinfu_icp.markdown
Outdated
|
||
<img src="https://render.githubusercontent.com/render/math?math=E = \sum \left \| [f(x, p) %2B p- q]^{T} \cdot n \right \|_{2}"> | ||
|
||
Let's find out differential of ***E***: |
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.
*E is mininal when its differential is zero:
Pull Request Readiness Checklist
Add info about ICP algorithm in RGBD
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.