-
-
Notifications
You must be signed in to change notification settings - Fork 248
Optical character recognition (OCR) is the process to "read" the stat values from the ARK-screen. This is an alternative to Importing Creatures, e.g. an exported creature file. OCR is not perfect and may misread some characters.
When configured correctly, you can enable the OCR button in the settings
- OCR
- Show OCR button instead of import button
. Then click on Read Values from ARK Window
to start OCR, it will read the stat values and enter them in the stats extractor.
By default Smart Breeding reads the text from the local ARK game process, e.g. installed via Steam or Epic Games. If the game is displayed in another process, e.g. if you stream the game via gforce now or from a console like an XBox or Playstation, you need to adjust the process name from which the text is read in the Settings. In Smart Breeding go to Settings
- OCR
- Capture from
and enter the exact process name that displays the game. The easiest way is to run that process, then select the process nem in the dropdown menu under the text field.
To make OCR work, you need a config file for the resolution of your screen (not the resolution in ARK). To load an OCR config file, go to the OCR
tab, to the OCR Info
tab and then in the OCR config file
groupbox click on load
.
- Create a screenshot with an inventory of a creature. If the resolution of the screen in windows and ARK are different, make sure you take a screenshot from windows, OCR uses the resolution of windows.
- In the
OCR Info
tab click onnew
to create a new ocr config file and save it - In the
Output
tab check the checkboxEnable logging and editing
- Drag & drop the file on the large empty area at the left
- In the
Manage
tab set the resolution for the OCR config (click onTake resolution from screenshot
) - Set the correct positions of the labels (next section)
- Go to the
Labels
tab and select and set the position and size of all label-rectangles until they cover the text they should read. - For a first positioning just click on the image to set the left top corner of the selected rectangle to that position, then fine tune the coordinates
- 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 left 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 depending 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 when processing the data of 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 ♂ and save it as a new character. The application will then set the sex of the read creature automatically.
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.
When the labels are set, the OCR needs to know how the characters look like. For that in the Manage
tab - Pattern recognition settings
enable Train recognition
. This will display an input for unknown characters and the OCR will recognize these characters if they are similar enough later.
If you have the font file of the Ark UI (Sansation-Bold), you can also calibrate the OCR with that. In the Manage
tab - Add OCR Patterns
click on Automatic creation of OCR Patterns from font
and select the font file.
- Now the ocr should work at least for the digits. Regarding letters there is some work left, especially if the font size is different (if a name of a creature or tribe is long, ARK downscales it so it still fits on the available area). For adjusting, perform an ocr (i.e. drag & drop a screenshot on the area or click on the
Read Values from ARK Window
button) and check the recognized characters in theOutput
tab. If a character is not or wrongly recognized, select it in the vertical list on the right. The recognized pattern is shown in theRecognized
area, the template pattern is shown in theTemplate
area. Enter the correct character in the textinput in theTemplate
control, then in theRecognized
control click onSave as template
, so the recognized pattern is added as a template for the entered character.
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.