Discussion Has any one experimented with OCR tools for scraping the commodities market prices?

wolverine2710

Tutorial & Guide Writer
wont we get ingame tools to master the market?
You might have missed my request in the OP.
The purpose of this thread is to solely discuss the technical site of OCR. Hence I can't and won't discuss or answer your question.
I sincerely hope you can respect that.
 
Last edited:
I've knocked up an OCR app that could run in the background, then scrape the commodities market when it sees the data. Early days, but after launch, if there isn't some kind of memory for your ship to remember markets youve been to, then this needs developing I think. This would remove the need for screenshots. You could just play and just at every station remember to scroll through all commodities. Even without that, it would grab what it could see. Incomplete DB is better than nothing.

View attachment 1315
 
Last edited:
I've knocked up an OCR app that could run in the background, then scrape the commodities market when it sees the data. Early days, but after launch, if there isn't some kind of memory for your ship to remember markets youve been to, then this needs developing I think. This would remove the need for screenshots. You could just play and just at every station remember to scroll through all commodities. Even without that, it would grab what it could see. Incomplete DB is better than nothing.
Agreed, and even if this was single-player, that is, just scraped for the local player, so much better than pen and paper.
 

wolverine2710

Tutorial & Guide Writer
I've knocked up an OCR app that could run in the background, then scrape the commodities market when it sees the data. Early days, but after launch, if there isn't some kind of memory for your ship to remember markets youve been to, then this needs developing I think. This would remove the need for screenshots. You could just play and just at every station remember to scroll through all commodities. Even without that, it would grab what it could see. Incomplete DB is better than nothing.

View attachment 1315

I´m having a hard time keeping up with my threads so please accept my apologize for the late response. Sound very very nice indeed. A question: I´ve watched the screenhot and I´m not sure how your tool actually works As in I see some kind of overlay over the commodities market screen.

Note: OCR-ing would be a superb source for EDDN. See the thread "EDDN - Elite Dangerous Data Network. Trading tools sharing info in an unified way". Note. Its not need for an OCR tool/solution to make a client so it can upload data to EDDN would be nice though. That could be done others. But first we need a good OCR solution ;-)
 
The idea would be to play with the app in the background looking for the commodities screen. When our finds one it takes the data. No interaction by the player needed beyond remembering to scroll through the commodities to get them all. I think taking screenshots will be a major pain and break us out of the game.

All this is presuming there are no market tools in the game on release.
 
These tools affect the game for everyone that plays, whether they use the tools or not, even solo players share the same market data as "online" players; use of your tool affects market availability, profit, and loss. FD have asked that you not do this, even going as far to make it against the TOS, yet you continue to argue semantics and look for loopholes to work around.

Why not do the decent thing and just drop the damn project as asked, and allow the game to be played the way the developers intended.
 
The idea would be to play with the app in the background looking for the commodities screen. When our finds one it takes the data. No interaction by the player needed beyond remembering to scroll through the commodities to get them all. I think taking screenshots will be a major pain and break us out of the game.

All this is presuming there are no market tools in the game on release.

Sounds great to me. How fast is this?
I have still the problem that I need a way to gather Data with Oculus Rift. So the picture is distorted and moving all the time and low res.
What dou you think. Would it be fesable to put something before your tool that graps and undistorts and accumulate some pictures and compiles it in one nice picture for you as input?

Same question to Galile0

for previous poster check:
#154
 
These tools affect the game for everyone that plays, whether they use the tools or not, even solo players share the same market data as "online" players; use of your tool affects market availability, profit, and loss. FD have asked that you not do this, even going as far to make it against the TOS, yet you continue to argue semantics and look for loopholes to work around.

Why not do the decent thing and just drop the damn project as asked, and allow the game to be played the way the developers intended.

Actually you're a little incorrect there. FDev asked us not to hook into the game to gather data is it was causing issues. They're not against us gathering data, we're just not allowed to hook into the game to do so.
 

wolverine2710

