Skip to content
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

Problem with code #24

Open
hello299 opened this issue Oct 15, 2024 · 1 comment
Open

Problem with code #24

hello299 opened this issue Oct 15, 2024 · 1 comment

Comments

@hello299
Copy link

2024-10-15 20-33-13 的屏幕截图
Hi,I don't know the purpose of this code segment,i know u_k and v_k is the image coordinate of the points,but i don't know what is the start_idx for and the why the offset is the proj_idx +1 。
Could you give me some advice? thank you!

@patripfr
Copy link
Collaborator

patripfr commented Oct 16, 2024

Hi,
In this part of the code, I create the projection map of the undistorted point cloud (see section III G in the paper).
For the undistorted point cloud, multiple points can project into the same pixel. Therefore, we first store all of them, such that we can later select the one with the shortest range, which happens here.

For each pixel we store a maximum of DUPLICATE_POINTS-1 points, such that we can use a predefined size for vector frame.proj_idx .
The structure of this vector is as follows: [offset, i_1, i_2, ... , i_9], where offset stores how many points were already projected in this pixel, and i_i stores the index of the i-th point that was projected in this pixel.
vectorIndexFromRowCol(v_k, u_k) gives the index in frame.proj_idx where the entries for pixel (v_k, u_k) start.
size_t offset = frame.proj_idx[start_idx] + 1; is because we have to increment the start_idx by one since we are adding a point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants