Definition at line 709 of file paragraphs.cpp.
◆ SimpleClusterer()
tesseract::SimpleClusterer::SimpleClusterer |
( |
int |
max_cluster_width | ) |
|
|
inlineexplicit |
Definition at line 711 of file paragraphs.cpp.
711: max_cluster_width_(max_cluster_width) {}
◆ Add()
void tesseract::SimpleClusterer::Add |
( |
int |
value | ) |
|
|
inline |
◆ GetClusters()
void tesseract::SimpleClusterer::GetClusters |
( |
std::vector< Cluster > * |
clusters | ) |
|
Definition at line 736 of file paragraphs.cpp.
736 {
737 clusters->clear();
738 std::sort(values_.begin(), values_.end());
739 for (
unsigned i = 0;
i < values_.size();) {
742 int hi = lo;
743 while (++
i < values_.size() && values_[
i] <= lo + max_cluster_width_) {
745 }
746 clusters->push_back(Cluster((hi + lo) / 2,
i - orig_i));
747 }
748}
◆ size()
size_t tesseract::SimpleClusterer::size |
( |
| ) |
const |
|
inline |
Definition at line 715 of file paragraphs.cpp.
715 {
716 return values_.size();
717 }
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccmain/paragraphs.cpp