+
    Ai\3                     `   ^ RI t^RIHtHtHtHt ^RIHtH	t	H
t
Ht ^RIHt ^RIHt ^RIHt ^RIHt ]P(                  ! R
4      t. ROt]! R^4       FJ  t]! ]]! ]4      ,          ) ]]! ]4      ,          ^,           4       F  t^]^],           ^],           3&   K  	  KL  	   ! R R	]]4      tR# )    N)FeatureDetectorDescriptorExtractor_mask_border_keypoints_prepare_grayscale_input_2D)corner_fastcorner_orientationscorner_peakscorner_harris)pyramid_gaussian)check_nD)NP_COPY_IF_NEEDED)	_orb_loopc                   R   a  ] tR t^t o RtRR ltR tR tR tR t	R t
R tR	tV tR
# )ORBa  Oriented FAST and rotated BRIEF feature detector and binary descriptor
extractor.

Parameters
----------
n_keypoints : int, optional
    Number of keypoints to be returned. The function will return the best
    `n_keypoints` according to the Harris corner response if more than
    `n_keypoints` are detected. If not, then all the detected keypoints
    are returned.
fast_n : int, optional
    The `n` parameter in `skimage.feature.corner_fast`. Minimum number of
    consecutive pixels out of 16 pixels on the circle that should all be
    either brighter or darker w.r.t test-pixel. A point c on the circle is
    darker w.r.t test pixel p if ``Ic < Ip - threshold`` and brighter if
    ``Ic > Ip + threshold``. Also stands for the n in ``FAST-n`` corner
    detector.
fast_threshold : float, optional
    The ``threshold`` parameter in ``feature.corner_fast``. Threshold used
    to decide whether the pixels on the circle are brighter, darker or
    similar w.r.t. the test pixel. Decrease the threshold when more
    corners are desired and vice-versa.
harris_k : float, optional
    The `k` parameter in `skimage.feature.corner_harris`. Sensitivity
    factor to separate corners from edges, typically in range ``[0, 0.2]``.
    Small values of `k` result in detection of sharp corners.
downscale : float, optional
    Downscale factor for the image pyramid. Default value 1.2 is chosen so
    that there are more dense scales which enable robust scale invariance
    for a subsequent feature description.
n_scales : int, optional
    Maximum number of scales from the bottom of the image pyramid to
    extract the features from.

Attributes
----------
keypoints : (N, 2) array
    Keypoint coordinates as ``(row, col)``.
scales : (N,) array
    Corresponding scales.
orientations : (N,) array
    Corresponding orientations in radians.
responses : (N,) array
    Corresponding Harris corner responses.
descriptors : (Q, `descriptor_size`) array of dtype bool
    2D array of binary descriptors of size `descriptor_size` for Q
    keypoints after filtering out border keypoints with value at an
    index ``(i, j)`` either being ``True`` or ``False`` representing
    the outcome of the intensity comparison for i-th keypoint on j-th
    decision pixel-pair. It is ``Q == np.sum(mask)``.

References
----------
.. [1] Ethan Rublee, Vincent Rabaud, Kurt Konolige and Gary Bradski
      "ORB: An efficient alternative to SIFT and SURF"
      http://www.vision.cs.chubu.ac.jp/CV-R/pdf/Rublee_iccv2011.pdf

Examples
--------
>>> from skimage.feature import ORB, match_descriptors
>>> img1 = np.zeros((100, 100))
>>> img2 = np.zeros_like(img1)
>>> rng = np.random.default_rng(19481137)  # do not copy this value
>>> square = rng.random((20, 20))
>>> img1[40:60, 40:60] = square
>>> img2[53:73, 53:73] = square
>>> detector_extractor1 = ORB(n_keypoints=5)
>>> detector_extractor2 = ORB(n_keypoints=5)
>>> detector_extractor1.detect_and_extract(img1)
>>> detector_extractor2.detect_and_extract(img2)
>>> matches = match_descriptors(detector_extractor1.descriptors,
...                             detector_extractor2.descriptors)
>>> matches
array([[0, 0],
       [1, 1],
       [2, 2],
       [3, 4],
       [4, 3]])
>>> detector_extractor1.keypoints[matches[:, 0]]
array([[59. , 59. ],
       [40. , 40. ],
       [57. , 40. ],
       [46. , 58. ],
       [58.8, 58.8]])
>>> detector_extractor2.keypoints[matches[:, 1]]
array([[72., 72.],
       [53., 53.],
       [70., 53.],
       [59., 71.],
       [72., 72.]])

c                    Wn         W n        W0n        W@n        WPn        W`n        R V n        R V n        R V n        R V n	        R V n
        R # )N)	downscalen_scalesn_keypointsfast_nfast_thresholdharris_k	keypointsscales	responsesorientationsdescriptors)selfr   r   r   r   r   r   s   &&&&&&&Q/var/www/html/photoedit/myenv/lib/python3.14/site-packages/skimage/feature/orb.py__init__ORB.__init__w   sI     # &,      c           	     |    \        V4      p\        \        WP                  ^,
          V P                  RR7      4      # )   N)channel_axis)r   listr   r   r   )r   images   &&r   _build_pyramidORB._build_pyramid   s5    +E2}}q($..t
 	
