I want to be able to load a “background image” onto the canvas – put some markers outside the cutting surface and have OpenCV match the markers and get coordinates so that I can paint the picture onto the canvas.
I figure that would be a good way to be able to “load in any scrap”, take a pic from your cell phone, and see where to put the new part so it can be cut without running into old cuts (less guesstimation of the origin).
I’m going to try it first with some reflectors to see if I can get “conventional” OpenCV to work… if not, I think I can use the SIFT to match images at the corners, but the SIFT stuff is patented with a license to use in “research settings”…
@madgrizzle is right that one of the beautiful things about Git is that you can do absolutely anything on your own fork of the software without worrying about messing up the main version
Here are the steps I would go through.
Make an issue describing the behavior you want to add (I think there actually already might be one) over at https://github.com/MaslowCNC/GroundControl/issues . Creating an issue will give use a place to talk about what the right and easiest way to make the changes is. You can add tags like “bug” or “enhancement” or “help wanted” to sort the issue, and you can assign it to yourself to make it clear that you are going to explore it
Look into kivy because it already has some pretty powerful image processing stuff built in that I think will make what you are trying to do not crazy difficult. Kivy is a little bit confusing at first, but it works really well especially across platforms. Check out https://kivy.org/docs/api-kivy.uix.image.html
Make a pull request to make your changes part of Ground Control!
Once you’ve made an issue feel free to ask any and all questions. The more people who understand the structure of Ground Control the better!
Don’t get me wrong, I love the enthusiasm to do a project like that! Please take it on.
The way I solve it is to have a sheet of ply loaded scaled as a background in my CAD with X0/Y0 centred. I position the parts on the sheet and save the CAD. For new parts I load the same file and position the new parts on free spaces and create the gcode and save again. If you have several , you need to name the plywood sheets similar to the CAD files.
Ok, I’ve made a prototype that kinda works (as in… if your machine is exactly like mine and if you shot the picture at night with a Canon T3i…, it won’t explode). Next step:
I think it would go best on a button on the main canvas [Actions][Settings][Background]… but I don’t know how those link back to code – can someone point me to the right direction for how the “Actions” button calls up the “Actions” popup (I saw how the View Menu worked inside the Actions Popup, but I’m not sure how the View Menu knows what it’s supposed to be bolted to)?