44 inline int x() {
return x_; }
45 inline int y() {
return y_; }
46 inline void Shift(
int dx,
int dy) {
65 inline int Left()
const {
return left_; }
66 inline int Top()
const {
return top_; }
67 inline int Right()
const {
return right_; }
68 inline int Bottom()
const {
return bottom_; }
69 inline int Width()
const {
return right_ - left_ + 1; }
70 inline int Height()
const {
return bottom_ - top_ + 1; }
75 return (*(reinterpret_cast<ConComp * const *>(comp1)))->left_ +
76 (*(
reinterpret_cast<ConComp *
const *
>(comp1)))->right_ -
77 (*(reinterpret_cast<ConComp * const *>(comp2)))->left_ -
78 (*(
reinterpret_cast<ConComp *
const *
>(comp2)))->right_;
84 return (*(reinterpret_cast<ConComp * const *>(comp2)))->right_ -
85 (*(
reinterpret_cast<ConComp *
const *
>(comp1)))->right_;
89 inline bool LeftMost()
const {
return left_most_; }
90 inline bool RightMost()
const {
return right_most_; }
91 inline void SetLeftMost(
bool left_most) { left_most_ = left_most; }
92 inline void SetRightMost(
bool right_most) { right_most_ = right_most;
94 inline int ID ()
const {
return id_; }
95 inline void SetID(
int id) { id_ = id; }
96 inline int PtCnt ()
const {
return pt_cnt_; }
98 bool Add(
int x,
int y);
102 void Shift(
int dx,
int dy);
static int Right2LeftComparer(const void *comp1, const void *comp2)
void SetLeftMost(bool left_most)
int * CreateHistogram(int max_hist_wnd)
ConComp ** Segment(int max_hist_wnd, int *concomp_cnt)
void Shift(int dx, int dy)
int * SegmentHistogram(int *hist_array, int *seg_pt_cnt)
static int Left2RightComparer(const void *comp1, const void *comp2)
void SetNext(ConCompPt *pt)
void SetRightMost(bool right_most)
void Shift(int dx, int dy)
bool Merge(ConComp *con_comp)