Hi, I need to create an app that transforms texts into GCodes. Example:
Can someone help me?
Thank you
Can someone help me?
Thank you
Not sure if I'm arriving too late to this thread.
Anyway, I've been playing a bit using OpenCV and findContours, in order to face the 'first part' of the problem: from a given 'drawn' text, find each one of the N closed paths as lists of coordinates (The string has been drawn on a bitmap and this bitmap processed with OpenCV)
The code doesn't face the second part (conversion from paths to GCode), but it should be the easy part
See attached code.
I see. It is not a bad approach at all to implement a path follower, specially if you already have it done or nearly done. However, I have some commentswhat do you think??
I see. It is not a bad approach at all to implement a path follower, specially if you already have it done or nearly done. However, I have some comments
- If I understood correctly, the points that you get are already ordered (at least for each path) since you are discovering them one after the other by exploring the neighbours, right?
- You can decrease the list size if 3 or more consecutive points have the same X or same Y, but that won't help for those points in a non-horizontal nor non-vertical line. However, this is not an issue if the final weight (number of points) isn't too large.
- Does the algorithm work well with different paths? (I mean different letters or letters with more than one path, for instance "A" or "4") --> from your post it seems that yes...
So my opinion is that if you already have the "path detector" working, then it is ok, but if not you can save a lot of work and use the OpenCV code. Its implementation is optimized for speed and accuracy.
No need for conversion, just send the string and append to it ascii characters #13#10 (CRLF) and send it to your serial portHi, I need to create an app that transforms texts into GCodes. Example: View attachment 70393
Can someone help me?
Thank you