Abandoned [RELEASE] Trade Computer Extension

Status
Thread Closed: Not open for further replies.
This is so cool! I'm not a techie though so i'm afraid i'm going to break something lol! I'd love Frontier to open up this kind of modding as their in-game tools are not up to scratch at the moment.
 
The calibration told you, you were almost 100% accurate not the training. But it cannot guarantee you anything. If you really spent 20 min on training it, you wouldn't have the problem. The new version of EliteOCR is not worse. It's more flexible but this requires the user to make some effort. Invest few minutes in training and you will really get 99.999% accuracy.

Oups, I had missed a step !
Was wondering what that windows was, but it went away on next so I forgot about it lol

Now I see why you kept talking about 15 to 20 min !
I already had 99.999% accuracy with the old version without this lol
but the increase speed is nice and hopefully it helps other people who didn't get the it !

Too bad this training could not have been done in the main EliteOcr interface.
It's more readable when you can see the hole line.

And a warning when someone presses next without actually having gone through the process of checking all the letters and numbers one by one, would have been nice !

I'm Doing it properly now so, hopefully, this will solve the problem !

Thanks
 
Last edited:
Done training and getting the same results, see edit of my previous post
No sorry... You did not really train it. You only used the preset data to train, you did not add any of your own data... In the learning wizard in the second screen you have to add some screenshots, click on OCR and then check every single field before continuing. It does not magically get data for training. It has only some base data.

Note: On the last screen there is "You collected following new images". And you have none listed there. Ergo you did not train EliteOCR.
 
Last edited:
No sorry... You did not really train it. You only used the preset data to train, you did not add any of your own data... In the learning wizard in the second screen you have to add some screenshots, click on OCR and then check every single field before continuing. It does not magically get data for training. It has only some base data.

Note: On the last screen there is "You collected following new images". And you have none listed there. Ergo you did not train EliteOCR.

Yeah I get that now but trying to train it properly I get :

Training 2 in a box.jpgTraining Shifted.jpg

and then :

2015-05-02 22:31:40,670 CRITICAL:
File "C:\Users\SEBAST~1\Desktop\RFACTO~3\build\EliteOCR\out00-PYZ.pyz\learningwizard", line 182, in saveImgData


<type 'exceptions.IndexError'>: list index out of range



Trying again lol That is going to end up being a lot more the 20 minutes !
 
Yeah I get that now but trying to train it properly I get :


and then :

2015-05-02 22:31:40,670 CRITICAL:
File "C:\Users\SEBAST~1\Desktop\RFACTO~3\build\EliteOCR\out00-PYZ.pyz\learningwizard", line 182, in saveImgData


<type 'exceptions.IndexError'>: list index out of range



Trying again lol That is going to end up being a lot more the 20 minutes !
I'm obviously still working on making it more stable. Until then use a different image where this is not happening.
 
I'm obviously still working on making it more stable. Until then use a different image where this is not happening.

Yeah I figured that out :) Training in progress !

You are the author of EliteOCR ?

If so, Great Job !!!!
I didn't realize, sorry.
We each have only so much time to play
and I spend a good part of it here,
so I don't monitor the other threads much.

Respect, kudos and rep to you !
Thank you for a great app that helps make this one as great as it is !!!


Re-scanned the files that were giving me errors,
after training,
Didn't find one mistake !!! :)
 
Last edited:
Hi all,

Firstly, many thanks to both Eventure and seeebek for your time and efforts on data analysis and OCR. This is some really cool stuff you guys have created together. I haven't been following all this from the beginning and I've only been playing the game for a few weeks, so apologies if I'm saying anything that's already been said. I did read Yokai's guide a couple weeks ago, though I can't help but feel that some of this information is dated (which is a great testament to your ongoing efforts and progress), and with the hundreds of forum pages to scour through on these posts, it's pretty hard to catch up to the latest. So I figure I'll just ask:

