scottworkman / deephorizon

38 stars 14 forks source link

inconsistency of parameterization in the paper and code #7

Closed XZLeo closed 1 year ago

XZLeo commented 1 year ago

Hi, Scott. Thank you for publishing the exciting work. I'm trying to reproduce the result with PyTorch.

However, I notice that in the paper you used the straight line's normal definition, ρ = x cos θ + y sin θ, where ρ should be a distance (ρ>0) and theta should be the angle between the normal and the horizontal axis. However, in bins.mat, the bins of offset can be negative. Besides, this part of the example code also indicates that ρ is signed (negative if the intercept on the vertical axis < 0) and θ is the angle the horizon line makes with the horizontal axis.

Which parameterization should I follow? Thank you!

scottworkman commented 1 year ago

We assume the origin / principal point is the image center. In this case, the orthogonal offset can be negative.

XZLeo commented 1 year ago

Ok. Then the formula in the paper should be ρ = y cos θ - x sin θ.

I thought that you followed the normal form of a straight line. Yeah, your parameterization makes more sense. Such as the offset's distribution is symmetric. Straight Line in Normal Form