I have a single word in jpg. I would like to extract pixel coordinates of the word perimeter to a list. Is that any algorithm or formula to do so?