1) The process for adding stations to TCE is awfully manual compared to commodity scanning. Virtually all of the station info (except the presence of a Black Market or Rare Commodity) can be found in the local NAV map. When selecting the current station, "Arrival Point" can be read from the center of the screen, and is a perfect analogue for your "Distance to Star" field. The station type can be determined by performing image recognition on the station's icon in the center of the screen, once it's selected. It doesn't let you distinguish between the various types of Coriolis, Orbis or Outposts, but I also haven't found a real reason to distinguish these. All you need to worry about is if it's an Outpost or not since those are the only ones that don't have large landing pads. The rest of the fields can be populated by interpreting text on the left-hand side of the screen under the "Info" window. You could even capture more info from this screen to create more robust algorithms for managing illegal cargo along trade routes. And regarding the "Black Market" check box, you could leave that manual or even use an interface such as AutoHotKey (AHK) to send keystrokes to reach the "Contacts" page and then scan the buttons for the presence of a "Black Market" option. In fact, after teaching it your keybindings, AHK could allow you to automate virtually this entire process once you're landed at the station of interest. I know this because I've already written an AHK script that uses image recognition (instead of time delays) and some fancy logic to robustly enter the Galaxy map and setup a route to a system that it reads from a list stored in a text file. I used it to auto-select the next hop of a 71-system-long rare route I tested a couple weeks ago. Each time I would launch from a station after selling or buying, I'd just hit a key and it would automatically setup my next destination. It works 100% of the time now, regardless of how long my system takes to open the galaxy map, scroll to the new system or setup the route to the selected system. It even detects missed keystrokes and re-sends. I know those concepts could be combined with your tool to automate a lot of this data entry by sending keystrokes to the game. You could then even expand and go for the gold by collecting every bit of info about a station, including a list of outfitting components sold as well as ships sold.

2) In line with the above suggestions, it would be awesome to see the commodity price scanning become more automated. I looked at EliteOCR natively and I like that it shows a black/white of each image scanned immediately above the text entry box so you can quickly compare and make any changes. I know it sounds like a small deal since the prices should already be on your screen when using your GUI, but it really makes a big time difference to have the image right there immediately above the text box you're comparing it to. I could see it useful to make commodity price scanning a staged process where the same button that kicks off the process can be used to auto-initiate a scan on the next page (i.e. clicking the same button would scroll down a page and kickoff another OCR). Then in the end, you could just click a button, scan through the text and make any changes as needed, and then go back to the same button until the whole process is complete. It really wastes a lot of time to have to manually click over to the window and keep track of the last commodity and then line up a new list of commodities without cutting off any of the letters, which seems to wreak havoc on EliteOCR's routine. Overall, even a simple idea like allowing keystrokes to navigate the categories of the commodity pricing page would speed things up immensely. All you need are 3 keys to speed up the process: Scan (preferably auto-scrolling the commodities after each subsequent press), Highlight Next Field, View Next Category. Even better yet, you could skip the View Next Category button and the (Next) Scan button by kicking off an auto-scroll and new Scan once the last commodity was confirmed from the most recent OCR. That would be fantastic =)

3) On that note, it would be great to have more bindable keystrokes in general to open/hide the various features in TCE. The less mouse use, the better and the faster. Hotkeys = speed and accuracy. Right now, it's very easy to accidentally hit SAVE instead of HIDE on one of your windows.

4) You no longer need to advise people to change their whole system's UAC setting. All you have to do is create a simple batch file with the path of the TCE.xlsm file (and you can do the same for the TCE Setup.xlsm file) and store it alongside the TCE.xlsm file. Then create a shortcut to the .bat file and navigate to Properties > Shortcut (tab) > Advanced... (button) > Run as administrator (checkbox). Then just use the shortcut to run TCE and it'll leave a small command prompt on your screen which you can minimize while it's running. This way, people can maintain their pre-existing UAC settings while trusting your program to do what it needs to do.

5) Do you need to start TCE prior to ED every single time? I had a lot of difficulty getting it work at first and I realized that in the beginning, I needed to start TCE and let it load entirely before starting ED, but after seeing some crashes and having to restart TCE mid-game, I'm unsure if I need to keep up this habit.

6) What exactly is affected when I "Reset All Prices and Scan" in the commodity window? I'm unsure if this wipes all of my commodity data from the database or if it's just for this current station. If it's the latter, I'm unsure why this matters since the OCR writes over top of old data anyway. Can you explain when I might want to use it?

7) While I'm at it, how exactly are we supposed to use the Rare Commodity field in the Edit Station window? I made a mistake early on of adding Rares to my standard list of Commodities, but I quickly realized that I shouldn't have done that =)
 
Last edited:
6) What exactly is affected when I "Reset All Prices and Scan" in the commodity window? I'm unsure if this wipes all of my commodity data from the database or if it's just for this current station. If it's the latter, I'm unsure why this matters since the OCR writes over top of old data anyway. Can you explain when I might want to use it?

7) While I'm at it, how exactly are we supposed to use the Rare Commodity field in the Edit Station window? I made a mistake early on of adding Rares to my standard list of Commodities, but I quickly realized that I shouldn't have done that =)

There are some very good suggestion in there !!!

I can answer the last 2 questions :

6) "Reset All Prices and Scan" is just for this current station. You use it when you intend to scan the hole list. Use update if you only want to quickly update part of the list.

