Skip to content

Commit 3a05c24

Browse files
committed
Update doc for text module
1 parent 067b0a6 commit 3a05c24

File tree

4 files changed

+47
-36
lines changed

4 files changed

+47
-36
lines changed

modules/text/doc/text.bib

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@inproceedings{Neumann12,
2+
title={Scene Text Localization and Recognition},
3+
author={Neumann and L., Matas and J.},
4+
journal={ Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on},
5+
pages={3538--3545},
6+
year={2012},
7+
organization={IEEE}
8+
}
9+
@inproceedings{Neumann11,
10+
author = {Lukáš Neumann and Jiří Matas},
11+
title = {Text localization in real-world images using efficiently pruned exhaustive search},
12+
booktitle = {in Document Analysis and Recognition, 2011 International Conference on. IEEE, 2011},
13+
year = {},
14+
pages = {687--691}
15+
}
16+
@inproceedings{Gomez13,
17+
author = {G\'{o}mez, Llu\'{\i}s and Karatzas, Dimosthenis},
18+
title={Multi-script Text Extraction from Natural Scenes},
19+
booktitle = {Proceedings of the 2013 12th International Conference on Document Analysis and Recognition},
20+
series = {ICDAR '13},
21+
year = {2013},
22+
isbn = {978-0-7695-4999-6},
23+
pages = {467--471},
24+
publisher = {IEEE Computer Society}
25+
}
26+
@article{Gomez14,
27+
author = {Lluis Gomez i Bigorda and
28+
Dimosthenis Karatzas},
29+
title = {A Fast Hierarchical Method for Multi-script and Arbitrary Oriented
30+
Scene Text Extraction},
31+
journal = {CoRR},
32+
volume = {abs/1407.7504},
33+
year = {2014},
34+
}

modules/text/include/opencv2/text.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Class-specific Extremal Regions for Scene Text Detection
5454
--------------------------------------------------------
5555
5656
The scene text detection algorithm described below has been initially proposed by Lukás Neumann &
57-
Jiri Matas [Neumann12]. The main idea behind Class-specific Extremal Regions is similar to the MSER
57+
Jiri Matas @cite Neumann11. The main idea behind Class-specific Extremal Regions is similar to the MSER
5858
in that suitable Extremal Regions (ERs) are selected from the whole component tree of the image.
5959
However, this technique differs from MSER in that selection of suitable ERs is done by a sequential
6060
classifier trained for character detection, i.e. dropping the stability requirement of MSERs and
@@ -87,9 +87,9 @@ order to increase the character localization recall.
8787
8888
After the ER filtering is done on each input channel, character candidates must be grouped in
8989
high-level text blocks (i.e. words, text lines, paragraphs, ...). The opencv_text module implements
90-
two different grouping algorithms: the Exhaustive Search algorithm proposed in [Neumann11] for
90+
two different grouping algorithms: the Exhaustive Search algorithm proposed in @cite Neumann12 for
9191
grouping horizontally aligned text, and the method proposed by Lluis Gomez and Dimosthenis Karatzas
92-
in [Gomez13][Gomez14] for grouping arbitrary oriented text (see erGrouping).
92+
in @cite Gomez13 @cite Gomez14 for grouping arbitrary oriented text (see erGrouping).
9393
9494
To see the text detector at work, have a look at the textdetection demo:
9595
<https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/textdetection.cpp>

modules/text/include/opencv2/text/erfilter.hpp

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct CV_EXPORTS ERStat
111111
ERStat* min_probability_ancestor;
112112
};
113113

114-
/** @brief Base class for 1st and 2nd stages of Neumann and Matas scene text detection algorithm [Neumann12]. :
114+
/** @brief Base class for 1st and 2nd stages of Neumann and Matas scene text detection algorithm @cite Neumann12. :
115115
116116
Extracts the component tree (if needed) and filter the extremal regions (ER's) by using a given classifier.
117117
*/
@@ -163,31 +163,8 @@ class CV_EXPORTS_W ERFilter : public Algorithm
163163
};
164164

165165