Tutorial & Guide Writer
These tools affect the game for everyone that plays, whether they use the tools or not, even solo players share the same market data as "online" players; use of your tool affects market availability, profit, and loss. FD have asked that you not do this, even going as far to make it against the TOS, yet you continue to argue semantics and look for loopholes to work around.

Why not do the decent thing and just drop the damn project as asked, and allow the game to be played the way the developers intended.

I would like to respond politely to your post but I can´t. Reason for this is my OP which you seem to have missed. When posting and stating things it would be nice you have read all info. I will post a part of the OP here beneath. Please keep this thread ON topic and use the mentioned threads for your comments. I would be happy to discuss it further there.

From th OP
To clear this up I send a PM on the 11th of November 2014 to Michael Brookes. I asked for permission to share his response and was given permission.
Hello Mr Brookes,

I have created the "Has any one experimented with OCR tools for scraping the commodities" thread. Basically a commander takes a screenshot, which is automatically read by an OCR tool which then creates a text file with commodities market prices. This can be used for for example trading tool purposes. For example feeding the text to Trade Dangerous program or Slopeys the BPC. Both are based upon manually inputting of data. Lets make this totally absolutely 100% clear. The end goal will be an EDDN - Elite Dangerous Data Network. Basically Andreas EMDN but filled with data obtained from OCR-ing. NOT by scraping the ED program/protocols. Also when OCR-ing is successful it will most likely be extended to retrieve more information.

When FD's data access policy changed you wrote: "We're no longer allowing tools which scrape the data directly from the game or through its communications. We will be considering an external API for future development, but for now these tools are not permitted."

A commander stated he has a (near) working OCR solution. He is reluctant to release it because he's not sure it would violate the new FD data access policy. There are two possibilities.

  1. OCR does violate FD's new data access policy.
  2. OCR does NOT violate FD's new data access policy.
I hope you can give me a response back which states which of the two is true. That way I can communicate it back to the author and the tread in which the question was raised.

With kind regards,
Jan Bessels aka Wolverine2710 aka cmdr Wolverine
His response:
Michael Brookes said:
As long as the method doesn't alter or access the exe or the game resources then it is fine. So OCR isn't an issue for us, although trying to read the frame buffer directly could be.
Please do NOT turn this into another pro vs contra third party (trading) tools thread. Those discussions for me are the equivalent of the trenches war of WWI. Nobody makes progress. If you want to discuss it, the perfect place is "Direct question for Michael Brookes". .
I hope and trust you respect my wishes.


I could have included the following in the OP but I can´t find the quotes back so I won´t. Iirc Michael has posted/said the decision for the changed data policy had nothing to do with the trading tools and they are not against data sharing, see OCR question/response above.
 
Last edited:
Given there is software that can automatically take screenshots at intervals (Fraps, others), it seems likely you could do it a few ways; either take screenshots automatically at regular intervals and have the software watch that directory for new files, or manually take shots and watch the default screenshot directory or an arbitrary directory for new files.

Then,
-analyze those screenshots for the commodities interface layout, and OCR just those. Once analyzed, delete the old ones.

Optionally, you could watch the log file that the BPC uses (the client log) for the last/current system name, and separate OCR'd market data based on that information.

Optionally, it could all be done after the fact, based on log timestamps and file timestamps.
The netlog (in /Frontier/EDLaunch/Products/FORC-FDEV-D-1002/Logs) format is easy to parse/pattern match/watch:
Code:
{08:48:22} System:86(LHS 2661)
{08:55:57} System:29(Tau Bootis)
{18:41:32} System:4(CR Draco)
{18:51:13} System:21(Theta Draconis)
{19:37:03} SCREENSHOT: Saved \ED_Pictures\Screenshot_0038.bmp , w:1440, h:900, pitch:5888, sourceFormat:B8G8R8A8un_In8
{19:37:06} SCREENSHOT: Saved \ED_Pictures\Screenshot_0039.bmp , w:1440, h:900, pitch:5888, sourceFormat:B8G8R8A8un_In8
{20:34:19} System:0(Hagalaz)
...