7) Not in use yet ! it is there in preparation for the upcoming extended logbook update.
 
Last edited:
Yeah I figured that out :) Training in progress !

You are the author of EliteOCR ?

If so, Great Job !!!!
I didn't realize, sorry.
We each have only so much time to play
and I spend a good part of it here,
so I don't monitor the other threads much.

Respect, kudos and rep to you !
Thank you for a great app that helps make this one as great as it is !!!


Re-scanned the files that were giving me errors,
after training,
Didn't find one mistake !!! :)
Thanks and good to hear that the training is working. I need to make it easier and more stable, but it's not easy to get everything working at once. And I also have limited time to work on EliteOCR.
 
Thanks and good to hear that the training is working. I need to make it easier and more stable, but it's not easy to get everything working at once. And I also have limited time to work on EliteOCR.

After just having gone through some training myself, do you think it's possible to allow the training image comparison screen to use actual images from the screenshot instead of the binarized ones? Binarized works great for machines, but I've gotten more than confused on a few 6 vs 8 images it capped that I know I'd be able to handle better if it were the original pixels =)
 
Last edited:
Thanks for your feedback, now lets see, what i am thinking of it:

1) The process for adding stations to TCE is awfully manual compared to commodity scanning. Virtually all of the station info (except the presence of a Black Market or Rare Commodity) can be found in the local NAV map. When selecting the current station, "Arrival Point" can be read from the center of the screen, and is a perfect analogue for your "Distance to Star" field. The station type can be determined by performing image recognition on the station's icon in the center of the screen, once it's selected. It doesn't let you distinguish between the various types of Coriolis, Orbis or Outposts, but I also haven't found a real reason to distinguish these. All you need to worry about is if it's an Outpost or not since those are the only ones that don't have large landing pads. The rest of the fields can be populated by interpreting text on the left-hand side of the screen under the "Info" window. You could even capture more info from this screen to create more robust algorithms for managing illegal cargo along trade routes. And regarding the "Black Market" check box, you could leave that manual or even use an interface such as AutoHotKey (AHK) to send keystrokes to reach the "Contacts" page and then scan the buttons for the presence of a "Black Market" option. In fact, after teaching it your keybindings, AHK could allow you to automate virtually this entire process once you're landed at the station of interest. I know this because I've already written an AHK script that uses image recognition (instead of time delays) and some fancy logic to robustly enter the Galaxy map and setup a route to a system that it reads from a list stored in a text file. I used it to auto-select the next hop of a 71-system-long rare route I tested a couple weeks ago. Each time I would launch from a station after selling or buying, I'd just hit a key and it would automatically setup my next destination. It works 100% of the time now, regardless of how long my system takes to open the galaxy map, scroll to the new system or setup the route to the selected system. It even detects missed keystrokes and re-sends. I know those concepts could be combined with your tool to automate a lot of this data entry by sending keystrokes to the game. You could then even expand and go for the gold by collecting every bit of info about a station, including a list of outfitting components sold as well as ships sold.

AFAIK EliteOCR is designed only for commodity prices, nothing else. You have to input the details for the station yourself, if not accessing an online database with the data. That will not come till the API from FD.

2) In line with the above suggestions, it would be awesome to see the commodity price scanning become more automated. I looked at EliteOCR natively and I like that it shows a black/white of each image scanned immediately above the text entry box so you can quickly compare and make any changes. I know it sounds like a small deal since the prices should already be on your screen when using your GUI, but it really makes a big time difference to have the image right there immediately above the text box you're comparing it to. I could see it useful to make commodity price scanning a staged process where the same button that kicks off the process can be used to auto-initiate a scan on the next page (i.e. clicking the same button would scroll down a page and kickoff another OCR). Then in the end, you could just click a button, scan through the text and make any changes as needed, and then go back to the same button until the whole process is complete. It really wastes a lot of time to have to manually click over to the window and keep track of the last commodity and then line up a new list of commodities without cutting off any of the letters, which seems to wreak havoc on EliteOCR's routine. Overall, even a simple idea like allowing keystrokes to navigate the categories of the commodity pricing page would speed things up immensely. All you need are 3 keys to speed up the process: Scan (preferably auto-scrolling the commodities after each subsequent press), Highlight Next Field, View Next Category. Even better yet, you could skip the View Next Category button and the (Next) Scan button by kicking off an auto-scroll and new Scan once the last commodity was confirmed from the most recent OCR. That would be fantastic =)

I tried AHK for the scan process of prices some weeks ago, but found it not reliable enough for me, but i had not much time to work it out. So i canceled it. But someone with more knowledge and practice with AHK could serve a script, that could automate the whole process. I tried something similar with VBA but wasn't successful. AHK could close the gap, when a script gets enough fine-tuning to produce stable results and could be run from TCE with a mouseclick.

