Comments (7)
change written, currently under review
from tesseract.
Change is in Ray's hands and will eventually migrate here. The person in critical need has a copy.
from tesseract.
@jbreiden, we didn't get the patch.
https://github.com/tesseract-ocr/tesseract/blob/2c837dffc3/api/renderer.cpp#L71
from tesseract.
cc: @theraysmith
from tesseract.
This was the patch. I strongly suspect it made it in.
--- tesseract/api/baseapi.cpp 2015-06-12 17:25:51.000000000 -0700
+++ tesseract/api/baseapi.cpp 2015-08-18 17:46:15.000000000 -0700
@@ -991,8 +991,7 @@
}
// Begin producing output
- const char* kUnknownTitle = "";
- if (renderer && !renderer->BeginDocument(kUnknownTitle)) {
+ if (renderer && !renderer->BeginDocument(unknown_title_)) {
return false;
}
@@ -1166,8 +1165,7 @@
}
// Begin the output
- const char* kUnknownTitle = "";
- if (renderer && !renderer->BeginDocument(kUnknownTitle)) {
+ if (renderer && !renderer->BeginDocument(unknown_title_)) {
pixDestroy(&pix);
return false;
}
--- tesseract/api/baseapi.h 2015-03-09 15:43:40.000000000 -0700
+++ tesseract/api/baseapi.h 2015-08-18 17:52:49.000000000 -0700
@@ -879,6 +879,12 @@
int timeout_millisec,
TessResultRenderer* renderer,
int tessedit_page_number);
+ // There's currently no way to pass a document title from the
+ // Tesseract command line, and we have multiple places that choose
+ // to set the title to an empty string. Using a single named
+ // variable will hopefully reduce confusion if the situation changes
+ // in the future.
+ const char *unknown_title_ = "";
}; // class TessBaseAPI.
/** Escape a char string - remove &<>"' with HTML codes. */
--- tesseract/api/renderer.h 2014-08-12 11:22:47.000000000 -0700
+++ tesseract/api/renderer.h 2015-08-18 17:17:41.000000000 -0700
@@ -77,7 +77,7 @@
bool EndDocument();
const char* file_extension() const { return file_extension_; }
- const char* title() const { return title_; }
+ const char* title() const { return title_.c_str(); }
/**
* Returns the index of the last image given to AddImage
@@ -126,7 +126,7 @@
private:
const char* file_extension_; // standard extension for generated output
- const char* title_; // title of document being renderered
+ STRING title_; // title of document being renderered
int imagenum_; // index of last image added
FILE* fout_; // output file pointer
from tesseract.
Yes, it went in as part of this commit.
from tesseract.
Since you originally linked to renderer.cpp
, I thought that the patch will be in that file.
I'm sorry for the mistake.
from tesseract.
Related Issues (20)
- multithreaded tesseract causes Linux crash HOT 5
- Linker Error for tesseract53.lib HOT 1
- Add redirect function HOT 1
- Add ICD Codes in english trained Data HOT 2
- Some CI jobs (GitHub Actions) are failing HOT 10
- uuencode-generated text is OCRed with many mistakes HOT 2
- Error! The command "tesseract" was not found. HOT 2
- Error! The command "tesseract" was not found
- unicharset_extractor segfault HOT 31
- Please add the API call to translate the language code to the full language name HOT 3
- Warning: LSTMTrainer deserialized an LSTMRecognizer! Error, data/eng/eng_num_vert.lstm is an integer (fast) model, cannot continue training HOT 7
- Add the NN for a 'random' ASCII language HOT 1
- "min_characters_to_try" parameter does not work HOT 2
- phonetic symbols and special characters HOT 1
- inform where we can find tesseract.exe HOT 1
- Native Crash in otsuthr.cpp HOT 2
- CI: vcpkg failure due to missing xz tarball HOT 4
- link error LNK1120 with text2image.exe
- Mac m1, not able to compile HOT 2
- OCR of Indian Currency Sign " ₹" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tesseract.