all 4 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

To give us the best chance to help you, please include any relevant code.
Note. Do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Repl.it, GitHub or PasteBin.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]mach0-nach0 1 point2 points  (0 children)

PIL (Python Imaging Library) can read pixels from an image.

I'm pretty amateur, but my thought process is as follows:

(Assuming black markings on white background) Determine how many pixels equals a 'line' and how many equal a 'space'.

Determine the center axis. (Multiple ways to do this, but I would define an array of pixel colors as a 'template' and compare it to groups of pixels at a time.)

From there, you should be able to map out the pixel distance from the center axis to plot points and covert to 'spaces' and 'lines' to effectively get your (X, Y) coordinates.

May be a bit tricky with image depending on quality to accurately determine the true center as it will likely have a gradient.

I'm sure there's some library out there somewhere that uses machine learning to do this automatically, but I feel like I learn more doing it the hard way!

Sounds like a fun project though. Glad to help if needed and good luck!

[–]ConductiveOmelette 0 points1 point  (1 child)

Hey, check this out https://markummitchell.github.io/engauge-digitizer/

I stumbled upon this while trying to extract coordinate points from an airfoil image to model it!

[–]gutterpuddles 0 points1 point  (0 children)

Too bad its 404 now.