fix spelling

parent b5bb6f1c
......@@ -12,7 +12,7 @@ Here are instructions on how to install Tesseract on your machine (Linux or Mac;
Tesseract installation instruction (Linux, Mac)
-----------------------------------------------
0. Linux users may try to install tesseract-3.03-rc1 (or later) and leptonica-1.70 (or later) with the corresponding developement packages using their package manager. Mac users may try brew. The instructions below are for those who wants to build tesseract from source.
0. Linux users may try to install tesseract-3.03-rc1 (or later) and leptonica-1.70 (or later) with the corresponding development packages using their package manager. Mac users may try brew. The instructions below are for those who wants to build tesseract from source.
1. download leptonica 1.70 tarball (helper image processing library, used by tesseract. Later versions might work too):
http://www.leptonica.com/download.html
......@@ -33,9 +33,9 @@ mkdir build && cd build
../configure --with-extra-includes=/usr/local --with-extra-libraries=/usr/local
make && sudo make install
tessract will be installed to /usr/local.
Tesseract will be installed to /usr/local.
3. download the pre-trained classifier data for english language:
3. download the pre-trained classifier data for English language:
https://code.google.com/p/tesseract-ocr/downloads/detail?name=eng.traineddata.gz
unzip it (gzip -d eng.traineddata.gz) and copy to /usr/local/share/tessdata.
......
......@@ -66,12 +66,12 @@ hierarchy by their inclusion relation:
![image](pics/component_tree.png)
The component tree may conatain a huge number of regions even for a very simple image as shown in
The component tree may contain a huge number of regions even for a very simple image as shown in
the previous image. This number can easily reach the order of 1 x 10\^6 regions for an average 1
Megapixel image. In order to efficiently select suitable regions among all the ERs the algorithm
make use of a sequential classifier with two differentiated stages.
In the first stage incrementally computable descriptors (area, perimeter, bounding box, and euler
In the first stage incrementally computable descriptors (area, perimeter, bounding box, and Euler's
number) are computed (in O(1)) for each region r and used as features for a classifier which
estimates the class-conditional probability p(r|character). Only the ERs which correspond to local
maximum of the probability p(r|character) are selected (if their probability is above a global limit
......
......@@ -78,7 +78,7 @@ public:
//! incrementally computable features
int area;
int perimeter;
int euler; //!< euler number
int euler; //!< Euler's number
Rect rect;
double raw_moments[2]; //!< order 1 raw moments to derive the centroid
double central_moments[3]; //!< order 2 central moments to construct the covariance matrix
......@@ -105,7 +105,7 @@ public:
ERStat* next;
ERStat* prev;
//! wenever the regions is a local maxima of the probability
//! whenever the regions is a local maxima of the probability
bool local_maxima;
ERStat* max_probability_ancestor;
ERStat* min_probability_ancestor;
......@@ -317,7 +317,7 @@ enum erGrouping_Modes {
@param channels Vector of single channel images CV_8UC1 from wich the regions were extracted.
@param regions Vector of ER's retreived from the ERFilter algorithm from each channel.
@param regions Vector of ER's retrieved from the ERFilter algorithm from each channel.
@param groups The output of the algorithm is stored in this parameter as set of lists of indexes to
provided regions.
......@@ -353,7 +353,7 @@ CV_EXPORTS_W void erGrouping(InputArray image, InputArray channel,
@param image Source image CV_8UC1 from which the MSERs where extracted.
@param contours Intput vector with all the contours (vector\<Point\>).
@param contours Input vector with all the contours (vector\<Point\>).
@param regions Output where the ERStat regions are stored.
......
This diff is collapsed.
......@@ -37,7 +37,7 @@ int main(int argc, char* argv[])
return(0);
}
string vocabulary = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // must have the same order as the clasifier output classes
string vocabulary = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // must have the same order as the classifier output classes
Ptr<OCRHMMDecoder::ClassifierCallback> ocr = loadOCRHMMClassifierCNN("OCRBeamSearch_CNN_model_data.xml.gz");
......
......@@ -36,7 +36,7 @@ int main(int argc, char* argv[])
return(0);
}
string vocabulary = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // must have the same order as the clasifier output classes
string vocabulary = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // must have the same order as the classifier output classes
vector<string> lexicon; // a list of words expected to be found on the input image
lexicon.push_back(string("abb"));
lexicon.push_back(string("riser"));
......@@ -53,7 +53,7 @@ int main(int argc, char* argv[])
createOCRHMMTransitionsTable(vocabulary,lexicon,transition_p);
// An alternative would be to load the default generic language model
// (created from ispell 42869 english words list)
// (created from ispell 42869 English words list)
/*Mat transition_p;
string filename = "OCRHMM_transitions_table.xml";
FileStorage fs(filename, FileStorage::READ);
......
......@@ -20,7 +20,7 @@ using namespace std;
using namespace cv;
using namespace cv::text;
//Calculate edit distance netween two words
//Calculate edit distance between two words
size_t edit_distance(const string& A, const string& B);
size_t min(size_t x, size_t y, size_t z);
bool isRepetitive(const string& s);
......@@ -164,7 +164,7 @@ int main(int argc, char* argv[])
cout << "TIME_OCR = " << ((double)getTickCount() - t_r)*1000/getTickFrequency() << endl;
/* Recognition evaluation with (approximate) hungarian matching and edit distances */
/* Recognition evaluation with (approximate) Hungarian matching and edit distances */
if(argc>2)
{
......
......@@ -54,7 +54,7 @@ int main(int argc, char* argv[]) {
else
image.copyTo(mask);
// be sure the mask is a binry image
// be sure the mask is a binary image
cvtColor(mask, mask, COLOR_BGR2GRAY);
threshold(mask, mask, 128., 255, THRESH_BINARY);
......
......@@ -290,7 +290,7 @@ int main(int argc, char* argv[])
{
outputs[i].erase(remove(outputs[i].begin(), outputs[i].end(), '\n'), outputs[i].end());
//cout << "OCR output = \"" << outputs[i] << "\" lenght = " << outputs[i].size() << endl;
//cout << "OCR output = \"" << outputs[i] << "\" length = " << outputs[i].size() << endl;
if (outputs[i].size() < 3)
continue;
......
This diff is collapsed.
......@@ -144,7 +144,7 @@ struct beamSearch_node {
double score;
vector<int> segmentation;
bool expanded;
// TODO calculating score of its childs would be much faster if we store the last column
// TODO calculating score of its child would be much faster if we store the last column
// of their "root" path.
};
......@@ -231,7 +231,7 @@ public:
// TODO if input is a text line (not a word) we may need to split into words here!
// do sliding window classification along a croped word image
// do sliding window classification along a cropped word image
classifier->eval(src, recognition_probabilities, oversegmentation);
// if the number of oversegmentation points found is less than 2 we can not do nothing!!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment