private void analyzeTextgroup(ArrayList<RegionGroup> textgroup) {
      int minX, minY, maxX, maxY;
      for (RegionGroup group : textgroup) {
         maxX = maxY = -1;
         minX = minY = 9999999;
         for (RegionInfo r : group.getMembers()) {
             minX = (r.minX < minX ? r.minX : minX);
             minY = (r.minY < minY ? r.minY : minY);
             maxX = (r.maxX > maxX ? r.maxX : maxX);
             maxY = (r.maxY > maxY ? r.maxY : maxY);
         }
         group.minX = minX;
         group.minY = minY;
         group.maxX = maxX;
         group.maxY = maxY;
         if (group.getMembers().size() > 0)
            group.setClosed(isClosed(minX, minY, maxX, maxY));
      }
   }