preface
I would like to learn more about cloud computing. After being laid off in July due to Covid and being somewhat dated in some of my skill sets, I endeavored to build a sample web app using a variety of UI frameworks. I also want to learn more about cloud computing, and thus came up with recreating a favorite board game as a target.
goals
Part of this boardgame utilizes tiles. I could simply scan the tiles and manually add the data but I would like to learn to use a new technology to do this for me. It’s a one time task, but it would be a great task for learning something new.
sample tile
As you can see this is a very simple tile and background. What I would like to learn to do using either Machine Learning, AI or cloud computing is this:
- differentiate the tile from the background
- rotate image so that tile aligned w. x/y axes
- take scanned photo and scale tile area to a set size
- remove the background
- scan edges of tile to help build data set associated w. the tile
- upload both modified image and data to respective databases
questions/concerns
I am not sure if Machine Learning or AI is overkill. One of my limitations and thus interest in the cloud computing option is that my current computer is quite dated (MBP 2008, stuck on OSX 10.11) and cannot seem to utilize things like ImageMagick or GraphicsMagick. All the Node.js solutions were browser based in order to use the GPU.
My knowledge of image processing is very small and I have been searching for things like image segmentation.
So is this possible, or is it overkill? What are some of the phrases and key words to help me search for more solutions? Thank you in advance.
Advertisement
Answer
I think what you’re trying to do can be achieved using OpenCV in Python:
Subtract the background from the image
If you take pictures of the tiles on the same background, then you can use a picture of the background as a model to subtract the background from all the tile pictures. The OpenCV website has some tutorials on how to do this in C++/Java/Python
Straighten/Deskew the image
Once you’ve extracted the tiles from the images, you’ll want to deskew them. You can again use OpenCV for this in python, as shown in this post
Local vs Cloud Computing
This really depends on how many images you’re processing and what resolution you’re working with. You might want to checkout Google Colab (free) which lets you temporarily use Google servers to run machine-learning tasks for educational/research purposes. Other solutions include using compute instances from Google Cloud/AWS/Azure but these might cost you a bit (although you can often get some free credit when you start).