hbb1 / diff-surfel-rasterization

A differentiable rasterizer used in the project "2D Gaussian Splatting"
https://github.com/hbb1/2d-gaussian-splatting
Other
108 stars 32 forks source link

Please explain compute_aabb #8

Closed lxndrrss closed 4 months ago

lxndrrss commented 4 months ago

Hi, thank you for providing the code and for your great paper! Could you please explain the compute_aabb function to me? https://github.com/hbb1/diff-surfel-rasterization/blob/a97d67aed599ab99dad4ecbe1dc5751bf4f16562/cuda_rasterizer/forward.cu#L122-L148 I can't quite understand how it is derived.

CanCanZeng commented 4 months ago

I can't understand this part either. If you understand, please let me know. Thank you @AlexRoss-WHS

hbb1 commented 4 months ago

image

CanCanZeng commented 4 months ago

Thank you for answering my question perfectly @hbb1

lxndrrss commented 4 months ago

Thank you @hbb1 for taking the time for such a detailed answer! Now that I understand the code and maths I think there are two small typos in your answer:

  1. It sould be $b = -2 * \text{sum}(f T_0 T_3)$
  2. and ${x_1 + x_2 \over 2} ={ -b \over 2 a}$
hbb1 commented 3 months ago

Hi, everyone. @CanCanZeng @AlexRoss-WHS @FantasticOven2 In case you are not aware of it, there is a bug in the current AABB computation. We should directly calculate 3 sigma AABB in the object space instead of calculating 1 sigma AABB and multiplying it with 3 in the screen space. The reason is here #15

xingcheng1061 commented 3 weeks ago

image

作者您好,论文中提到公式X=(xz,yz,z,z)^T = WP(u,v) = WH(u,v,1,1)^T,按照二维高斯的uv坐标系定义,高斯中心的uv坐标应为(0,0),为何不直接将u=0,v=0代入该公式中解出x和y呢?