r!   c                   VP                   p\        WP                  V P                  4      p\	        V^R7      p\        V4      ^ 8X  dH   \        P                  ! RVR7      \        P                  ! RVR7      \        P                  ! RVR7      3# \        VP                  V^R7      pWE,          p\        W\        4      p\        VRV P                  R7      pWtR,          VR	,          3,          pWFV3# )
r#   )min_distancedtypedistancek)methodr/   )r      )r   )NNNr   )r2   r#   )r,   r   r   r   r	   lennpzerosr   shaper   
OFAST_MASKr
   r   )	r   octave_imager,   fast_responser   maskr   harris_responser   s	   &&       r   _detect_octaveORB._detect_octave   s    ""#L++t?R?RS Q?	y>Qu-U+U+  &l&8&8)bQO	*<JO'SDMMR#dOYt_$DE		11r!   c           	     N   \        V^4       V P                  V4      p. p. p. p. p\        \        V4      4       F  p\        P
                  ! W',          4      p\        P                  ! V4      P                  ^8  d    MV P                  V4      w  rpVP                  WP                  V,          ,          4       VP                  V
4       VP                  \        P                  ! V	P                  ^ ,          V P                  V,          VP                  R7      4       VP                  V4       K  	  \        P                  ! V4      p	\        P                  ! V4      p
\        P                  ! V4      p\        P                  ! V4      pV	P                  ^ ,          V P                   8  d   Wn        Wn        Wn        Wn        R# VP+                  4       RRR1,          RV P                    pW,          V n        W,          V n        W,          V n        W,          V n        R# )z}Detect oriented FAST keypoints along with the corresponding scale.

Parameters
----------
image : 2D array
    Input image.

r+   N)r   r'   ranger3   r4   ascontiguousarraysqueezendimr<   appendr   fullr6   r,   vstackhstackr   r   r   r   r   argsort)r   r&   pyramidkeypoints_listorientations_listscales_listresponses_listoctaver8   r   r   r   r   best_indicess   &&            r   detect
ORB.detect   s    	%%e,CL)F//@Lzz,',,q0151D1D\1R.IY!!)nnf.D"DE$$\2OOA&NNF*&,, !!),% *( IIn-	yy!23;'IIn-	??1 0 00&N K ,&N %,,.tt45Gt7G7GHL&4DN .DK , :D&4DNr!   c                    \        VP                  V^R7      p\        P                  ! W$,          \        P                  R\
        R7      p\        P                  ! W4,          RRR7      p\        WV4      pWT3# )   r-   C)r,   ordercopyF)rU   rV   )r   r6   r4   arrayintpr   r   )r   r8   r   r   r:   r   s   &&&&  r   _extract_octaveORB._extract_octave   s`    %l&8&8)bQHHO277#<M
	 xx 2#EJF  r!   c                   \        V^4       V P                  V4      p. p. p\        P                  ! V4      \        P                  ! V P                  4      ,          P                  \        P                  4      p\        \        V4      4       F  p	W8H  p
\        P                  ! V
4      ^ 8  g   K$  \        P                  ! WY,          4      pW*,          pWP                  V	,          ,          pWJ,          pV P                  WV4      w  rVP                  V4       VP                  V4       K  	  \        P                  ! V4      P                  \        4      V n        \        P"                  ! V4      V n        R# )a  Extract rBRIEF binary descriptors for given keypoints in image.

