Skip to content
cadon edited this page Nov 16, 2019 · 11 revisions

OCR is the process to "read" the values from the ARK-screen. Since v0.23.0 the OCR can be adjusted for different resolutions or GUI-scalings. To do so, go to the OCR-tab. To create a ocr-config-file, follow these steps:

  • Create a screenshot with an inventory of a creature.
  • In the tab "Output" check the checkbox "Enable logging and editing"
  • Drag&drop the file on the large empty area to start the ocr.

Labels

  • Adjust the reading-areas in the Labels-tab, i.e. change the position and size of each label until they cover the text they should read.
  • The label-height has to be exactly like the font-size. For comparison, the pipe-character | covers the whole height of the font (you can name a creature to see it in the gui). As example, in 1920x1080 and 100% gui the font-size is 15 (px) for the stats and the tribe, 17 for the labels creature-name and level and 13 for the owner-label. You can adjust the vertical-position / size later when comparing read letters to the letter-template (see next steps).
  • The labels should include all the numbers of the stats, e.g. all of "1234/5678" for the stats that have two values (current / max). It's best to make the label stretching as far to the right that it just doesn't read the stat-name, incase a stat-number is really large.
  • For the level-number theoretically only the colon and the number is needed, but as this string is centered, the position of the level-number changes position dependant of the number of digits, so it's best to let the label cover all of the "LEVEL: 123". The "LEVEL:"-part is read by the OCR, but everything preceding the colon (and the colon itself) is ignored later, so don't be bothered by the gibberish the OCR displays for the read level, as long as the colon and the numbers after that are read correctly.
  • If a line isn't present, it should be ignored, e.g. if a creature has no imprinting, this line will result in gibberish and will be ignored after the OCR. Also, if a creature has no oxygen-stat, the stats below that are shifted upwards by one row, this will be recognized automatically.
  • The sex-symbol should be included in the OCR-label. Usually the symbol is larger than the other text of the creature's name, so it will be cut off at the top and the bottom. Later if you calibrate the settings, just select the sex-symbol that was read by the OCR, set the correct character to ♀ or ♂ (the unicode-symbols) and save it as a new character. The application will then set the sex of the read creature automatically.

Labels

Note the labels are very close to the top of the letters, but have some space below (numbers are rather on the upper part of the possible range). The exact positioning and line-height might require some trial and error later.

Character-templates

  • For a start it's best to automatically create templates for all the letters from a font-file, so you have something for each letter to work with. For this you can use the character-set already filled in the edit-input right of the "Calibrate from Font" button. The gui ingame currently uses the font Sansation-Bold, but you can use any font that looks similar to the one used (the more similar the better, of course, and the less adjustments later have to be done). Set the font-size you want and select the font you want to use.

Font-creation

In this example we create character templates in the font-size 15, because that's the label-height for the stat-values and thus is the expected font-size for the stat-values. Repeat this step for each required font-size, until there are character templates for each label-height that are set in the label-editor.

Adjustments

  • Now the ocr should work in a basic way. For adjusting, do an ocr (i.e. drag&drop a screenshot on the area) and check the recognized characters. If a character is recognized wrong, select it in the Output-tab. The recognized pattern is shown in the Recognized-area, the template pattern is shown in the Template area. If you notice that the size is different or the recognized letter is shifted up or down, you probably need to adjust the according label. If the used character template is too large you have to make the label smaller (i.e. decrease the height), so a character template from a smaller font is used. If the recognized character is shifted up or down you have to shift the label down or up respectively. If the letter size and position is correct but not the letter, set the correct character in the character-textbox and click on "Save as template" in the recognized area. To edit the template, you can click on the template to toggle the pixels.
  • To save the ocr-config-file, click on "save OCR template". After you load a config-file, it's automatically loaded when you start the tool.

If you have created an ocr-file for a configuration that is not yet available, you can send it to me for including it in the release.