You also talking about the EliteOCR UI in case of comparing the value with images. TCE uses the command line file. I only get the export file from it, which values are imported and displayed. TCE checks all values, if they are, based on all prices of the database, off-limit by 50% min/max at the moment. It will be displayed in red. The % could be reduced to be more accurate.

The Commodity panel will get an overhaul (no more categories clicking) for an easier process, but at a later date. Some other things have to come first.

3) On that note, it would be great to have more bindable keystrokes in general to open/hide the various features in TCE. The less mouse use, the better and the faster. Hotkeys = speed and accuracy. Right now, it's very easy to accidentally hit SAVE instead of HIDE on one of your windows.

I agree with you, this could be possible, of course i was quite happy to implent a hotkey alone to hide TCE, because users without a HOTAS requested it. I think it could be expanded, but i can't say, when this will happen. The SAVE button will be rearranged, when i had time to rework the relevant panels.

4) You no longer need to advise people to change their whole system's UAC setting. All you have to do is create a simple batch file with the path of the TCE.xlsm file (and you can do the same for the TCE Setup.xlsm file) and store it alongside the TCE.xlsm file. Then create a shortcut to the .bat file and navigate to Properties > Shortcut (tab) > Advanced... (button) > Run as administrator (checkbox). Then just use the shortcut to run TCE and it'll leave a small command prompt on your screen which you can minimize while it's running. This way, people can maintain their pre-existing UAC settings while trusting your program to do what it needs to do.

As i know, please correct me if i was wrong, is the "Run as administrator" checkbox only of .exe files. It doesnt work on .xlsm files.

5) Do you need to start TCE prior to ED every single time? I had a lot of difficulty getting it work at first and I realized that in the beginning, I needed to start TCE and let it load entirely before starting ED, but after seeing some crashes and having to restart TCE mid-game, I'm unsure if I need to keep up this habit.

Originally TCE is started, when you are in-game. Today you can start it also before starting ED. There could be problems, when starting both together. So i recommend it to start TCE before you start the game. The only case you start the launcher prior TCE is, when FD releases a new update. Then please let the update finish, close the launcher and start TCE. When ready start ED as usual.

Best regards,

Eventure
 
After just having gone through some training myself, do you think it's possible to allow the training image comparison screen to use actual images from the screenshot instead of the binarized ones? Binarized works great for machines, but I've gotten more than confused on a few 6 vs 8 images it capped that I know I'd be able to handle better if it were the original pixels =)

Yep I agree completely, I did all of the training with the actual screen shot opened on my second monitor for easy comparison ! It is pretty incredible that the software is this accurate if that is the way it sees lol

I suggested :
"Training could be done in the main EliteOcr interface !It's more readable when you can see the hole line.
and you already have all the boxes there that we use to fix errors !"

And it also show us the actual screen shot !!! :)
 
As i know, please correct me if i was wrong, is the "Run as administrator" checkbox only of .exe files. It doesnt work on .xlsm files.

Yes, "Run as administrator" checkbox is only for .exe files,
but the .xlsm have an "UNBLOCK" box that basically does the same thing.
Once selected and applied, that file will not trigger UAC anymore.


Originally TCE is started, when you are in-game. Today you can start it also before starting ED. There could be problems, when starting both together. So i recommend it to start TCE before you start the game. The only case you start the launcher prior TCE is, when FD releases a new update. Then please let the update finish, close the launcher and start TCE. When ready start ED as usual.

Nice to know, I've always started TCE after ED so far and never really had a problem with it yet !
 
Yep I agree completely, I did all of the training with the actual screen shot opened on my second monitor for easy comparison ! It is pretty incredible that the software is this accurate if that is the way it sees lol

I suggested :
"Training could be done in the main EliteOcr interface !It's more readable when you can see the hole line.
and you already have all the boxes there that we use to fix errors !"

And it also show us the actual screen shot !!! :)
This is actually a discussion for the EliteOCR thread and not TCE.
To tell you why it's not good: How will you tell if EliteOCR was able to cut "LA" into L and A in the main interface? You cannot. I need to cut the images first and then show what came out. Unfortunatelly I cannot change it a lot. I still try to make it better but the images have to be displayed as they were cut otherwise the user does not know which letter he assigns to which snippet of the image.
 
Yes, "Run as administrator" checkbox is only for .exe files,
but the .xlsm have an "UNBLOCK" box that basically does the same thing.
Once selected and applied, that file will not trigger UAC anymore.