Note that the keypoints must be extracted using the same `downscale`
and `n_scales` parameters. Additionally, if you want to extract both
keypoints and descriptors you should use the faster
`detect_and_extract`.

Parameters
----------
image : 2D array
    Input image.
keypoints : (N, 2) array
    Keypoint coordinates as ``(row, col)``.
scales : (N,) array
    Corresponding scales.
orientations : (N,) array
    Corresponding orientations in radians.

N)r   r'   r4   logr   astyperX   r@   r3   sumrA   rY   rD   rF   viewboolr   rG   mask_)r   r&   r   r   r   rI   descriptors_list	mask_listoctavesrN   octave_maskr8   octave_keypointsoctave_orientationsr   r:   s   &&&&&           r   extractORB.extract   s!   ( 	%%e,	 66&>BFF4>>$::BB277KCL)F!+Kvvk"Q&!33GOD#,#9  NNF$:: &2&?#$($8$8 4G%! !''4  &! *$ 99%56;;DAYYy)
r!   c           	     X   \        V^4       V P                  V4      p. p. p. p. p. p\        \        V4      4       EF  p\        P
                  ! W(,          4      p	\        P                  ! V	4      P                  ^8  d    EMZV P                  V	4      w  rp\        V
4      ^ 8X  dP   VP                  V
4       VP                  V4       VP                  \        P                  ! R\        R7      4       K  V P                  WV4      w  rW,          V P                  V,          ,          pVP                  V4       VP                  W,          4       VP                  W,          4       VP                  V P                  V,          \        P                  ! VP                  ^ ,          \        P                   R7      ,          4       VP                  V4       EK  	  \        V4      ^ 8X  d   \#        R4      h\        P$                  ! V4      p
\        P&                  ! V4      p\        P&                  ! V4      p\        P&                  ! V4      p\        P$                  ! V4      P)                  \        4      pV
P                  ^ ,          V P*                  8  d"   Wn        VV n        Wn        Wn        Wn        R# VP7                  4       RRR1,          RV P*                   pV
V,          V n        VV,          V n        VV,          V n        VV,          V n        VV,          V n        R# )zDetect oriented FAST keypoints and extract rBRIEF descriptors.

Note that this is faster than first calling `detect` and then
`extract`.

Parameters
----------
image : 2D array
    Input image.

r+   znORB found no features. Try passing in an image containing greater intensity contrasts between adjacent pixels.N)r      r?   )r   r'   r@   r3   r4   rA   rB   rC   r<   rD   r5   r`   rY   r   onesr6   rX   RuntimeErrorrF   rG   r_   r   r   r   r   r   r   rH   )r   r&   rI   rJ   rM   rL   rK   rb   rN   r8   r   r   r   r   r:   scaled_keypointsr   rO   s   &&                r   detect_and_extractORB.detect_and_extract"  s    	%%e,CL)F//@Lzz,',,q0151D1D\1R.IY9~"%%i0%%i0 ''(FG $ 4 4!K  )1GG!!"23!!)/2$$\%78&''*003277CD ##K07 *: {q G 
 IIn-	IIn-	;'yy!23ii 0166t<??1 0 00&N DK ,&N* %,,.tt45Gt7G7GHL&|4DN .DK ,\ :D&|4DN*<8Dr!   )r   r   r   r   r   r   ra   r   r   r   r   r   N)g333333?   i  	   g{Gz?g{Gz?)__name__
__module____qualname____firstlineno____doc__r   r'   r<   rP   rY   rh   ro   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s8     [z ,
2.65p	!1*fL9 L9r!   r   )   r{   )   r|   r|   r|      r}   r}      r~         
   rr   rq         i)numpyr4   feature.utilr   r   r   r   cornerr   r   r	   r
   	transformr   _shared.utilsr   _shared.compatr   orb_cyr   r5   r7   
OFAST_UMAXr@   iabsjr    r!   r   <module>r      s      R Q ( $ .  XXh
I
	sBAJs1v&&
3q6(:Q(>?%&
2626>" @ 

U9/. U9r!   