Ir a la documentación de este archivo.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00025 package com.googlecode.leptonica.android;
00026
00031 public class Skew {
00032 static {
00033 System.loadLibrary("lept");
00034 }
00035
00036
00037
00041 public final static float SWEEP_RANGE = 30.0f;
00042
00044 public final static float SWEEP_DELTA = 5.0f;
00045
00049 public final static int SWEEP_REDUCTION = 8;
00050
00054 public final static int SEARCH_REDUCTION = 4;
00055
00060 public final static float SEARCH_MIN_DELTA = 0.01f;
00061
00069 public static float findSkew(Pix pixs) {
00070 return findSkew(pixs, SWEEP_RANGE, SWEEP_DELTA, SWEEP_REDUCTION,
00071 SEARCH_REDUCTION, SEARCH_MIN_DELTA);
00072 }
00073
00105 public static float findSkew(Pix pixs, float sweepRange, float sweepDelta,
00106 int sweepReduction, int searchReduction, float searchMinDelta) {
00107 if (pixs == null)
00108 throw new IllegalArgumentException("Source pix must be non-null");
00109
00110 return nativeFindSkew(pixs.mNativePix, sweepRange, sweepDelta,
00111 sweepReduction, searchReduction, searchMinDelta);
00112 }
00113
00114
00115
00116
00117
00118 private static native float nativeFindSkew(int nativePix, float sweepRange,
00119 float sweepDelta, int sweepReduction, int searchReduction,
00120 float searchMinDelta);
00121
00122 }