Skip to content

Commit

Permalink
Add missing PageSegMode constant - PSM_RAW_LINE
Browse files Browse the repository at this point in the history
  • Loading branch information
Robyer committed Aug 1, 2019
1 parent 27cbf34 commit 896f8b4
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
import android.graphics.Bitmap;
import android.graphics.Rect;

import androidx.annotation.IntDef;
import androidx.annotation.WorkerThread;

import com.googlecode.leptonica.android.Pix;
import com.googlecode.leptonica.android.Pixa;
import com.googlecode.leptonica.android.ReadFile;

import java.io.File;
import java.lang.annotation.Retention;

import androidx.annotation.IntDef;
import androidx.annotation.WorkerThread;

import static java.lang.annotation.RetentionPolicy.SOURCE;

/**
Expand Down Expand Up @@ -63,7 +63,7 @@ public static final class PageSegMode {
@Retention(SOURCE)
@IntDef({PSM_OSD_ONLY, PSM_AUTO_OSD, PSM_AUTO_ONLY, PSM_AUTO, PSM_SINGLE_COLUMN, PSM_SINGLE_BLOCK_VERT_TEXT,
PSM_SINGLE_BLOCK, PSM_SINGLE_LINE, PSM_SINGLE_WORD, PSM_CIRCLE_WORD, PSM_SINGLE_CHAR, PSM_SPARSE_TEXT,
PSM_SPARSE_TEXT_OSD})
PSM_SPARSE_TEXT_OSD, PSM_RAW_LINE})

public @interface Mode {
}
Expand Down Expand Up @@ -132,6 +132,11 @@ public static final class PageSegMode {
* Sparse text with orientation and script detection.
*/
public static final int PSM_SPARSE_TEXT_OSD = 12;

/**
* Treat the image as a single text line, bypassing hacks that are Tesseract-specific.
*/
public static final int PSM_RAW_LINE = 13;
}

/**
Expand Down

0 comments on commit 896f8b4

Please sign in to comment.