src/textord/imagefind.cpp
static bool TestWeakIntersectedPart(const TBOX &im_box, ColPartition_LIST *part_list,
                                    ColPartition *part) {
  if (part->flow() < BTFT_STRONG_CHAIN) {
    // A weak partition intersects the box.
    const TBOX &part_box = part->bounding_box();
    if (im_box.contains(part_box)) {
      int area = part_box.area();
      int intersect_area = IntersectArea(part_box, part_list);
      if (area < 2 * intersect_area) {
        return true;
      }
    }
  }
  return false;
}
// part_list is a set of ColPartitions representing a polygonal image, and
// im_box is the union of the bounding boxes of all the parts in part_list.
// Tests whether part is to be consumed by the polygonal image.
// Returns true if part is weak text and more than half of its area is
// intersected by parts from the part_list, and it is contained within im_box.
part_list is a set of ColPartitions representing a polygonal image, and
im_box is the union of the bounding boxes of all the parts in part_list.
Tests whether part is to be consumed by the polygonal image.
Returns true if part is weak text and more than half of its area is
intersected by parts from the part_list, and it is contained within im_box.
part_list is a set of ColPartitions representing a polygonal image and im_box is the union of the bounding boxes of all the parts in part_list . Tests whether part is to be consumed by the polygonal image . Returns true if part is weak text and more than half of its area is intersected by parts from the part_list and it is contained within im_box .
static bool TestWeakIntersectedPart(const TBOX &im_box, ColPartition_LIST *part_list,
                                    ColPartition *part) {
  if (part->flow() < BTFT_STRONG_CHAIN) {
    const TBOX &part_box = part->bounding_box();
    if (im_box.contains(part_box)) {
      int area = part_box.area();
      int intersect_area = IntersectArea(part_box, part_list);
      if (area < 2 * intersect_area) {
        return true;
      }
    }
  }
  return false;
}
static bool TestWeakIntersectedPart ( const TBOX & im_box , ColPartition_LIST * part_list , ColPartition * part ) { if ( part -> flow ( ) < BTFT_STRONG_CHAIN ) { const TBOX & part_box = part -> bounding_box ( ) ; if ( im_box . contains ( part_box ) ) { int area = part_box . area ( ) ; int intersect_area = IntersectArea ( part_box , part_list ) ; if ( area < 2 * intersect_area ) { return true ; } } } return false ; }
part_list is a set of ColPartitions representing a polygonal image, and
im_box is the union of the bounding boxes of all the parts in part_list.
part_list is a set of ColPartitions representing a polygonal image and im_box is the union of the bounding boxes of all the parts in part_list .
// A weak partition intersects the box.