Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OCR to make text selectable #1337

Open
4 tasks done
Lolle2000la opened this issue Dec 7, 2024 · 3 comments
Open
4 tasks done

Use OCR to make text selectable #1337

Lolle2000la opened this issue Dec 7, 2024 · 3 comments

Comments

@Lolle2000la
Copy link

Describe your suggested feature

Currently, when reading Mangas in Japanese and encountering a word I don't understand, I need to manually type it out to search it in the dictionary. This can be especially awkward if I don't know the reading for a given kanji combination and need to draw it.

It would be very cool and helpful if it would be possible to simply copy and paste the text directly using OCR.

Other details

I currently achieve this using Google Circle to Search, but now I have a device that doesn't support this and also has its own features region locked with no easy path to unlocking it (I think; it's a OnePlus device so who knows).

It should probably not be constantly active for power consumption reasons (though I guess doing the scanning once for the whole chapter might also be an option), so having a button that does this on demand would probably be nice.

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the app to version 1.11.0.
  • I will fill out all of the requested information in this form.
@Lolle2000la
Copy link
Author

Lolle2000la commented Dec 9, 2024

I don't know if this could be used by TachiyomiSY since it isn't a Play Store-app, but it would be a good implementation to use as a backend if that is possible:

Recognize text in images with ML Kit on Android

Other than that there is obviously Tesseract, which could be consumed through tess4j or javacpp-presets/tesseract.

I would offer to try my hand at this feature, but I have no experience whatsoever with either Kotlin or Android development. But if this feature suggestion isn't outright rejected, I might try my hand at this.

@AminurAlam
Copy link

ocr can be slow and inaccurate, i recommend adding support for https://github.com/kha-white/mokuro instead

i have written about this in mihon too

@Lolle2000la
Copy link
Author

ocr can be slow and inaccurate, i recommend adding support for https://github.com/kha-white/mokuro instead

i have written about this in mihon too

I think that works be a good idea as well, just having to preprocess everything (assuming I understand correctly that would have to be "server side" and served along), then that might mean that one could not use it with sources that don't support that? Please correct me if I'm wrong.

I had quite good experience with Googles OCR in the past and tesseract seems to be quite good as well. Both options also allow loading the models after the fact (though Google only allows that through the play store), which would mean you would only pay for the size cost when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants