0

I kinda wanna work on something for personal interest but I've hit a bit of a brick wall on the theory aspect due to lack of experience and would appreciate any help with it.

(I marked the main questions with 1) and 2) since it got a bit messy writing this, I apologize for that)

Here's what I want to do:

  • Load up a screenshot from a phone game inventory, which will have multiple items in squares and below it a count of how many you own.
  • Divide all of the items into smaller images, compare those images with item images on my PC and if it matches, add the count of the item into a container with the item name.

So the end result would be logging the inventory I have in the game, into a file on my pc which I can then use from then on..

I've had a basic course in coding before so I think I can do the value comparison, loop to compare the processed smaller images and then saving it etc.

What I'm stumped on however is the initial process of loading up the image, then cutting that image up into multiple smaller ones based on rectangles and then comparing those smaller ones with images I prepared beforehand of the same items..

  1. ) Not so much on the process itself but moreso on what tools could I use? What Libraries, already existing functions etc that could help with that?

I would appreciate any hints towards stuff that could be used for this. If it helps I have some familiarity with Java, JS, C and Python.. though I'm not really opposed to picking up something new if it would help me here

So the process, in my head would look something akin to: Add screenshot -> run function to cut up image into smaller images based on rectangles (top left to bottom right) -> save smaller images to something like an array -> via loop compare array of cut up items with array of item images on pc -> if match, add it into an exportable list along with its Name and Count which I want to do some processing with later..

(process on the side, via OCR presumably? Add all the item count numbers into an array too which will then be fed into the final list at the end of it to the corresponding item)

  1. ) Would this be feasible? Would precision of image comparison be a problem when doing this?

(maybe its my way of googling but results that came up seemed to be more about just full image comparison rather than dividing one image into multiple and then comparing those smaller ones..)

  • Cutting the images into cells and recognize the item: you could do this in a more traditional way, without AI, using the OpenCV library, or do this with Object Detection AI algorithms. OCR: you culd run the pytesseract OCR library for Python on the cells once they have been cut. – Francesco Pettini Dec 05 '22 at 11:09

0 Answers0