PRBonn/lidar-bonnetal

Understanding KNN post-processing

alrzmshy opened this issue · 0 comments

Hello,
I have one question about the KNN post-processing. In line 83 of the script, we see :

# index with px, py to get ALL the pcld points
idx_list = py * W + px
unproj_unfold_k_rang = proj_unfold_k_rang[:, :, idx_list]

py is the indices of projected points in the y axis (height) and px is the indices of projected points in the x axis (width) and W is width. proj_unfold_k_rang is the im2col of projection image which is of the shape 1x49x131072 where 131072 comes from 64*2048 and 49 comes from 7 which the kernel size in the im2col process.

I don't understand why we multiply the y indices with width and then add the x indices. What is the reasoning behind the idx_list formulation?

Thanks in advance.