I'll get to this topic in one of my posts. Using Hough transform which is designed to detect lines or other shapes. Cool stuff! I have to check out what posts you generate. In fact, there is a lot to check out. Much has changed in these past years, don't even know where to start
RE: Science meets Photography: Enhancing Image Brightness with Python and NumPy - A Deep Dive