$search
#include <text_detect.h>
Classes | |
| struct | bgr |
| struct | Pair |
| struct | Word |
Public Member Functions | |
| void | detect (Mat &image) |
| void | detect (string filename) |
| DetectText () | |
| vector< Rect > & | getBoxesBothSides () |
| Mat & | getDetection () |
| vector< string > & | getWords () |
| void | readLetterCorrelation (const char *filename) |
| void | readWordList (const char *filename) |
| void | testEditDistance () |
| void | testGetCorrelationIndex () |
| void | testInsertToList () |
| void | testMergePairs () |
| ~DetectText () | |
Public Attributes | |
| std::vector< Rotated > | rotated |
Private Types | |
| enum | FontColor { BRIGHT = 1, DARK = 2 } |
| enum | Mode { IMAGE = 1, STREAM = 2 } |
| enum | Purpose { UPDATE = 1, REFINE = 2 } |
| enum | Result { COARSE = 1, FINE = 2 } |
Private Member Functions | |
| void | chainPairs (Mat &ccmap) |
| void | chainToBox (vector< vector< int > > &chain, vector< Rect > &boundingBox) |
| int | connectComponentAnalysis (const Mat &swtmap, Mat &ccmap) |
| int | countInnerLetterCandidates (bool *array) |
| void | detect () |
| void | disposal () |
| float | editDistanceFont (const string &s, const string &t) |
| void | filterBoundingBoxes (vector< Rect > &boundingBoxes, Mat &ccmap, int rejectRatio) |
| Mat | filterPatch (const Mat &patch) |
| void | findRotationangles (int blackWhite) |
| int | getCorrelationIndex (char letter) |
| float | getMeanIntensity (const Mat &ccmap, const Rect &rect, int element) |
| float | getMedianStrokeWidth (const Mat &ccmap, const Mat &swtmap, const Rect &rect, int element) |
| void | getNearestWord (const string &str, string &nearestWord) |
| void | getTopkWords (const string &str, const int k, vector< Word > &words) |
| void | groupLetters (const Mat &swtmap, const Mat &ccmap) |
| void | identifyLetters (const Mat &swtmap, const Mat &ccmap) |
| int | ImageAdjust (IplImage *src, IplImage *dst, double low, double high, double bottom, double top, double gamma) |
| float | insertToList (vector< Word > &words, Word &word) |
| void | merge (const vector< int > &token, vector< int > &chain) |
| bool | mergePairs (const vector< vector< int > > &initialChains, vector< vector< int > > &chains) |
| void | mergePairs (const vector< Pair > &groups, vector< vector< int > > &chains) |
| float | ocrRead (const Mat &imagePatch, string &output, int actual) |
| void | ocrRead (vector< Rect > &boundingBoxes) |
| void | overlapBoundingBoxes (vector< Rect > &boundingBoxes) |
| void | overlayText (vector< Rect > &box, vector< string > &text) |
| void | pipeline (int blackWhite) |
| void | preprocess (Mat &image) |
| void | showBoundingBoxes (vector< Rect > &boxes, vector< bool > &text) |
| void | showBoundingBoxes (vector< Rect > &boxes) |
| void | showCcmap (Mat &ccmap) |
| void | showEdgeMap () |
| void | showLetterDetection () |
| void | showLetterGroup () |
| void | showSwtmap (Mat &swtmap) |
| float | spellCheck (string &str, string &output, int method) |
| void | strokeWidthTransform (const Mat &image, Mat &swtmap, int searchDirection) |
| void | testEdgePoints (vector< Point > &edgepoints) |
| string & | trim (string &str) |
| void | updateStrokeWidth (Mat &swtmap, vector< Point > &startPoints, vector< Point > &strokePoints, int searchDirection, Purpose purpose) |
Static Private Member Functions | |
| static int | editDistance (const string &s, const string &t) |
| static bool | spaticalOrder (Rect a, Rect b) |
Private Attributes | |
| vector< Rect > | boundingBoxes_ |
| vector< Rect > | boxesBothSides_ |
| vector< float > | boxesScores_ |
| vector< bool > | boxInbox_ |
| float * | componentsMeanIntensity_ |
| float * | componentsMedianStrokeWidth_ |
| vector< Rect > | componentsRoi_ |
| Mat | correlation_ |
| Mat | detection_ |
| Mat | edgemap_ |
| vector< Point > | edgepoints_ |
| bool | eval |
| string | filename_ |
| bool | firstPass_ |
| FontColor | fontColor_ |
| vector< vector< int > > | horizontalChains_ |
| vector< Pair > | horizontalLetterGroups_ |
| Mat | image_ |
| float | initialStrokeWidth_ |
| vector< bool * > | innerComponents_ |
| bool * | isGrouped_ |
| bool * | isLetterComponects_ |
| float | maxLetterHeight_ |
| float | maxStrokeWidth_ |
| float | minLetterHeight_ |
| Mode | mode_ |
| size_t | nComponent_ |
| Mat | originalImage_ |
| string | outputPrefix_ |
| Result | result_ |
| int | textDisplayOffset_ |
| Mat | theta_ |
| vector< vector< int > > | verticalChains_ |
| vector< Pair > | verticalLetterGroups_ |
| vector< string > | wordList_ |
| vector< string > | wordsBothSides_ |
Definition at line 26 of file text_detect.h.
enum DetectText::FontColor [private] |
Definition at line 67 of file text_detect.h.
enum DetectText::Mode [private] |
Definition at line 62 of file text_detect.h.
enum DetectText::Purpose [private] |
Definition at line 72 of file text_detect.h.
enum DetectText::Result [private] |
Definition at line 77 of file text_detect.h.
| DetectText::DetectText | ( | ) |
Definition at line 25 of file text_detect.cpp.
| DetectText::~DetectText | ( | ) |
Definition at line 30 of file text_detect.cpp.
| void DetectText::chainPairs | ( | Mat & | ccmap | ) | [private] |
Definition at line 707 of file text_detect.cpp.
| void DetectText::chainToBox | ( | vector< vector< int > > & | chain, | |
| vector< Rect > & | boundingBox | |||
| ) | [private] |
Definition at line 967 of file text_detect.cpp.
| int DetectText::connectComponentAnalysis | ( | const Mat & | swtmap, | |
| Mat & | ccmap | |||
| ) | [private] |
Definition at line 364 of file text_detect.cpp.
| int DetectText::countInnerLetterCandidates | ( | bool * | array | ) | [inline, private] |
Definition at line 1665 of file text_detect.cpp.
| void DetectText::detect | ( | ) | [private] |
Definition at line 55 of file text_detect.cpp.
| void DetectText::detect | ( | Mat & | image | ) |
Definition at line 47 of file text_detect.cpp.
| void DetectText::detect | ( | string | filename | ) |
Definition at line 34 of file text_detect.cpp.
| void DetectText::disposal | ( | ) | [private] |
Definition at line 1424 of file text_detect.cpp.
| int DetectText::editDistance | ( | const string & | s, | |
| const string & | t | |||
| ) | [static, private] |
Definition at line 1929 of file text_detect.cpp.
| float DetectText::editDistanceFont | ( | const string & | s, | |
| const string & | t | |||
| ) | [private] |
Definition at line 1839 of file text_detect.cpp.
| void DetectText::filterBoundingBoxes | ( | vector< Rect > & | boundingBoxes, | |
| Mat & | ccmap, | |||
| int | rejectRatio | |||
| ) | [private] |
Definition at line 1005 of file text_detect.cpp.
| Mat DetectText::filterPatch | ( | const Mat & | patch | ) | [private] |
Definition at line 1416 of file text_detect.cpp.
| void DetectText::findRotationangles | ( | int | blackWhite | ) | [private] |
Definition at line 770 of file text_detect.cpp.
| vector< Rect > & DetectText::getBoxesBothSides | ( | ) |
Definition at line 163 of file text_detect.cpp.
| int DetectText::getCorrelationIndex | ( | char | letter | ) | [private] |
Definition at line 1909 of file text_detect.cpp.
| Mat & DetectText::getDetection | ( | ) |
Definition at line 154 of file text_detect.cpp.
| float DetectText::getMeanIntensity | ( | const Mat & | ccmap, | |
| const Rect & | rect, | |||
| int | element | |||
| ) | [private] |
Definition at line 1678 of file text_detect.cpp.
| float DetectText::getMedianStrokeWidth | ( | const Mat & | ccmap, | |
| const Mat & | swtmap, | |||
| const Rect & | rect, | |||
| int | element | |||
| ) | [private] |
Definition at line 1700 of file text_detect.cpp.
| void DetectText::getNearestWord | ( | const string & | str, | |
| string & | nearestWord | |||
| ) | [private] |
Definition at line 1487 of file text_detect.cpp.
| void DetectText::getTopkWords | ( | const string & | str, | |
| const int | k, | |||
| vector< Word > & | words | |||
| ) | [private] |
Definition at line 1510 of file text_detect.cpp.
| vector< string > & DetectText::getWords | ( | ) |
Definition at line 158 of file text_detect.cpp.
| void DetectText::groupLetters | ( | const Mat & | swtmap, | |
| const Mat & | ccmap | |||
| ) | [private] |
!! without rule 1 and 3, on the second picture more is recognized
Definition at line 586 of file text_detect.cpp.
| void DetectText::identifyLetters | ( | const Mat & | swtmap, | |
| const Mat & | ccmap | |||
| ) | [private] |
Definition at line 471 of file text_detect.cpp.
| int DetectText::ImageAdjust | ( | IplImage * | src, | |
| IplImage * | dst, | |||
| double | low, | |||
| double | high, | |||
| double | bottom, | |||
| double | top, | |||
| double | gamma | |||
| ) | [private] |
Definition at line 1531 of file text_detect.cpp.
| void DetectText::merge | ( | const vector< int > & | token, | |
| vector< int > & | chain | |||
| ) | [private] |
Definition at line 1825 of file text_detect.cpp.
| bool DetectText::mergePairs | ( | const vector< vector< int > > & | initialChains, | |
| vector< vector< int > > & | chains | |||
| ) | [private] |
Definition at line 1758 of file text_detect.cpp.
| void DetectText::mergePairs | ( | const vector< Pair > & | groups, | |
| vector< vector< int > > & | chains | |||
| ) | [private] |
Definition at line 1727 of file text_detect.cpp.
| float DetectText::ocrRead | ( | const Mat & | imagePatch, | |
| string & | output, | |||
| int | actual | |||
| ) | [private] |
Definition at line 1164 of file text_detect.cpp.
| void DetectText::ocrRead | ( | vector< Rect > & | boundingBoxes | ) | [private] |
Definition at line 1129 of file text_detect.cpp.
| void DetectText::overlapBoundingBoxes | ( | vector< Rect > & | boundingBoxes | ) | [private] |
Definition at line 1055 of file text_detect.cpp.
| void DetectText::overlayText | ( | vector< Rect > & | box, | |
| vector< string > & | text | |||
| ) | [private] |
Definition at line 1093 of file text_detect.cpp.
| void DetectText::pipeline | ( | int | blackWhite | ) | [private] |
Definition at line 168 of file text_detect.cpp.
| void DetectText::preprocess | ( | Mat & | image | ) | [private] |
Definition at line 111 of file text_detect.cpp.
| void DetectText::readLetterCorrelation | ( | const char * | filename | ) |
Definition at line 1441 of file text_detect.cpp.
| void DetectText::readWordList | ( | const char * | filename | ) |
Definition at line 1457 of file text_detect.cpp.
| void DetectText::showBoundingBoxes | ( | vector< Rect > & | boxes, | |
| vector< bool > & | text | |||
| ) | [private] |
Definition at line 1650 of file text_detect.cpp.
| void DetectText::showBoundingBoxes | ( | vector< Rect > & | boxes | ) | [private] |
Definition at line 1639 of file text_detect.cpp.
| void DetectText::showCcmap | ( | Mat & | ccmap | ) | [private] |
Definition at line 1565 of file text_detect.cpp.
| void DetectText::showEdgeMap | ( | ) | [private] |
Definition at line 1559 of file text_detect.cpp.
| void DetectText::showLetterDetection | ( | ) | [private] |
Definition at line 1588 of file text_detect.cpp.
| void DetectText::showLetterGroup | ( | ) | [private] |
Definition at line 1616 of file text_detect.cpp.
| void DetectText::showSwtmap | ( | Mat & | swtmap | ) | [private] |
Definition at line 1580 of file text_detect.cpp.
| bool DetectText::spaticalOrder | ( | Rect | a, | |
| Rect | b | |||
| ) | [static, private] |
Definition at line 1000 of file text_detect.cpp.
| float DetectText::spellCheck | ( | string & | str, | |
| string & | output, | |||
| int | method | |||
| ) | [private] |
Definition at line 1237 of file text_detect.cpp.
| void DetectText::strokeWidthTransform | ( | const Mat & | image, | |
| Mat & | swtmap, | |||
| int | searchDirection | |||
| ) | [private] |
Definition at line 230 of file text_detect.cpp.
| void DetectText::testEdgePoints | ( | vector< Point > & | edgepoints | ) | [private] |
Definition at line 2040 of file text_detect.cpp.
| void DetectText::testEditDistance | ( | ) |
Definition at line 1976 of file text_detect.cpp.
| void DetectText::testGetCorrelationIndex | ( | ) |
Definition at line 1966 of file text_detect.cpp.
| void DetectText::testInsertToList | ( | ) |
Definition at line 1987 of file text_detect.cpp.
| void DetectText::testMergePairs | ( | ) |
Definition at line 2005 of file text_detect.cpp.
| string & DetectText::trim | ( | string & | str | ) | [private] |
Definition at line 1470 of file text_detect.cpp.
| void DetectText::updateStrokeWidth | ( | Mat & | swtmap, | |
| vector< Point > & | startPoints, | |||
| vector< Point > & | strokePoints, | |||
| int | searchDirection, | |||
| Purpose | purpose | |||
| ) | [private] |
Definition at line 267 of file text_detect.cpp.
vector<Rect> DetectText::boundingBoxes_ [private] |
Definition at line 243 of file text_detect.h.
vector<Rect> DetectText::boxesBothSides_ [private] |
Definition at line 224 of file text_detect.h.
vector<float> DetectText::boxesScores_ [private] |
Definition at line 226 of file text_detect.h.
vector<bool> DetectText::boxInbox_ [private] |
Definition at line 228 of file text_detect.h.
float* DetectText::componentsMeanIntensity_ [private] |
Definition at line 245 of file text_detect.h.
float* DetectText::componentsMedianStrokeWidth_ [private] |
Definition at line 246 of file text_detect.h.
vector<Rect> DetectText::componentsRoi_ [private] |
Definition at line 233 of file text_detect.h.
Mat DetectText::correlation_ [private] |
Definition at line 220 of file text_detect.h.
Mat DetectText::detection_ [private] |
Definition at line 212 of file text_detect.h.
Mat DetectText::edgemap_ [private] |
Definition at line 215 of file text_detect.h.
vector<Point> DetectText::edgepoints_ [private] |
Definition at line 218 of file text_detect.h.
bool DetectText::eval [private] |
Definition at line 207 of file text_detect.h.
string DetectText::filename_ [private] |
Definition at line 252 of file text_detect.h.
bool DetectText::firstPass_ [private] |
Definition at line 217 of file text_detect.h.
FontColor DetectText::fontColor_ [private] |
Definition at line 230 of file text_detect.h.
vector<vector<int> > DetectText::horizontalChains_ [private] |
Definition at line 240 of file text_detect.h.
vector<Pair> DetectText::horizontalLetterGroups_ [private] |
Definition at line 238 of file text_detect.h.
Mat DetectText::image_ [private] |
Definition at line 211 of file text_detect.h.
float DetectText::initialStrokeWidth_ [private] |
Definition at line 214 of file text_detect.h.
vector<bool*> DetectText::innerComponents_ [private] |
Definition at line 236 of file text_detect.h.
bool* DetectText::isGrouped_ [private] |
Definition at line 235 of file text_detect.h.
bool* DetectText::isLetterComponects_ [private] |
Definition at line 234 of file text_detect.h.
float DetectText::maxLetterHeight_ [private] |
Definition at line 249 of file text_detect.h.
float DetectText::maxStrokeWidth_ [private] |
Definition at line 213 of file text_detect.h.
float DetectText::minLetterHeight_ [private] |
Definition at line 250 of file text_detect.h.
Mode DetectText::mode_ [private] |
Definition at line 222 of file text_detect.h.
size_t DetectText::nComponent_ [private] |
Definition at line 248 of file text_detect.h.
Mat DetectText::originalImage_ [private] |
Definition at line 210 of file text_detect.h.
string DetectText::outputPrefix_ [private] |
Definition at line 253 of file text_detect.h.
Result DetectText::result_ [private] |
Definition at line 231 of file text_detect.h.
| std::vector<Rotated> DetectText::rotated |
Definition at line 32 of file text_detect.h.
int DetectText::textDisplayOffset_ [private] |
Definition at line 255 of file text_detect.h.
Mat DetectText::theta_ [private] |
Definition at line 216 of file text_detect.h.
vector<vector<int> > DetectText::verticalChains_ [private] |
Definition at line 241 of file text_detect.h.
vector<Pair> DetectText::verticalLetterGroups_ [private] |
Definition at line 239 of file text_detect.h.
vector<string> DetectText::wordList_ [private] |
Definition at line 221 of file text_detect.h.
vector<string> DetectText::wordsBothSides_ [private] |
Definition at line 225 of file text_detect.h.