@@ -742,6 +742,7 @@ void TessBaseAPI::DumpPGM(const char* filename) {
742
742
fclose (fp);
743
743
}
744
744
745
+ #ifndef ANDROID_BUILD
745
746
/* *
746
747
* Placeholder for call to Cube and test that the input data is correct.
747
748
* reskew is the direction of baselines in the skewed image in
@@ -786,6 +787,7 @@ int CubeAPITest(Boxa* boxa_blocks, Pixa* pixa_blocks,
786
787
ASSERT_HOST (pr_word == word_count);
787
788
return 0 ;
788
789
}
790
+ #endif
789
791
790
792
/* *
791
793
* Runs page layout analysis in the mode set by SetPageSegMode.
@@ -1022,6 +1024,7 @@ bool TessBaseAPI::ProcessPagesMultipageTiff(const l_uint8 *data,
1022
1024
int timeout_millisec,
1023
1025
TessResultRenderer* renderer,
1024
1026
int tessedit_page_number) {
1027
+ #ifndef ANDROID_BUILD
1025
1028
Pix *pix = NULL ;
1026
1029
#ifdef USE_OPENCL
1027
1030
OpenclDevice od;
@@ -1052,6 +1055,9 @@ bool TessBaseAPI::ProcessPagesMultipageTiff(const l_uint8 *data,
1052
1055
if (tessedit_page_number >= 0 ) break ;
1053
1056
}
1054
1057
return true ;
1058
+ #else
1059
+ return false ;
1060
+ #endif
1055
1061
}
1056
1062
1057
1063
// Master ProcessPages calls ProcessPagesInternal and then does any post-
@@ -1087,6 +1093,7 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename,
1087
1093
const char * retry_config,
1088
1094
int timeout_millisec,
1089
1095
TessResultRenderer* renderer) {
1096
+ #ifndef ANDROID_BUILD
1090
1097
PERF_COUNT_START (" ProcessPages" )
1091
1098
bool stdInput = !strcmp (filename, " stdin" ) || !strcmp (filename, " -" );
1092
1099
if (stdInput) {
@@ -1174,6 +1181,9 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename,
1174
1181
}
1175
1182
PERF_COUNT_END
1176
1183
return true ;
1184
+ #else
1185
+ return false ;
1186
+ #endif
1177
1187
}
1178
1188
1179
1189
bool TessBaseAPI::ProcessPage (Pix* pix, int page_index, const char * filename,
@@ -1207,8 +1217,10 @@ bool TessBaseAPI::ProcessPage(Pix* pix, int page_index, const char* filename,
1207
1217
failed = Recognize (NULL ) < 0 ;
1208
1218
}
1209
1219
if (tesseract_->tessedit_write_images ) {
1220
+ #ifndef ANDROID_BUILD
1210
1221
Pix* page_pix = GetThresholdedImage ();
1211
1222
pixWrite (" tessinput.tif" , page_pix, IFF_TIFF_G4);
1223
+ #endif
1212
1224
}
1213
1225
if (failed && retry_config != NULL && retry_config[0 ] != ' \0 ' ) {
1214
1226
// Save current config variables before switching modes.
@@ -2613,10 +2625,12 @@ int TessBaseAPI::NumDawgs() const {
2613
2625
return tesseract_ == NULL ? 0 : tesseract_->getDict ().NumDawgs ();
2614
2626
}
2615
2627
2628
+ #ifndef ANDROID_BUILD
2616
2629
/* * Return a pointer to underlying CubeRecoContext object if present. */
2617
2630
CubeRecoContext *TessBaseAPI::GetCubeRecoContext () const {
2618
2631
return (tesseract_ == NULL ) ? NULL : tesseract_->GetCubeRecoContext ();
2619
2632
}
2633
+ #endif
2620
2634
2621
2635
/* * Escape a char string - remove <>&"' with HTML codes. */
2622
2636
STRING HOcrEscape (const char * text) {
0 commit comments