Camera-based Optical Camera Communication (OCC) technology is an important application of Visible Light Communication (VLC). It inherits the advantages of VLC, such as low cost, no electromagnetic interference, and environmental friendliness. Simultaneously, the optical images in OCC technology provide a wealth of location information, so combined with image processing technology, it's widely used in the positioning field. However, long-distance OCC requires the use of lenses to ensure signal transmission rates, which brings about image distortion issues, affecting the positioning accuracy. This paper introduces an OCC and positioning framework, and a new image distortion correction method was applied to the images, achieving centimeter-level positioning. To verify the optimization effect of the image distortion correction algorithm on positioning accuracy, we selected 475 test points for the experiment, and the results show that the average positioning error decreased by 11.30%.