-3

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

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.

jusopi
  • 6,791
  • 2
  • 33
  • 44

1 Answers1

1

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).

Aziz Sonawalla
  • 2,482
  • 1
  • 5
  • 6
  • I will try installing OpenCV again. It had issues the last time because I didn't have the right version of XCode installed. Is this something that would be done over the cloud, installing it on a cloud machine? – jusopi Oct 09 '20 at 17:23
  • I haven't tried it on Google Colab, but if you use a cloud computing service that lets you deploy your own docker container, then you can build your environment and add all the dependencies exactly how you want it, and just upload the container to the server – Aziz Sonawalla Oct 09 '20 at 18:56
  • after your first answer, I did a quick look to see if I could do that in the cloud. I found what looks like a great solution using Docker to deploy to AWS using their Lamda functions and layers. Unfortunately, my computer is too old to use Docker as it lacks the Hypervisor technology for VMs. It's pre 2008 – jusopi Oct 09 '20 at 18:59
  • Could you use something like an EC2 to build the docker image and then deploy it to Lambda? – Aziz Sonawalla Oct 09 '20 at 19:27
  • That's a good idea to look into. I haven't a clue if it's possible. I will report back when I know more. Thank you for the suggestion – jusopi Oct 12 '20 at 18:43
  • I was able to build w. docker doing exactly as you suggested. Thanks for the hint. here is the project I am working with https://github.com/iandow/opencv_aws_lambda – jusopi Oct 16 '20 at 16:42