本文整理汇总了C++中TESSLINE::Normalize方法的典型用法代码示例。如果您正苦于以下问题:C++ TESSLINE::Normalize方法的具体用法?C++ TESSLINE::Normalize怎么用?C++ TESSLINE::Normalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TESSLINE
的用法示例。
在下文中一共展示了TESSLINE::Normalize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Normalize
// Sets up the built-in DENORM and normalizes the blob in-place.
// For parameters see DENORM::SetupNormalization, plus the inverse flag for
// this blob and the Pix for the full image.
void TBLOB::Normalize(const BLOCK* block,
const FCOORD* rotation,
const DENORM* predecessor,
float x_origin, float y_origin,
float x_scale, float y_scale,
float final_xshift, float final_yshift,
bool inverse, Pix* pix) {
denorm_.SetupNormalization(block, rotation, predecessor, x_origin, y_origin,
x_scale, y_scale, final_xshift, final_yshift);
denorm_.set_inverse(inverse);
denorm_.set_pix(pix);
// TODO(rays) outline->Normalize is more accurate, but breaks tests due
// the changes it makes. Reinstate this code with a retraining.
// The reason this change is troublesome is that it normalizes for the
// baseline value computed independently at each x-coord. If the baseline
// is not horizontal, this introduces shear into the normalized blob, which
// is useful on the rare occasions that the baseline is really curved, but
// the baselines need to be stabilized the rest of the time.
#if 0
for (TESSLINE* outline = outlines; outline != NULL; outline = outline->next) {
outline->Normalize(denorm_);
}
#else
denorm_.LocalNormBlob(this);
#endif
}
示例2: Normalize
// Normalize in-place using the DENORM.
void TBLOB::Normalize(const DENORM& denorm) {
// TODO(rays) outline->Normalize is more accurate, but breaks tests due
// the changes it makes. Reinstate this code with a retraining.
#if 1
for (TESSLINE* outline = outlines; outline != NULL; outline = outline->next) {
outline->Normalize(denorm);
}
#else
denorm.LocalNormBlob(this);
#endif
}