I am a computer science student I am trying to find a way to distinguish the shape between lines in a program I am developing. For example, in the image below the connected pixels represent lines. The two colours, white and yellow, are used in this example to depict which lines need to be considered as straight lines and which as curves. After making this distinction, the "curved lines" will be erased. Can anyone help me in archiving this?