rmtheis / tess-two

Fork of Tesseract Tools for Android
Apache License 2.0
3.76k stars 1.38k forks source link

Skip tesseract's default image preprocessing (Otsu) #243

Closed SivaramSS closed 6 years ago

SivaramSS commented 6 years ago

Summary: I'm preprcessing the image using Brad Larsen AdaptiveThresholding. I want to stop the tesseract's default processing (Otsu thresholding). Is there any way to achieve that?

Tess-two version: 9.0

Android version: 8.1.1

Phone/device model: Pixel XL

rmtheis commented 6 years ago

See https://stackoverflow.com/q/33239097/667810, which says that passing in an already-binarized image will bypass Tesseract's default processing.

If that doesn't work you can modify the C++ code in this project and build locally.

SivaramSS commented 6 years ago

Yes, but it says Android doesn't support 1bit bitmaps https://stackoverflow.com/questions/9377786/android-converting-a-bitmap-to-a-monochrome-bitmap-1-bit-per-pixel/15519513#comment11849170_9377943