Skip to content

Commit 1edb5e2

Browse files
committed
remove logging for increased speed
1 parent 97ea9e2 commit 1edb5e2

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

tess-two/jni/com_googlecode_leptonica_android/pix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jboolean Java_com_googlecode_leptonica_android_Pix_nativeInvert(JNIEnv *env, jcl
111111

112112
void Java_com_googlecode_leptonica_android_Pix_nativeDestroy(JNIEnv *env, jclass clazz,
113113
jint nativePix) {
114-
LOGV(__FUNCTION__);
114+
//LOGV(__FUNCTION__);
115115

116116
PIX *pix = (PIX *) nativePix;
117117

tess-two/jni/com_googlecode_leptonica_android/readfile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jint Java_com_googlecode_leptonica_android_ReadFile_nativeReadFile(JNIEnv *env,
146146
jint Java_com_googlecode_leptonica_android_ReadFile_nativeReadBitmap(JNIEnv *env,
147147
jclass clazz,
148148
jobject bitmap) {
149-
LOGV(__FUNCTION__);
149+
//LOGV(__FUNCTION__);
150150

151151
l_int32 w, h, d;
152152
AndroidBitmapInfo info;

tess-two/jni/com_googlecode_tesseract_android/tessbaseapi.cpp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
5757
}
5858

5959
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit(JNIEnv* env, jclass clazz) {
60-
LOGV(__FUNCTION__);
60+
// LOGV(__FUNCTION__);
6161

6262
field_mNativeData = env->GetFieldID(clazz, "mNativeData", "I");
6363
}
6464

6565
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeConstruct(JNIEnv* env, jobject object) {
66-
LOGV(__FUNCTION__);
66+
// LOGV(__FUNCTION__);
6767

6868
native_data_t *nat = new native_data_t;
6969

@@ -76,7 +76,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeConstruct(JNIEnv* e
7676
}
7777

7878
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeFinalize(JNIEnv* env, jobject object) {
79-
LOGV(__FUNCTION__);
79+
// LOGV(__FUNCTION__);
8080

8181
native_data_t *nat = get_native_data(env, object);
8282

@@ -96,7 +96,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeFinalize(JNIEnv* en
9696

9797
jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInit(JNIEnv *env, jobject thiz,
9898
jstring dir, jstring lang) {
99-
LOGV(__FUNCTION__);
99+
// LOGV(__FUNCTION__);
100100

101101
native_data_t *nat = get_native_data(env, thiz);
102102

@@ -125,7 +125,7 @@ jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInitOem(JNIEnv
125125
jstring dir,
126126
jstring lang,
127127
jint mode) {
128-
LOGV(__FUNCTION__);
128+
// LOGV(__FUNCTION__);
129129

130130
native_data_t *nat = get_native_data(env, thiz);
131131

@@ -151,7 +151,7 @@ jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInitOem(JNIEnv
151151

152152
jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetLastInitLanguage(JNIEnv *env,
153153
jobject thiz) {
154-
LOGV(__FUNCTION__);
154+
// LOGV(__FUNCTION__);
155155

156156
native_data_t *nat = get_native_data(env, thiz);
157157

@@ -169,7 +169,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImageBytes(JNIEn
169169
jint width,
170170
jint height, jint bpp,
171171
jint bpl) {
172-
LOGV(__FUNCTION__);
172+
// LOGV(__FUNCTION__);
173173

174174
jbyte *data_array = env->GetByteArrayElements(data, NULL);
175175
int count = env->GetArrayLength(data);
@@ -200,7 +200,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImageBytes(JNIEn
200200
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetImagePix(JNIEnv *env,
201201
jobject thiz,
202202
jint nativePix) {
203-
LOGV(__FUNCTION__);
203+
// LOGV(__FUNCTION__);
204204

205205
PIX *pixs = (PIX *) nativePix;
206206
PIX *pixd = pixClone(pixs);
@@ -223,24 +223,24 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetRectangle(JNIEnv
223223
jobject thiz, jint left,
224224
jint top, jint width,
225225
jint height) {
226-
LOGV(__FUNCTION__);
226+
// LOGV(__FUNCTION__);
227227

228228
native_data_t *nat = get_native_data(env, thiz);
229229

230-
LOGI("set rectangle left=%d, top=%d, width=%d, height=%d\n", left, top, width, height);
230+
// LOGI("set rectangle left=%d, top=%d, width=%d, height=%d\n", left, top, width, height);
231231

232232
nat->api.SetRectangle(left, top, width, height);
233233
}
234234

235235
jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetUTF8Text(JNIEnv *env,
236236
jobject thiz) {
237-
LOGV(__FUNCTION__);
237+
// LOGV(__FUNCTION__);
238238

239239
native_data_t *nat = get_native_data(env, thiz);
240240

241-
LOGI("BEFORE RECOGNIZE");
241+
// LOGI("BEFORE RECOGNIZE");
242242
char *text = nat->api.GetUTF8Text();
243-
LOGI("AFTER RECOGNIZE");
243+
// LOGI("AFTER RECOGNIZE");
244244

245245
jstring result = env->NewStringUTF(text);
246246

@@ -250,7 +250,7 @@ jstring Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetUTF8Text(JNIE
250250
}
251251

252252
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeStop(JNIEnv *env, jobject thiz) {
253-
LOGV(__FUNCTION__);
253+
// LOGV(__FUNCTION__);
254254

255255
native_data_t *nat = get_native_data(env, thiz);
256256

@@ -259,7 +259,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeStop(JNIEnv *env, j
259259

260260
jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeMeanConfidence(JNIEnv *env,
261261
jobject thiz) {
262-
LOGV(__FUNCTION__);
262+
// LOGV(__FUNCTION__);
263263

264264
native_data_t *nat = get_native_data(env, thiz);
265265

@@ -268,7 +268,7 @@ jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeMeanConfidence(JNIE
268268

269269
jintArray Java_com_googlecode_tesseract_android_TessBaseAPI_nativeWordConfidences(JNIEnv *env,
270270
jobject thiz) {
271-
LOGV(__FUNCTION__);
271+
// LOGV(__FUNCTION__);
272272

273273
native_data_t *nat = get_native_data(env, thiz);
274274

@@ -300,7 +300,7 @@ jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetVariable(JNI
300300
jobject thiz,
301301
jstring var,
302302
jstring value) {
303-
LOGV(__FUNCTION__);
303+
// LOGV(__FUNCTION__);
304304

305305
native_data_t *nat = get_native_data(env, thiz);
306306

@@ -316,14 +316,14 @@ jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetVariable(JNI
316316
}
317317

318318
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClear(JNIEnv *env, jobject thiz) {
319-
LOGV(__FUNCTION__);
319+
// LOGV(__FUNCTION__);
320320

321321
native_data_t *nat = get_native_data(env, thiz);
322322

323323
nat->api.Clear();
324324

325325
// Call between pages or documents etc to free up memory and forget adaptive data.
326-
LOGI("clearing adaptive classifier");
326+
// LOGI("clearing adaptive classifier");
327327
nat->api.ClearAdaptiveClassifier();
328328

329329
// Since Tesseract doesn't take ownership of the memory, we keep a pointer in the native
@@ -338,7 +338,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClear(JNIEnv *env,
338338
}
339339

340340
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeEnd(JNIEnv *env, jobject thiz) {
341-
LOGV(__FUNCTION__);
341+
// LOGV(__FUNCTION__);
342342

343343
native_data_t *nat = get_native_data(env, thiz);
344344

@@ -357,7 +357,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeEnd(JNIEnv *env, jo
357357

358358
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetDebug(JNIEnv *env, jobject thiz,
359359
jboolean debug) {
360-
LOGV(__FUNCTION__);
360+
// LOGV(__FUNCTION__);
361361

362362
native_data_t *nat = get_native_data(env, thiz);
363363

@@ -367,7 +367,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetDebug(JNIEnv *en
367367
void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetPageSegMode(JNIEnv *env,
368368
jobject thiz,
369369
jint mode) {
370-
LOGV(__FUNCTION__);
370+
// LOGV(__FUNCTION__);
371371

372372
native_data_t *nat = get_native_data(env, thiz);
373373

@@ -376,7 +376,7 @@ void Java_com_googlecode_tesseract_android_TessBaseAPI_nativeSetPageSegMode(JNIE
376376

377377
jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetRegions(JNIEnv *env,
378378
jobject thiz) {
379-
LOGV(__FUNCTION__);
379+
// LOGV(__FUNCTION__);
380380

381381
native_data_t *nat = get_native_data(env, thiz);;
382382
PIXA *pixa = NULL;
@@ -391,7 +391,7 @@ jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetRegions(JNIEnv *
391391

392392
jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetTextlines(JNIEnv *env,
393393
jobject thiz) {
394-
LOGV(__FUNCTION__);
394+
// LOGV(__FUNCTION__);
395395

396396
native_data_t *nat = get_native_data(env, thiz);;
397397
PIXA *pixa = NULL;
@@ -406,7 +406,7 @@ jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetTextlines(JNIEnv
406406

407407
jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetWords(JNIEnv *env,
408408
jobject thiz) {
409-
LOGV(__FUNCTION__);
409+
// LOGV(__FUNCTION__);
410410

411411
native_data_t *nat = get_native_data(env, thiz);;
412412
PIXA *pixa = NULL;
@@ -421,7 +421,7 @@ jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetWords(JNIEnv *en
421421

422422
jint Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetCharacters(JNIEnv *env,
423423
jobject thiz) {
424-
LOGV(__FUNCTION__);
424+
// LOGV(__FUNCTION__);
425425

426426
native_data_t *nat = get_native_data(env, thiz);
427427
return reinterpret_cast<jint>(nat->api.GetCharacters());

0 commit comments

Comments
 (0)