A collectors dream application, that gives you the ability to take pictures of your cards and have them instantly be recognized and added to your collection. This app will scan each image uploaded attempt to grab the name of the card and analyze the set image in an attempt to match it with a given set.
Here is a test extraction:
Extracted Text: g Platinum Angel
Cleaned Extracted Text: gPlatinumAngel
Extracted Text: E Artifact Creature —- Angel
Cleaned Extracted Text: EArtifactCreatureAngel
More examples are available here
Clone repo
git clone https://github.com/dills122/MTG-Card-Analyzer.git
Install dependencies
npm i
Navigate to the repo's directory, you will need to setup a few things first
node .\src\db-local\bulk-insert.js
secure.config.js
with your mySql credentials (Schema below)src\data\scripts\sql
, run all the table create scriptsA template is avaliable here
rds: {
host: '...',
database: '...',
user: '...',
password: '...'
}
Once all of the setup is complete to run your first image through the processor you can use one of the test images or use the given command below.
# Run at the base directory of the repo
node index.js scan ./src/test-images/PlatinumAngel.jpg
# Might need to run as sudo on linux
scan <filePath>
: this command scans a single image and outputs the results to the terminal
query
or q
: for disabling database manipulation (default true
)file
or f
: for processing an output file (default false
)Test images are provided at src\test-images
Backfiller utility instructions found here
fuzzyset.js
image-hash
jimp
string-similarity
tesseract.js