src/textord/textlineprojection.cpp
void TextlineProjection::MoveNonTextlineBlobs(BLOBNBOX_LIST *blobs,
                                              BLOBNBOX_LIST *small_blobs) const {
  BLOBNBOX_IT it(blobs);
  BLOBNBOX_IT small_it(small_blobs);
  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
    BLOBNBOX *blob = it.data();
    const TBOX &box = blob->bounding_box();
    bool debug = AlignedBlob::WithinTestRegion(2, box.left(), box.bottom());
    if (BoxOutOfHTextline(box, nullptr, debug) && !blob->UniquelyVertical()) {
      blob->ClearNeighbours();
      small_it.add_to_end(it.extract());
    }
  }
}
// Moves blobs that look like they don't sit well on a textline from the
// input blobs list to the output small_blobs list.
// This gets them away from initial textline finding to stop diacritics
// from forming incorrect textlines. (Introduced mainly to fix Thai.)
Moves blobs that look like they don't sit well on a textline from the
input blobs list to the output small_blobs list.
This gets them away from initial textline finding to stop diacritics
from forming incorrect textlines. (Introduced mainly to fix Thai.)
Moves blobs that look like they don ' t sit well on a textline from the input blobs list to the output small_blobs list . This gets them away from initial textline finding to stop diacritics from forming incorrect textlines . ( Introduced mainly to fix Thai . )
void TextlineProjection::MoveNonTextlineBlobs(BLOBNBOX_LIST *blobs,
                                              BLOBNBOX_LIST *small_blobs) const {
  BLOBNBOX_IT it(blobs);
  BLOBNBOX_IT small_it(small_blobs);
  for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
    BLOBNBOX *blob = it.data();
    const TBOX &box = blob->bounding_box();
    bool debug = AlignedBlob::WithinTestRegion(2, box.left(), box.bottom());
    if (BoxOutOfHTextline(box, nullptr, debug) && !blob->UniquelyVertical()) {
      blob->ClearNeighbours();
      small_it.add_to_end(it.extract());
    }
  }
}
void TextlineProjection :: MoveNonTextlineBlobs ( BLOBNBOX_LIST * blobs , BLOBNBOX_LIST * small_blobs ) const { BLOBNBOX_IT it ( blobs ) ; BLOBNBOX_IT small_it ( small_blobs ) ; for ( it . mark_cycle_pt ( ) ; ! it . cycled_list ( ) ; it . forward ( ) ) { BLOBNBOX * blob = it . data ( ) ; const TBOX & box = blob -> bounding_box ( ) ; bool debug = AlignedBlob :: WithinTestRegion ( 2 , box . left ( ) , box . bottom ( ) ) ; if ( BoxOutOfHTextline ( box , nullptr , debug ) && ! blob -> UniquelyVertical ( ) ) { blob -> ClearNeighbours ( ) ; small_it . add_to_end ( it . extract ( ) ) ; } } }
Moves blobs that look like they don't sit well on a textline from the
input blobs list to the output small_blobs list.
Moves blobs that look like they don ' t sit well on a textline from the input blobs list to the output small_blobs list .