24 #include "config_auto.h" 68 float max_total_priority)
const;
74 for (
int s = 0; s < num_splits_; ++s) {
83 for (
int s = 0; s < num_splits_; ++s) {
84 if (splits_[s].
UsesPoint(point))
return true;
90 for (
int s = 0; s < num_splits_; ++s) {
91 for (
int t = 0; t < other.num_splits_; ++t)
98 for (
int s = 0; s < num_splits_; ++s) {
100 for (
int t = 0; t < other.num_splits_; ++t) {
102 if (split1_box.
y_overlap(split2_box))
return true;
111 for (
int s = 0; s < num_splits_; ++s) {
120 bool IsHealthy(
const TBLOB& blob,
int min_points,
int min_area)
const;
142 void Print(
const char* label)
const;
145 #ifndef GRAPHICS_DISABLED 169 float FullPriority(
int xmin,
int xmax,
double overlap_knob,
170 int centered_maxwidth,
double center_knob,
171 double width_change_knob)
const;
175 static const uint8_t kMaxNumSplits = 3;
188 SPLIT splits_[kMaxNumSplits];
void Mark(ScrollView *window) const
bool FindBlobWidth(const GenericVector< TBLOB *> &blobs, int index, bool modify)
bool OverlappingSplits(const SEAM &other) const
void Print(const char *label) const
bool ContainedByBlob(const TBLOB &blob) const
float FullPriority(int xmin, int xmax, double overlap_knob, int centered_maxwidth, double center_knob, double width_change_knob) const
SEAM(float priority, const TPOINT &location)
void UndoSeam(TBLOB *blob, TBLOB *other_blob) const
static void JoinPieces(const GenericVector< SEAM *> &seams, const GenericVector< TBLOB *> &blobs, int first, int last)
TBOX bounding_box() const
static void PrintSeams(const char *label, const GenericVector< SEAM *> &seams)
bool SharesPosition(const SEAM &other) const
bool CombineableWith(const SEAM &other, int max_x_dist, float max_total_priority) const
bool HasAnySplits() const
bool IsHealthy(const TBLOB &blob, int min_points, int min_area) const
void set_priority(float priority)
SEAM(float priority, const TPOINT &location, const SPLIT &split)
bool y_overlap(const TBOX &box) const
void ApplySeam(bool italic_blob, TBLOB *blob, TBLOB *other_blob) const
bool UsesPoint(const EDGEPT *point) const
void start_seam_list(TWERD *word, GenericVector< SEAM *> *seam_array)
TBOX bounding_box() const
bool PrepareToInsertSeam(const GenericVector< SEAM *> &seams, const GenericVector< TBLOB *> &blobs, int insert_index, bool modify)
static void BreakPieces(const GenericVector< SEAM *> &seams, const GenericVector< TBLOB *> &blobs, int first, int last)
void CombineWith(const SEAM &other)