
    3j`S                        S SK r S SKJrJrJrJr  S SKrS SKJs  J	r
  S SKJrJr  S SKJrJr  S SKJr  S SKJr  S\R*                  S\R*                  4S	 jrS\R*                  S\R*                  4S
 jrS\R*                  S\R*                  4S jrS\R*                  S\R*                  S\R*                  4S jrS\R*                  S\R*                  S\R*                  4S jr S/S\R*                  S\\R*                     S\\R*                     S\R*                  4S jjrS\R*                  S\\\R*                  4   S\R*                  4S jrS0S\R*                  S\S\R*                  4S jjrS\R*                  S\R*                  4S jrS1S\R*                  S\ S\R*                  4S jjr!S2S\R*                  S\ S\\\    \\    4   4S jjr"S\R*                  S\R*                  S\R*                  4S jr#S\R*                  S\R*                  S\R*                  4S  jr$S3S!\R*                  S\R*                  S"\ S\R*                  4S# jjr% S4S!\R*                  S\R*                  S"\ S$\&S\R*                  4
S% jjr' S4S!\R*                  S\R*                  S"\ S$\&S\R*                  4
S& jjr(S2S\R*                  S\R*                  S'\ S\R*                  4S( jjr)S\R*                  S\R*                  4S) jr*S*\R*                  S\R*                  4S+ jr+S,\R*                  S-\R*                  S\R*                  4S. jr,g)5    N)ListOptionalTupleUnion)KORNIA_CHECK_LAFKORNIA_CHECK_SHAPE)angle_to_rotation_matrixconvert_points_from_homogeneous)transform_points)pyrdownLAFreturnc                     [        U 5        SnU SSS2SS24   U SSS2SS24   -  U SSS2SS24   U SSS2SS24   -  -
  U-   nUR                  5       R                  5       $ )zReturn a scale of the LAFs.

Args:
    LAF: :math:`(B, N, 2, 3)`

Returns:
    scale :math:`(B, N, 1, 1)`

Example:
    >>> input = torch.ones(1, 5, 2, 3)  # BxNx2x3
    >>> output = get_laf_scale(input)  # BxNx1x1

g|=.r         )r   abssqrt)r   epsouts      L/home/wildlama/miniconda3/lib/python3.13/site-packages/kornia/feature/laf.pyget_laf_scaler      s     S
C
c1Q3!m
s3!QqS=1
1CQqS!A#4FSRSTURUWXYZWZ]I[4[
[^a
aC779>>    c                 &    [        U 5        U S   nU$ )a:  Return a center (keypoint) of the LAFs.

The convention is that center of 5-pixel image (coordinates from 0 to 4) is 2, and not 2.5.

Args:
    LAF: :math:`(B, N, 2, 3)`

Returns:
    xy :math:`(B, N, 2)`

Example:
    >>> input = torch.ones(1, 5, 2, 3)  # BxNx2x3
    >>> output = get_laf_center(input)  # BxNx2

.r   )r   )r   r   s     r   get_laf_centerr   2   s      S
f+CJr   c                     [        U 5        [        R                  " U S   U S   5      n[        R                  " U5      R	                  S5      $ )zReturn orientation of the LAFs, in degrees.

Args:
    LAF: :math:`(B, N, 2, 3)`

Returns:
    angle in degrees :math:`(B, N, 1)`

Example:
    >>> input = torch.ones(1, 5, 2, 3)  # BxNx2x3
    >>> output = get_laf_orientation(input)  # BxNx1

).r   r   ).r   r   )r   torchatan2rad2deg	unsqueeze)r   	angle_rads     r   get_laf_orientationr#   G   s>     SC	NC	N;I==#--b11r   angles_degreesc                 L   [        U 5        U R                  SS u  p#[        U5      R                  X#-  SS5      nU R	                  5       n[
        R                  " U SS2SS2SS2SS24   R                  X#-  SS5      U5      R                  X#SS5      USS2SS2SS2SS24'   U$ )a'  Apply additional rotation to the LAFs.

Compared to `set_laf_orientation`, the resulting rotation is original LAF orientation plus angles_degrees.

Args:
    LAF: :math:`(B, N, 2, 3)`
    angles_degrees: :math:`(B, N, 1)` in degrees.

Returns:
    LAF oriented with angles :math:`(B, N, 2, 3)`

Nr   )r   shaper	   viewcloner   bmmreshape)r   r$   BNrotmatout_lafs         r   
rotate_lafr/   Z   s     S99Ra=DA%n5::15!QGFiikG!IIc!QBQB,&7&?&?q!&LfU]]^_deghiGAq"1"bqbLNr   c                     [        U 5        U R                  SS u  p#[        U 5      R                  U5      n[	        XU-
  5      $ )zChange the orientation of the LAFs.

Args:
    LAF: :math:`(B, N, 2, 3)`
    angles_degrees: :math:`(B, N, 1)` in degrees.

Returns:
    LAF oriented with angles :math:`(B, N, 2, 3)`

Nr   )r   r&   r#   
reshape_asr/   )r   r$   _B_Noris        r   set_laf_orientationr5   o   sB     SYYr]FB
c
"
-
-n
=CcC/00r   xyscaler4   c           	         [        U / SQ5        U R                  nU R                  nU R                  SS u  pVUc  [        R
                  " XVSSX4S9nUc  [        R                  " XVSX4S9n[        U/ SQ5        [        U/ SQ5        [        R                  " [        UR                  S5      5      U R                  S5      /SS	9n[        Xq5      nU$ )
aZ  Create a LAF from keypoint center, scale and orientation.

Useful to create kornia LAFs from OpenCV keypoints.

Args:
    xy: :math:`(B, N, 2)`.
    scale: :math:`(B, N, 1, 1)`. If not provided, scale = 1.0 is assumed
    ori: angle in degrees :math:`(B, N, 1)`. If not provided orientation = 0 is assumed

Returns:
    LAF :math:`(B, N, 2, 3)`

)r+   r,   2Nr   r   )devicedtype)r+   r,   1r<   )r+   r,   r<   r   dim)r   r:   r;   r&   r   oneszeroscatr	   squeezer!   	scale_laf)	r6   r7   r4   r:   r;   r+   r,   unscaled_laflafs	            r   laf_from_center_scale_orirF      s      r?+YYFHHE88BQ<DA}

1AfB
{kk!&>u23sO,996s{{2GVXIYZ`bcL
L
(CJr   rE   
scale_coefc           	         [        U[        [        R                  45      (       d  [	        S[        U5       35      e[        U 5        U SS2SS2SS2SS24   n[        R                  " X-  U SS2SS2SS2SS24   /SS9$ )a  Multiplies region part of LAF ([:, :, :2, :2]) by a scale_coefficient.

So the center, shape and orientation of the local feature stays the same, but the region area changes.

Args:
    laf: :math:`(B, N, 2, 3)`
    scale_coef: broadcastable torch.Tensor or float.

Returns:
    LAF :math:`(B, N, 2, 3)`

Example:
    >>> input = torch.ones(1, 5, 2, 3)  # BxNx2x3
    >>> scale = 0.5
    >>> output = scale_laf(input, scale)  # BxNx2x3

z0scale_coef should be float or torch.Tensor. Got Nr      r=   )
isinstancefloatr   Tensor	TypeErrortyper   rA   )rE   rG   centerless_lafs      r   rC   rC      s~    $ j5%,,"788J4PZK[J\]^^SArr2A2&N99j13q!Q{3CD!LLr   r   c           	      N   [        U 5        [        U 5      nUn[        R                  " U SSS2SS24   S-  U SSS2SS24   S-  -   5      U-   n[        R                  " XB-  R                  5       [        R                  " U5      /SS9n[        R                  " U SSS2SS24   U SSS2SS24   -  U SSS2SS24   U SSS2SS24   -  -   XB-  -  X$-  R                  5       /SS9n[        R                  " [        R                  " XV/SS9U SSS2SS24   /SS9n[        Xs5      $ )a  Rectify the affine matrix, so that it becomes upright.

Args:
    laf: :math:`(B, N, 2, 3)`
    eps: for safe division.

Returns:
    laf: :math:`(B, N, 2, 3)`

Example:
    >>> input = torch.ones(1, 5, 2, 3)  # BxNx2x3
    >>> output = make_upright(input)  #  BxNx2x3

.r   r   r   rI   r=   N)r   r   r   r   rA   
contiguous
zeros_likerC   )rE   r   detr7   b2a2laf1_elllaf2_elllaf_unit_scales           r   make_uprightrX      sj    S

CE ::c#qsAaC-(A-C1acM0Ba0GGH3NDyy4:113U5E5Ec5JKQRSHyy#qsAaC- 3sAaC1}#55C1acM8JSQTVWXYVY[\]^[^Q^M_8__dhdnoZ##%	
 H YY		8*>A FCQRTUVWTWKHXY_`aN^++r   ellsc           	         [        U / SQ5        U R                  u  pnU SSS24   R                  5       R                  5       n[        R
                  " U5      nU SSS24   R                  5       R                  5       nU SSS24   XF-   R                  S5      -  n[        R                  " XEXv/SS	9R                  XSS5      R                  5       n[        R                  " XSS
S24   R                  XSS5      /SS	9n	U	$ )a  Convert ellipse regions to LAF format.

Ellipse (a, b, c) and upright covariance matrix [a11 a12; 0 a22] are connected
by inverse matrix square root: A = invsqrt([a b; b c]).

See also https://github.com/vlfeat/vlfeat/blob/master/toolbox/sift/vl_frame2oell.m

Args:
    ells: torch.Tensor :math:`(B, N, 5)` of ellipses in Oxford format [x y a b c].

Returns:
    LAF :math:`(B, N, 2, 3)`

Example:
    >>> input = torch.ones(1, 10, 5)  # BxNx5
    >>> output = ellipse_to_laf(input)  #  BxNx2x3

)r+   r,   5.r   rI         &.>r   r=   Nr   )r   r&   r   r   r   rR   clampstackr'   inverserA   )
rY   r+   r,   _a11a12a22a21Ar   s
             r   ellipse_to_lafrh      s    & t_-jjGA! sAaCx.



#
#
%C


3
C
sAaCx.



#
#
%C
sAaCx.CI,,T2
2CSs(b166qQBJJLA
))QS"1"W**1A67Q
?CJr   n_ptsc                    [        U 5        U R                  5       u  p#  n[        R                  " [        R                  " [        R
                  " SS[        R                  -  US-
  5      5      R                  S5      [        R                  " [        R
                  " SS[        R                  -  US-
  5      5      R                  S5      [        R                  " US-
  S5      /SS9n[        R                  " [        R                  " / SQ5      R                  SS5      U/SS9R                  S5      R                  X#-  US5      nUR                  U R                  5      R                  U R                   5      n[        R                  " / SQ5      R                  SSS5      R                  X#-  SS5      n[        R                  " U R                  SSS5      UR                  U R                  5      R                  U R                   5      /SS9n[        R"                  " XuR%                  SSS5      5      R%                  SSS5      n['        UR                  X#US5      5      $ )a  Convert LAFs to boundary points of the regions + center.

Used for local features visualization, see visualize_laf function.

Args:
    LAF: :math:`(B, N, 2, 3)`
    n_pts: number of points to output.

Returns:
    torch.Tensor of boundary points LAF: :math:`(B, N, n_pts, 2)`

r   r   r   r   r=   )        rk         ?rI   )r   sizer   rA   sinlinspacemathpir!   cosr?   tensorr'   expandtor:   r;   r)   permuter
   )	r   ri   r+   r,   rb   ptsauxHLAFpts_hs	            r   laf_to_boundary_pointsr{     s    SJA!Q
))IIennQDGGUQY?@JJ2NIIennQDGGUQY?@JJ2NJJuqy!$	

 C ))U\\/2771=sC
K
U
UVW
X
_
_`a`eglno
pC
&&


		
*C
,,
'
,
,Q1
5
<
<QUAq
IC99chhr1a(#&&*<*?*?		*JKQRSDIIdKK1a0199!QBE*5::aE1+EFFr   img_idxc                     [        U 5        [        XUS-    5      S   nUR                  5       R                  SSS5      R	                  5       nUS   R                  5       US   R                  5       4$ )aQ  Return list for drawing LAFs (local features).

Args:
    LAF: :math:`(B, N, 2, 3)`
    img_idx: which points to output.

Returns:
    List of boundary points x, y`

Examples:
    x, y = get_laf_pts_to_draw(LAF, img_idx)
    plt.figure()
    plt.imshow(kornia.image.tensor_to_image(img[img_idx]))
    plt.plot(x, y, 'r')
    plt.show()

r   r   r   .r   .r   )r   r{   detachrv   cputolist)r   r|   rw   pts_nps       r   get_laf_pts_to_drawr   #  sl    & S
 w{!;
<Q
?CZZ\!!!Q*..0F6N!!#VF^%:%:%<==r   imagesc           	      &   [        U 5        UR                  5       u    p#n[        US-
  5      n[        US-
  5      n[        Xe5      n[        R
                  " SSSSU R                  U R                  S9U-  nXXS'   XhS'   UR                  U 5      U -  $ )a  De-F.normalize LAFs from scale to image scale.

The convention is that center of 5-pixel image (coordinates from 0 to 4) is 2, and not 2.5.

    B,N,H,W = images.size()
    MIN_SIZE = min(H - 1, W -1)
    [a11 a21 x]
    [a21 a22 y]
    becomes
    [a11*MIN_SIZE a21*MIN_SIZE x*(W-1)]
    [a21*MIN_SIZE a22*MIN_SIZE y*(W-1)]

Args:
    LAF: :math:`(B, N, 2, 3)`
    images: :math:`(B, CH, H, W)`

Returns:
    the denormalized LAF: :math:`(B, N, 2, 3)`, scale in pixels

r   r   rI   r;   r:   r   r   r   r   r   r   r   r   	r   rm   rK   minr   r?   r;   r:   	expand_as	r   r   rb   hwwfhfmin_sizecoefs	            r   denormalize_lafr   <  s    * SJAqQ	q1uB	q1uB2{H::aAq		#**EPD>>#$$r   c           	      6   [        U 5        UR                  5       u    p#n[        US-
  5      n[        US-
  5      n[        Xe5      n[        R
                  " SSSSU R                  U R                  S9U-  nSU-  US'   SU-  US'   UR                  U 5      U -  $ )a  Normalize LAFs to [0,1] scale from pixel scale.

See below:
    B,N,H,W = images.size()
    MIN_SIZE =  min(H - 1, W -1)
    [a11 a21 x]
    [a21 a22 y]
    becomes:
    [a11/MIN_SIZE a21/MIN_SIZE x/(W-1)]
    [a21/MIN_SIZE a22/MIN_SIZE y/(H-1)]

Args:
    LAF: :math:`(B, N, 2, 3)`
    images: :math:`(B, CH, H, W)`

Returns:
    the denormalized LAF: :math:`(B, N, 2, 3)`, scale in image percentage (0, 1)

r   r   rI   r   rl   r   r   r   r   s	            r   normalize_lafr   \  s    ( SJAqQ	q1uB	q1uB2{H::aAq		#**EPDRxDRxD>>#$$r   imgPSc                    [        U5        UR                  5       u  p4  nU R                  5       u  pVpx[        X5      n	[        R                  " U	R                  X4-  SS5      X4-  XbU/SS9n
SU
SSS2S4   R                  5       -  [        US	-
  5      -  S
-
  U
SSS2S4'   SU
SSS2S	4   R                  5       -  [        US	-
  5      -  S
-
  U
SSS2S	4'   U
$ )zGenerate affine grid.

Args:
    img: image torch.Tensor of shape :math:`(B, CH, H, W)`.
    LAF: laf with shape :math:`(B, N, 2, 3)`.
    PS: patch size to be extracted.

Returns:
    grid :math:`(B*N, PS, PS, 2)`

r   rI   F)align_corners       @.Nr   r   rl   )r   rm   r   Faffine_gridr'   r(   rK   )r   r   r   r+   r,   rb   chr   r   
LAF_renormgrids              r   'generate_patch_grid_from_normalized_LAFr   {  s     SJA!Q((*KA1 !*J==15rr7JZ_`DDaO1133eAElBSHDaODaO1133eAElBSHDaOKr    normalize_lafs_before_extractionc                    [        U5        U(       a  [        X5      nOUnU R                  5       u  pVpxUR                  5       u  p  n/ n[        U	5       H  n[	        XUS-    XLUS-    U5      R                  U R                  5      nU R                  R                  S:X  a]  UR                  [        R                  " XUS-    R                  UR                  S5      XgU5      UR                  SS5      SSS95        M  UR                  [        R                  " XUS-    R                  UR                  S5      XgU5      USSS95        M     [        R                  " USS	9R                  XXbU5      $ )
a  Extract patches defined by LAFs from image torch.Tensor.

No smoothing applied, huge aliasing (better use extract_patches_from_pyramid).

Args:
    img: images, LAFs are detected in  :math:`(B, CH, H, W)`.
    laf: :math:`(B, N, 2, 3)`.
    PS: patch size.
    normalize_lafs_before_extraction: if True, lafs are normalized to image size.

Returns:
    patches with shape :math:`(B, N, CH, PS,PS)`.

r   mpsr   r   r@   Fpadding_moder   borderr=   )r   r   rm   ranger   ru   r:   rN   appendr   grid_samplert   r_   r   rA   r'   )r   rE   r   r   nlafrb   r   r   r   r+   r,   r   ir   s                 r   extract_patches_simpler     sI   " S'S&((*KA1JA!Q
C1X6sq1u~tPQTUPUXZ[^^_b_i_ij::??e#JJAEN))$))A,qAJJr1%!("'	 JJAEN))$))A,qA4V^ns " 99Sa %%aBB77r   c           
         [        U5        U(       a  [        X5      nOUnUR                  5       u  pV  nU R                  5       u  pxpS[        [	        X@5      5      -  [        U5      -  n[        X5      U-  nUR                  5       R                  S[        SUS-
  5      S9R                  5       n[        R                  " XVXX$R                  UR                  S9nU n[        SU5      n[        U5       GHf  nUR                  5       u  nnnn[        U5       H  nUU   U:H  R!                  USSS5      n[#        UUUS-    UUUS-    U5      nUR                  R$                  S:X  a@  [&        R(                  " UUUS-    R+                  UUUU5      UR                  SS5      S	S
S9nO/[&        R(                  " UUUS-    R+                  UUUU5      USS
S9n[        R,                  " UUR/                  UR                  5      UU   5      UU'   M     UUS-
  :  d  GM*  [1        U5      n[        UR                  S5      UR                  S5      5      U:  d  GMf    U$    U$ )aw  Extract patches defined by LAFs from image torch.Tensor.

Patches are extracted from appropriate pyramid level.

Args:
    img: images, LAFs are detected in  :math:`(B, CH, H, W)`.
    laf: :math:`(B, N, 2, 3)`.
    PS: patch size.
    normalize_lafs_before_extraction: if True, lafs are normalized to image size.

Returns:
    patches with shape :math:`(B, N, CH, PS,PS)`.

r   rk   r   r   )r   maxr   r   r   r@   Fr   r   r   rI   )r   r   rm   r   r   rK   r   log2r_   r   longr   r@   r;   r:   r   r'   r   rN   r   r   rt   whereru   r   )r   rE   r   r   r   r+   r,   rb   r   r   r   r7   	max_levelpyr_idxr   cur_img
num_levelscur_pyr_levelch_lh_lw_lr   
level_maskr   patchess                            r   extract_patches_from_pyramidr     s5   " S'S&JA!Q((*KA1- :;;eBiGEA	RIjjl  Sc!Y].C DIIKG
++aBBjj
MCGQ	"Jz*#LLN4cqA!!*5;;Aq!QGJ:71q1u;MtTUXY\]X]`bcD~~""e+--AA&--asC@JJr1%!("'	 --AA&--asC@$U]mr [[WZZ

-CSVLCF   :>)g&G7<<?GLLO4r9J/ +. Jr   r   c                     [        U 5        UR                  5       u    p4n[        U S5      nUS   U:  US   XR-
  :*  -  US   U:  -  US   XB-
  :*  -  nUR                  SS9S   nU$ )aA  Check if the LAF is touching or partly outside the image boundary.

Returns the mask of LAFs, which are fully inside the image, i.e. valid.

Args:
    laf:  :math:`(B, N, 2, 3)`.
    images: images, lafs are detected in :math:`(B, CH, H, W)`.
    border: additional border.

Returns:
    mask with shape :math:`(B, N)`.

   r~   r   r   r=   r   )r   rm   r{   r   )rE   r   r   rb   r   r   rw   good_lafs_masks           r   laf_is_inside_imager     s     SJAqQ
 b
)C	V	3v;!*#<=VPVAVW[^_e[fjkjt[tu  $''A'.q1Nr   c                 v    [        U 5        [        R                  " U S   U S   -   U S   U S   -   U S   /SS9nU$ )zConvert local affine frame(LAF) to alternative representation: coordinates of LAF center, LAF-x unit vector,
LAF-y unit vector.

Args:
    laf:  :math:`(B, N, 2, 3)`.

Returns:
    threepts :math:`(B, N, 2, 3)`.

r   r~   r   r   r=   )r   r   r`   )rE   	three_ptss     r   laf_to_three_pointsr     sK     SS[3v;6Fc&k8QSVW]S^_eghIr   threeptsc                 `    [         R                  " U S   U S   -
  U S   U S   -
  U S   /SS9nU$ )zConvert three points to local affine frame.

Order is (0,0), (0, 1), (1, 0).

Args:
    threepts: :math:`(B, N, 2, 3)`.

Returns:
    laf :math:`(B, N, 2, 3)`.

r~   r   r   r   r=   )r   r`   )r   rE   s     r   laf_from_three_pointsr   %  sK     ++	&	HV,	,hv.>&AQ.QS[\bScdjlC Jr   trans_01lafs_1c                 h   [        U5        [        R                  " U 5      (       d  [        S5      eU R                  UR                  :X  d  [        S5      eU R
                  S   UR
                  S   :X  d  [        S5      eU R
                  S   S:X  a  U R
                  S   S:X  d  [        S5      eUR                  5       u  p#  n[        U5      nUR                  SS	SS
5      R                  X#S-  S
5      n[        X5      nUR                  X#SS
5      R                  SS	SS
5      n[        U5      $ )ai  Apply perspective transformations to a set of local affine frames (LAFs).

Args:
    trans_01: torch.Tensor for perspective transformations of shape :math:`(B, 3, 3)`.
    lafs_1: torch.Tensor of lafs of shape :math:`(B, N, 2, 3)`.

Returns:
    torch.Tensor of N-dimensional points of shape :math:`(B, N, 2, 3)`.

Examples:
    >>> rng = torch.manual_seed(0)
    >>> lafs_1 = torch.rand(2, 4, 2, 3)  # BxNx2x3
    >>> lafs_1
    tensor([[[[0.4963, 0.7682, 0.0885],
              [0.1320, 0.3074, 0.6341]],
    <BLANKLINE>
             [[0.4901, 0.8964, 0.4556],
              [0.6323, 0.3489, 0.4017]],
    <BLANKLINE>
             [[0.0223, 0.1689, 0.2939],
              [0.5185, 0.6977, 0.8000]],
    <BLANKLINE>
             [[0.1610, 0.2823, 0.6816],
              [0.9152, 0.3971, 0.8742]]],
    <BLANKLINE>
    <BLANKLINE>
            [[[0.4194, 0.5529, 0.9527],
              [0.0362, 0.1852, 0.3734]],
    <BLANKLINE>
             [[0.3051, 0.9320, 0.1759],
              [0.2698, 0.1507, 0.0317]],
    <BLANKLINE>
             [[0.2081, 0.9298, 0.7231],
              [0.7423, 0.5263, 0.2437]],
    <BLANKLINE>
             [[0.5846, 0.0332, 0.1387],
              [0.2422, 0.8155, 0.7932]]]])
    >>> trans_01 = torch.eye(3).repeat(2, 1, 1)  # Bx3x3
    >>> trans_01.shape
    torch.Size([2, 3, 3])
    >>> lafs_0 = perspective_transform_lafs(trans_01, lafs_1)  # BxNx2x3

z Input type is not a torch.Tensorz'torch.Tensor must be in the same devicer   z2Input batch size must be the same for both tensorsr   rI   z#Transformation should be homographyr   r   )r   r   	is_tensorrM   r:   r&   
ValueErrorrm   r   rv   r*   r   r'   r   )	r   r   bsnrb   
threepts_1points_1points_0
threepts_0s	            r   perspective_transform_lafsr   7  s   X V??8$$:;;??fmm+ABB>>!Q/MNN^^B1$r0Ba0G>??++-KB1a$V,J!!!Q1-55ba%CH  3H ra+33Aq!Q?J ,,r   )NN)r^   )2   )r   )    )r   T)-rp   typingr   r   r   r   r   torch.nn.functionalnn
functionalr   kornia.core.checkr   r   kornia.geometry.conversionsr	   r
   kornia.geometry.linalgr   kornia.geometry.transformr   rL   r   r   r#   r/   r5   rF   rK   rC   rX   rh   intr{   r   r   r   r   boolr   r   r   r   r   r    r   r   <module>r      sh  $  / /    B a 3 -u||  (  *2U\\ 2ell 2&ELL %,, 5<< *1U\\ 15<< 1ELL 1$ [_%ell3AI%,,AW
\\>M5<< MU5%,,3F-G MELL M2,ell , ,%,, ,B' '%,, 'TG GS G%,, G@>U\\ >C >d3iQUVYQZFZ@[ >2% %u|| % %@%u|| %U\\ %ell %> ELL VY chcoco 6 bf+8	+8!LL+8.1+8Z^+8
\\+8^ bf7	7!LL7.17Z^7
\\7tU\\ 5<<  UZUaUa 0U\\ ell  ELL U\\ $C- C-u|| C-PUP\P\ C-r   