Tried this out and found the same, go into the file properties for TCE.xlsm and TCE Setup.xlsm, click the unblock button and I was able to turn UAC back to fully on.


Edit - Ignore me, being a muppet - forgot to restart the computer! Wasn't able to turn UAC fully on again.

My last info was this. What now, is it working with fully UAC on or not?
 
My last info was this. What now, is it working with fully UAC on or not?

Yes, once we unblock both files
(probably only really needed for TCE.xlsm but I've always done both)
your can run with UAC on maximum and not have any problem with TCE at all.
but windows will bug you for everything else lol :)

We talked about that in post #1633:

https://forums.frontier.co.uk/showthread.php?t=103401&p=2020793&viewfull=1#post2020793

and then I confirmed it was working in post #2057 :

https://forums.frontier.co.uk/showthread.php?t=103401&p=2142270&viewfull=1#post2142270

I'm not sure but I think his muppet comment was added before he confirmed it was working, replacing another comment that said he wasn't able to turn UAC back on or something like that. I remember finding that post confusing too at the time ! I should have asked the question then !


I Say again just to be clear,

It is working 100% for me and has been so since the end of march as long as I redo it every time I update the files !

Can anybody else confirm ???
 
Last edited:
AFAIK EliteOCR is designed only for commodity prices, nothing else. You have to input the details for the station yourself, if not accessing an online database with the data. That will not come till the API from FD.

Is an API guaranteed, or just speculation? I don't know enough on the topic. Regarding EliteOCR, I understand that it's presently focused on commodities, but I'm trying to think ahead with this. You may be interested in http://sourceforge.net/projects/capture2text/ which is a very powerful program written in AHK that makes calls to libraries like tesseract and leptonica for OCR. Its current form allows the user to press WIN+Q to start drawing a box around the screen, and even shows parsing in real-time at the top of the screen. A click will save the parsed data to clipboard, but you can modify the AHK script to do anything you want with it. If you look at the script, it can be easily modified to run entirely from commands with args on where to grab imagery from the screen without having to go through any of the manual selection process. There's also an output folder that allows you to see both the original and binarized images from the most recent capture. I've done some testing, and it's definitely able to get the job done. My problem is I'm new to all this OCR, so I'm not exactly sure how to train this sucker. I started with https://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3 but quickly got overwhelmed. seeebek's trainer UI is pretty awesome by comparison. It sounds like the training results from EliteOCR may be able to be used by Capture2Text, but I just don't know enough right now to be sure. Of course, all this Capture2Text stuff is moot if seeebek ever decides to provide a simplified version of EliteOCR that just parses a portion of screen based on coordinate args, rather than trying to solve one whole problem (commodities only) in one chunk. Then I imagine we could still take advantage of his great trainer and have the flexibility to parse anything desired. But maybe I'm oversimplifying things =)

I tried AHK for the scan process of prices some weeks ago, but found it not reliable enough for me, but i had not much time to work it out. So i canceled it. But someone with more knowledge and practice with AHK could serve a script, that could automate the whole process. I tried something similar with VBA but wasn't successful. AHK could close the gap, when a script gets enough fine-tuning to produce stable results and could be run from TCE with a mouseclick.

It can be done with the options I mentioned above, and I'm sure I can manage it somehow, but I'm hesitant since you're already talking about about making changes to your UI, which is to be expected. How would you prefer to digest any info parsed from such a script?

You also talking about the EliteOCR UI in case of comparing the value with images. TCE uses the command line file. I only get the export file from it, which values are imported and displayed. TCE checks all values, if they are, based on all prices of the database, off-limit by 50% min/max at the moment. It will be displayed in red. The % could be reduced to be more accurate.

You're right-- I was confusing it with Capture2Text which provides both images (binarized and original) in an output folder. This would be a nice feature-request for seeebek, which you could utilize to make user error-detection much smoother. You could even magnify things =) While I'm on this topic, when we perform commodity scans and correct erroneous values, does that feed into EliteOCR training at all, or is it just a 1-time fix that doesn't improve the OCR? It would be really awesome if it actually trained EliteOCR which would keep it running tip-top over time.

As i know, please correct me if i was wrong, is the "Run as administrator" checkbox only of .exe files. It doesnt work on .xlsm files.

Give it a shot and you'll see. I believe you're thinking of when you go to an .exe's properties windows and modify its compatibility settings. This is slightly different. Using a .bat file works for me. My UAC is not off, and your program has been working just fine.


Thanks for all the other feedback. I can tell you've put a massive amount of work into this. It's very much appreciated =)
 
Last edited:
Status
Thread Closed: Not open for further replies.
Back
Top Bottom