166-
/*!
167-
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm
168-
Neumann L., Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012
169-
170-
The component tree of the image is extracted by a threshold increased step by step
171-
from 0 to 255, incrementally computable descriptors (aspect_ratio, compactness,
172-
number of holes, and number of horizontal crossings) are computed for each ER
173-
and used as features for a classifier which estimates the class-conditional
174-
probability P(er|character). The value of P(er|character) is tracked using the inclusion
175-
relation of ER across all thresholds and only the ERs which correspond to local maximum
176-
of the probability P(er|character) are selected (if the local maximum of the
177-
probability is above a global limit pmin and the difference between local maximum and
178-
local minimum is greater than minProbabilityDiff).
179-
180-
@param cb – Callback with the classifier. Default classifier can be implicitly load with function
181-
loadClassifierNM1(), e.g. from file in samples/cpp/trained_classifierNM1.xml
182-
@param thresholdDelta – Threshold step in subsequent thresholds when extracting the component tree
183-
@param minArea – The minimum area (% of image size) allowed for retreived ER’s
184-
@param maxArea – The maximum area (% of image size) allowed for retreived ER’s
185-
@param minProbability – The minimum probability P(er|character) allowed for retreived ER’s
186-
@param nonMaxSuppression – Whenever non-maximum suppression is done over the branch probabilities
187-
@param minProbabilityDiff – The minimum probability difference between local maxima and local minima ERs
188-
*/
189-
190-
/** @brief Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12].
166+
167+
/** @brief Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm @cite Neumann12.
191168
192169
@param cb : Callback with the classifier. Default classifier can be implicitly load with function
193170
loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml
@@ -213,7 +190,7 @@ CV_EXPORTS_W Ptr<ERFilter> createERFilterNM1(const Ptr<ERFilter::Callback>& cb,
213190
bool nonMaxSuppression = true,
214191
float minProbabilityDiff = (float)0.1);
215192

216-
/** @brief Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12].
193+
/** @brief Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm @cite Neumann12.
217194
218195
@param cb : Callback with the classifier. Default classifier can be implicitly load with function
219196
loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml
@@ -268,7 +245,7 @@ enum { ERFILTER_NM_RGBLGrad,
268245
ERFILTER_NM_IHSGrad
269246
};
270247

271-
/** @brief Compute the different channels to be processed independently in the N&M algorithm [Neumann12].
248+
/** @brief Compute the different channels to be processed independently in the N&M algorithm @cite Neumann12.
272249
273250
@param _src Source image. Must be RGB CV_8UC3.
274251
@@ -289,7 +266,7 @@ CV_EXPORTS_W void computeNMChannels(InputArray _src, CV_OUT OutputArrayOfArrays
289266
//! text::erGrouping operation modes
290267
enum erGrouping_Modes {
291268

292-
/** Exhaustive Search algorithm proposed in [Neumann11] for grouping horizontally aligned text.
269+
/** Exhaustive Search algorithm proposed in @cite Neumann11 for grouping horizontally aligned text.
293270
The algorithm models a verification function for all the possible ER sequences. The
294271
verification fuction for ER pairs consists in a set of threshold-based pairwise rules which
295272
compare measurements of two regions (height ratio, centroid angle, and region distance). The
@@ -300,7 +277,7 @@ enum erGrouping_Modes {
300277
consistent.
301278
*/
302279
ERGROUPING_ORIENTATION_HORIZ,
303-
/** Text grouping method proposed in [Gomez13][Gomez14] for grouping arbitrary oriented text. Regions
280+
/** Text grouping method proposed in @cite Gomez13 @cite Gomez14 for grouping arbitrary oriented text. Regions
304281
are agglomerated by Single Linkage Clustering in a weighted feature space that combines proximity
305282
(x,y coordinates) and similarity measures (color, size, gradient magnitude, stroke width, etc.).
306283
SLC provides a dendrogram where each node represents a text group hypothesis. Then the algorithm
@@ -375,8 +352,8 @@ CV_EXPORTS_W void detectRegions(InputArray image, const Ptr<ERFilter>& er_filter
375352
/** @brief Extracts text regions from image.
376353
377354
@param image Source image where text blocks needs to be extracted from. Should be CV_8UC3 (color).
378-
@param er_filter1 Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12]
379-
@param er_filter2 Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12]
355+
@param er_filter1 Extremal Region Filter for the 1st stage classifier of N&M algorithm @cite Neumann12
356+
@param er_filter2 Extremal Region Filter for the 2nd stage classifier of N&M algorithm @cite Neumann12
380357
@param groups_rects Output list of rectangle blocks with text
381358
@param method Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY.
382359
@param filename The XML or YAML file with the classifier model (e.g. samples/trained_classifier_erGrouping.xml). Only to use when grouping method is ERGROUPING_ORIENTATION_ANY.

modules/text/include/opencv2/text/ocr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class CV_EXPORTS_W OCRTesseract : public BaseOCR
128128
recognition of individual text elements found (e.g. words or text lines).
129129
@param component_confidences If provided the method will output a list of confidence values
130130
for the recognition of individual text elements found (e.g. words or text lines).
131-
@param component_level OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXT_LINE.
131+
@param component_level OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXTLINE.
132132
*/
133133
virtual void run(Mat& image, std::string& output_text, std::vector<Rect>* component_rects=NULL,
134134
std::vector<std::string>* component_texts=NULL, std::vector<float>* component_confidences=NULL,

0 commit comments

Comments
 (0)