esimov / caire

Content aware image resize library
MIT License
10.36k stars 384 forks source link

Text detection #81

Open jadencarver opened 2 years ago

jadencarver commented 2 years ago

Is your feature request related to a problem? Please describe.

I'm looking for a mechanism to resize images that contain text overlays.

Describe the solution you'd like

I would love if the mechanism for preserving faces could apply to OCR detected text.

Additional context

cover2 output2

esimov commented 2 years ago

This is a great suggestions. I was thinking about the implementation and I think it would be possible.

esimov commented 2 years ago

I have analyzed the existing possibilities and the most obvious approach would be to use a well established library like tesseract which has a Go binding also: https://github.com/otiai10/gosseract. This is working kind of nice on texts over an uniform background (I need to test it more with different pictures like the sample image you have provided - the text is not recognized 100% accurately here). My only concern is about the tesseract required dependencies. In need to weight it if it's truly worth it of extending the library towards OCR detection.