Image Processing #12 - Detecting the center of text or curved line
There are times when you need information about the center line of text or curved parts of an image. I'm making a drawing robot these days. After the robot drew the picture, I needed this method to sign it. If the center line pixel location information of the signature image is grasped, the robot can naturally sign by drawing a pen while passing through these pixels. Even when developing an autonomous driving robot, in order not to deviate from the road designated by the robot, it may be possible to identify the center line of the road and move it around this line. Implementing this function in OpenCV is quite simple. opencv-contrib-python not opencv-python There is one thing to note. It is recommended to install opencv-contrib-python instead of opencv-python, which is normally installed to use OpenCV in Python. In this example, a function called cv2.ximgproc.thinning is used, but ximgproc is not supported by opencv-python. opencv-contrib-python is installed with additional module