§
    {-jÐ  ã                   ó<   — d gZ ddlZdej        dej        defd„ZdS )Úget_neighbor_boxes_idxé    NÚ	src_boxesÚref_boxÚreturnc                 óî  — g }t          | ¦  «        dk    rßt          j        |d         | dd…df         ¦  «        }t          j        |d         | dd…df         ¦  «        }t          j        |d         | dd…df         ¦  «        }t          j        |d         | dd…df         ¦  «        }||z
  }||z
  }t          j        |dk    |dk     z  |dk    z  ¦  «        d         }	|                     |	¦  «         |S )a  
    Retrieve indices of source boxes that are neighbors to the reference box.

    Parameters:
    src_boxes (np.ndarray): An array of bounding boxes with shape (N, 4),
                            where N is the number of boxes and each box is represented
                            by [x1, y1, x2, y2].
    ref_box (np.ndarray): A single bounding box represented by [x1, y1, x2, y2].

    Returns:
    list: A list of indices of the source boxes that are close to the
          reference box based on the intersection area.
    r   Né   é   é   iñÿÿÿ)ÚlenÚnpÚmaximumÚminimumÚwhereÚextend)
r   r   Úmatch_idx_listÚx1Úy1Úx2Úy2Úpub_wÚpub_hÚ	match_idxs
             ús/var/www/html/banglarbhumi/venv/lib/python3.11/site-packages/paddlex/inference/pipelines/table_recognition/utils.pyr   r      sô   € ð €NÝ
ˆ9~„~˜ÒÐÝŒZ˜ œ
 I¨a¨a¨a°¨d¤OÑ4Ô4ˆÝŒZ˜ œ
 I¨a¨a¨a°¨d¤OÑ4Ô4ˆÝŒZ˜ œ
 I¨a¨a¨a°¨d¤OÑ4Ô4ˆÝŒZ˜ œ
 I¨a¨a¨a°¨d¤OÑ4Ô4ˆØR‘ˆØR‘ˆÝ”H˜e aši¨E°AªIÑ6¸%À#º+ÑFÑGÔGÈÔJˆ	Ø×Ò˜iÑ(Ô(Ð(ØÐó    )Ú__all__Únumpyr   ÚndarrayÚlistr   © r   r   ú<module>r       sR   ðð $Ð
$€à Ð Ð Ð ð b¤jð ¸2¼:ð È$ð ð ð ð ð ð r   