795 if (norm_box !=
nullptr) word_box = *norm_box;
796 float word_middle = (word_box.
left() + word_box.
right()) / 2.0f;
797 float input_y_offset = 0.0f;
800 if (row ==
nullptr) {
801 word_middle = word_box.
left();
802 input_y_offset = word_box.
bottom();
803 final_y_offset = 0.0f;
805 input_y_offset = row->
base_line(word_middle) + baseline_shift;
810 float mid_x = (blob_box.
left() + blob_box.
right()) / 2.0f;
812 float blob_scale = scale;
816 scale, scale * 1.5f);
817 }
else if (row !=
nullptr) {
827 blob_scale, 0.0f, final_y_offset, inverse, pix);
829 if (word_denorm !=
nullptr) {
831 input_y_offset, scale, scale, 0.0f,
GenericVector< TBLOB * > blobs
const int kBlnBaselineOffset
void set_inverse(bool value)
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)
float base_line(float xpos) const
void SetupNormalization(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)
TBOX bounding_box() const
void 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)
TBOX bounding_box() const