  Leveraging line features to improve localization accuracy of point-based
visual-inertial SLAM (VINS) is gaining interest as they provide additional
constraints on scene structure. However, real-time performance when
incorporating line features in VINS has not been addressed. This paper presents
PL-VINS, a real-time optimization-based monocular VINS method with point and
line features, developed based on the state-of-the-art point-based VINS-Mono
\cite{vins}. We observe that current works use the LSD \cite{lsd} algorithm to
extract line features; however, LSD is designed for scene shape representation
instead of the pose estimation problem, which becomes the bottleneck for the
real-time performance due to its high computational cost. In this paper, a
modified LSD algorithm is presented by studying a hidden parameter tuning and
length rejection strategy. The modified LSD can run at least three times as
fast as LSD. Further, by representing space lines with the Pl\"{u}cker
coordinates, the residual error in line estimation is modeled in terms of the
point-to-line distance, which is then minimized by iteratively updating the
minimum four-parameter orthonormal representation of the Pl\"{u}cker
coordinates. Experiments in a public benchmark dataset show that the
localization error of our method is 12-16\% less than that of VINS-Mono at the
same pose update frequency. %For the benefit of the community, The source code
of our method is available at: https://github.com/cnqiangfu/PL-VINS.