I guess it just comes down to whether or not you want the app to try to detect the commodities interface and/or make a decision regarding screenshot type/content, or presume all screenshots from a tool (or the default) are commodity screens.
 
Last edited:
Any OCR tool isn't going to work with the oculus rift, the distortion is too extreme. I think an auto OCR tool for trading is needed, or a trusted user system for bpc tool to avoid poisoning of data.
 
Frontier told and showed how you can set up a second screen/window next to the Oculus Rift one that displays the ED picture in 2D. So the idea would be to use that one to grab.
However as more as I think about as more I think that this whole solution at least in case of Oculus Rift would just do what Frontier wanted to avoid: Heavy influence on the Game performance because it woudl drag all calculation resource.
If we consider that the ppl playign with Oculus Rift will most likely increase in the future which would increase teh problem with such a solution and by reading the latest newsletter that the offline mode is gone.. this all leads to only one good solution for me. Frontier frobid it so I won't name it but its a no brainer. I guess for me private I will try that way.
 
Hey, I have a working OCR solution. Grabs line by line. Needs some work to automate grabbing everything, but ultimately the actual OCR is done with very high accuracy with character, after training with 3 examples, then realizing it's a standard font :)

PM for details, I have a few questions for you as well :)
 
Well, I finally got something to add to the OCR ideas....

I know wolverine2710 is working on it, Slopey and Thrudd both have very useful applications and using them takes quite a lot of effort on behalf of those who use the tools.

I can't program or help improve them, but I am more than willing to help with ideas.

Here is a good one, Greenshot w/ OCR plugin. And here is an example...
I highlight this: http://i.imgur.com/ysw3aCV.png either from a screenshot or during an active game session and choose OCR. It puts this into the clipboard:

CHEMICALS
EXPLOSIVES 175 187
HYDROGEN FUEL 100 102
MINERAL OIL 253
CONSUMER ITEMS
CLOTHING 194 207
CONSUMER TECHNOLOGY 7,331
0DM. APPUANCES j 721
FOODS
ALGAE 237
r ANIMAL MEAT 1,458
COFFEE 1,458
FISH 908
FOOD CARTRIDGES 37 47
FRUIT AND VEGETABLES 390
GRAIN 325
r
SYNTHETIC MEAT 377
TEA _______________ -_______ 1,831

Another section on the page:
http://i.imgur.com/IkynYOp.png

METALS
ALUMINIUM 202 212
BERYLLIUM 8,321
COBALT 524 538
COPPER 319 333
GALLIUM 4,736 4,791
GOLD 8,837 8,852
INDIUM 5,349 5,410
LITHIUM 1,305 1 322
j PALLADIUM 13,552
PLATINUM 18,851
SILVER 4,334 4,3651
TANTALUM 3,476 3,517
TITANIUM 791 812
URANIUM 2,765

All we need is a front end to look at this data, verify data has been pulled and then add it somewhere for uploading.

Go here... http://getgreenshot.org/faq/how-can-...nshot-for-ocr/

A little logic in a small app could make this a much easier method to enter data.

This would only take a couple of minutes per section AND greenshot can be called by an outside application from what I understand.

Hope this is a useful Idea...
 
Would it not simpler to petition FD to write marked data currently viewed by player into an XML file of sorts?
I suspect that an OCR solution, given it can be done immediately, will be completed sooner than waiting on FDEV for anything. I have zero confidence, given the current feature set, that XML/JSON/any kind of mod/automation interface are even on their radar for 2014.

Go go OCR! :) (if that's the only path forward, take that path!)
 
Earlier today, I posted about a project that I've been working on, that could benefit from some OCR love. The goal of my tool is not to create a large database of commodity data, it's just to make it easier for me to keep personal notes about commodity prices, supply and demand.

https://forums.frontier.co.uk/showthread.php?t=68204
https://github.com/cowboy/ed-trade-helper

zxctypo, can you share what you've done to pre-process the images to facilitate OCR? I've been having really poor success due to the extremely low DPI / font size of the screengrabs.
 
Top Bottom