Nowadays, indoor visible light positioning (VLP) is one of the hottest technologies in the field of positioning; as a result, a number of algorithms for VLP have been proposed. However, unfortunately, few algorithms can be applied to the case that the receiver is tilted. In order to solve this problem, we developed a three-dimensional indoor VLP algorithm which can work effectively and accurately when the lens is tilted. When the lens is far away from the LED, the image of the LED is approximately regarded as an ellipse, and the distance between the two is obtained through the geometric relationship, and we finally achieve the positioning of the camera by the triangulation algorithm. The quantitative results show an average error of 6.74 cm when the tilt angle is estimated to be within 30°. At the same time, we propose an ID allocation scheme, which can effectively reduce the demand for ID.