src/ccstruct/pageres.cpp
void WERD_RES::InsertSeam(int blob_number, SEAM *seam) {
  // Insert the seam into the SEAMS array.
  seam->PrepareToInsertSeam(seam_array, chopped_word->blobs, blob_number, true);
  seam_array.insert(seam_array.begin() + blob_number, seam);
  if (ratings != nullptr) {
    // Expand the ratings matrix.
    ratings = ratings->ConsumeAndMakeBigger(blob_number);
    // Fix all the segmentation states.
    if (raw_choice != nullptr) {
      raw_choice->UpdateStateForSplit(blob_number);
    }
    WERD_CHOICE_IT wc_it(&best_choices);
    for (wc_it.mark_cycle_pt(); !wc_it.cycled_list(); wc_it.forward()) {
      WERD_CHOICE *choice = wc_it.data();
      choice->UpdateStateForSplit(blob_number);
    }
    SetupBlobWidthsAndGaps();
  }
}
// Updates internal data to account for a new SEAM (chop) at the given
// blob_number. Fixes the ratings matrix and states in the choices, as well
// as the blob widths and gaps.
Updates internal data to account for a new SEAM (chop) at the given
blob_number. Fixes the ratings matrix and states in the choices, as well
as the blob widths and gaps.
Updates internal data to account for a new SEAM ( chop ) at the given blob_number . Fixes the ratings matrix and states in the choices as well as the blob widths and gaps .
void WERD_RES::InsertSeam(int blob_number, SEAM *seam) {
  seam->PrepareToInsertSeam(seam_array, chopped_word->blobs, blob_number, true);
  seam_array.insert(seam_array.begin() + blob_number, seam);
  if (ratings != nullptr) {
    ratings = ratings->ConsumeAndMakeBigger(blob_number);
    if (raw_choice != nullptr) {
      raw_choice->UpdateStateForSplit(blob_number);
    }
    WERD_CHOICE_IT wc_it(&best_choices);
    for (wc_it.mark_cycle_pt(); !wc_it.cycled_list(); wc_it.forward()) {
      WERD_CHOICE *choice = wc_it.data();
      choice->UpdateStateForSplit(blob_number);
    }
    SetupBlobWidthsAndGaps();
  }
}
void WERD_RES :: InsertSeam ( int blob_number , SEAM * seam ) { seam -> PrepareToInsertSeam ( seam_array , chopped_word -> blobs , blob_number , true ) ; seam_array . insert ( seam_array . begin ( ) + blob_number , seam ) ; if ( ratings != nullptr ) { ratings = ratings -> ConsumeAndMakeBigger ( blob_number ) ; if ( raw_choice != nullptr ) { raw_choice -> UpdateStateForSplit ( blob_number ) ; } WERD_CHOICE_IT wc_it ( & best_choices ) ; for ( wc_it . mark_cycle_pt ( ) ; ! wc_it . cycled_list ( ) ; wc_it . forward ( ) ) { WERD_CHOICE * choice = wc_it . data ( ) ; choice -> UpdateStateForSplit ( blob_number ) ; } SetupBlobWidthsAndGaps ( ) ; } }
Updates internal data to account for a new SEAM (chop) at the given
blob_number.
Updates internal data to account for a new SEAM ( chop ) at the given blob_number .
// Insert the seam into the SEAMS array. // Expand the ratings matrix. // Fix all the segmentation states.