killkimno / MORT

MORT 번역기 프로젝트 - Real-time game translator with OCR
https://blog.naver.com/killkimno/70179867557
MIT License
556 stars 38 forks source link

Text on light background #24

Closed rektceb closed 2 months ago

rektceb commented 8 months ago

Hi, MORT work great with text on dark background, but do you have any trick for some games that don't have a dark background option for subtitles. I played full story game Wild Heart with MORT and work great because game have in options dark background for subtitles

killkimno commented 8 months ago

hello! You can use the image adjust function to recognize only the font.

image

You can see how it was extracted by pressing the preview button.

rektceb commented 8 months ago

hello! You can use the image adjust function to recognize only the font.

image

You can see how it was extracted by pressing the preview button.

It still misrecognizes text in Final Fantasy XV, for example :(

killkimno commented 8 months ago

Please upload screenshots of a few sections that are not recognized properly. I will check the color value and let you know.

rektceb commented 8 months ago

Please upload screenshots of a few sections that are not recognized properly. I will check the color value and let you know.

Here, for example, it will translate incorrectly. I can here change value of Extract by Threshold, but another passage may have problem, because text can be on darker background

Bez názvu

rektceb commented 8 months ago

And another Final Fantasy vii remake

Bez názvu

2

killkimno commented 8 months ago

Currently, the image is uploaded as a jpg file. It's difficult to determine the exact font color.

I think it's probably hsv - s= 0 ~12 / v = 83~90. Can you please upload the original screenshot?

If you upload it after visiting Discord, it will probably be uploaded as the original file. https://discord.com/invite/ha5yNy9

rektceb commented 8 months ago

Currently, the image is uploaded as a jpg file. It's difficult to determine the exact font color.

I think it's probably hsv - s= 0 ~12 / v = 83~90. Can you please upload the original screenshot?

If you upload it after visiting Discord, it will probably be uploaded as the original file. https://discord.com/invite/ha5yNy9

My understanding is that if I choose the correct font color value, ocr will capture the text on any background - does it matter if it's on a light or dark background?

killkimno commented 8 months ago

Of course, if there is a background that is the same as the specified color, it may not be recognized.

For example HSV S = 0-5 / V= 90-100 This value is usually a bright white font.

However, if the background is also very bright sky blue, it may fall within the above color range.