当前位置: 首页>>代码示例>>C++>>正文


C++ BLOB_CHOICE::config方法代码示例

本文整理汇总了C++中BLOB_CHOICE::config方法的典型用法代码示例。如果您正苦于以下问题:C++ BLOB_CHOICE::config方法的具体用法?C++ BLOB_CHOICE::config怎么用?C++ BLOB_CHOICE::config使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BLOB_CHOICE的用法示例。


在下文中一共展示了BLOB_CHOICE::config方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

/**
 * BLOB_CHOICE::BLOB_CHOICE
 *
 * Constructor to build a BLOB_CHOICE from another BLOB_CHOICE.
 */
BLOB_CHOICE::BLOB_CHOICE(const BLOB_CHOICE &other) {
  unichar_id_ = other.unichar_id();
  rating_ = other.rating();
  certainty_ = other.certainty();
  config_ = other.config();
  script_id_ = other.script_id();
}
开发者ID:AngusHardie,项目名称:TesseractOCR-For-Mac,代码行数:12,代码来源:ratngs.cpp

示例2:

/**
 * BLOB_CHOICE::BLOB_CHOICE
 *
 * Constructor to build a BLOB_CHOICE from another BLOB_CHOICE.
 */
BLOB_CHOICE::BLOB_CHOICE(const BLOB_CHOICE &other) {
  unichar_id_ = other.unichar_id();
  rating_ = other.rating();
  certainty_ = other.certainty();
  config_ = other.config();
  config2_ = other.config2();
  script_id_ = other.script_id();
  language_model_state_ = NULL;
}
开发者ID:coffeesam,项目名称:tesseract-ocr,代码行数:14,代码来源:ratngs.cpp

示例3: call_matcher

LIST call_matcher(                  //call a matcher
                  TBLOB *ptblob,    //previous
                  TBLOB *tessblob,  //blob to match
                  TBLOB *ntblob,    //next
                  void *,           //unused parameter
                  TEXTROW *         //always null anyway
                 ) {
  PBLOB *pblob;                  //converted blob
  PBLOB *blob;                   //converted blob
  PBLOB *nblob;                  //converted blob
  LIST result;                   //tess output
  BLOB_CHOICE *choice;           //current choice
  BLOB_CHOICE_LIST ratings;      //matcher result
  BLOB_CHOICE_IT it;             //iterator
  char choice_lengths[2] = {0, 0};

  blob = make_ed_blob (tessblob);//convert blob
  if (blob == NULL) {
    // Since it is actually possible to get a NULL blob here, due to invalid
    // segmentations, fake a really bad classification.
    choice_lengths[0] = strlen(unicharset.id_to_unichar(1));
    return append_choice(NULL, unicharset.id_to_unichar(1), choice_lengths,
                         static_cast<float>(MAX_NUM_INT_FEATURES),
                         static_cast<float>(kReallyBadCertainty), 0);
  }
  pblob = ptblob != NULL ? make_ed_blob (ptblob) : NULL;
  nblob = ntblob != NULL ? make_ed_blob (ntblob) : NULL;
  (*tess_matcher) (pblob, blob, nblob, tess_word, tess_denorm, ratings);
  //match it
  delete blob;                   //don't need that now
  if (pblob != NULL)
    delete pblob;
  if (nblob != NULL)
    delete nblob;
  it.set_to_list (&ratings);     //get list
  result = NULL;
  for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
    choice = it.data ();
    choice_lengths[0] = strlen(choice->unichar ());
    result = append_choice (result, choice->unichar (),
                            choice_lengths, choice->rating (),
                            choice->certainty (), choice->config ());
  }
  return result;                 //converted list
}
开发者ID:chanchai,项目名称:botker,代码行数:45,代码来源:tfacepp.cpp


注:本文中的BLOB_CHOICE::config方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。