DeyvidKochanov-TomTom / kprnet

MIT License
65 stars 12 forks source link

how to understand the do_range_projection? #16

Open LeopoldACC opened 2 years ago

LeopoldACC commented 2 years ago

hi, @DeyvidKochanov-TomTom ,thanks for your work,but i'm confused by the code

    yaw = -np.arctan2(scan_y, -scan_x)
    proj_x = 0.5 * (yaw / np.pi + 1.0)  # in [0.0, 1.0]

    new_raw = np.nonzero((proj_x[1:] < 0.2) * (proj_x[:-1] > 0.8))[0] + 1
    proj_y = np.zeros_like(proj_x)
    proj_y[new_raw] = 1
    proj_y = np.cumsum(proj_y)
    # scale to image size using angular resolution
    proj_x = proj_x * W - 0.001
DeyvidKochanov-TomTom commented 2 years ago

Hi, I did try to explain it in more details in this issue. I hope this helps.

LeopoldACC commented 2 years ago

Hi, I did try to explain it in more details in this issue. I hope this helps.

thanks for your answer,I got the process of compute py.But why not use the arctan(y,z) to compute py? Is the reason that we need a const mapping upper bound and lower bound to map the value of y into [-1,1]->[0,1]->[0,h]? If I add some noise on the point cloud to do data augmentation,the method of decide whether to py+1 by judge d(arctan(y[i+1],x[i+1])-arctan(y[i],x[i])) is over threshold may result in the max value of cumsum(py) over the upperbound 73.

DeyvidKochanov-TomTom commented 2 years ago

I guess you mean you could use the spherical projection like e.g. rangenet? The KprNet uses a variant of the Unfolding projection explained in this paper, but if you want to do more augmentation you could switch back to spherical one.

LeopoldACC commented 2 years ago

I guess you mean you could use the spherical projection like e.g. rangenet? The KprNet uses a variant of the Unfolding projection explained in this paper, but if you want to do more augmentation you could switch back to spherical one.

Thanks a lot for your advices!