HearthSim / Hearthstone-Deck-Tracker

A deck tracker and deck manager for Hearthstone on Windows
https://hsreplay.net/downloads/
4.76k stars 1.12k forks source link

Additional export/import options #130

Closed Californ1a closed 9 years ago

Californ1a commented 10 years ago

This might be slightly difficult to actually do, but it'd be sweet to be able to import decks from HS as you're creating a new deck (sort of the opposite of importing a deck from a website and then exporting to HS). Possibly also detect changes to current decks and pop-up to ask to overwrite that deck in the tracker, or save the new version as a new deck in the tracker.

It'd also be cool to export decks directly to deck sites (probably need login auth for each site), or at least export the deck to the clipboard in plaintext like this so they could be more easily imported to deck sites.

azeier commented 10 years ago

Importing from hearthstone is very much something I would like to add but it's definitely not possible the way to describe it form the hearthstone log. The only real possibility is text recognition (also see #7). And that's quite the pain to do actually :/.

Exporting to plaintext should be no problem to add however.

Californ1a commented 10 years ago

Instead of OCR text recognition via a screenshot of the decklist (difficult because of the font probably), it could be possible to correlate each individual card icon to which card that icon represents. Since each icon is a specific size, you could have the deck tracker take a screenshot of the decklist, horizontally slice the decklist screenshot every X vertical pixels so it creates a separate image for each card (saved to a temporary folder), and then have the slices compared against a bank of all possibilities (4 for each card, gold or regular versions as well as 1 or 2 of that card). I'm no programmer, so this is all theory, but it does at least sound possible.

azeier commented 10 years ago

The biggest problem with that is that the card images the tracker uses are not exactly the same as the ingame ones. Most of them are just pretty close. All of them are handcropped from the original art.

In addition to that, comparing 15-30 images to >450 takes probably quite some time. Even if you narrow it down by reading the manacost off the image that's still.. rougly 50 comparisons per cards.

So I think there's no way aorund ocr.

disshishkov commented 10 years ago

:+1: