+
    Aiz                     Z    ^ RI t^RIHt R t]P
                  ! RR7      RR/R l4       tR# )    N)utilsc                   V P                   P                  R8X  ds   V P                  R4      p\        P                  ! V4      p\        P                  ! VP                  R4      4      p\        P
                  ! V4      ^ ,          pWE,          pMT\        P                  ! V P                  R4      RRR7      w  rbp\        P                  ! VP                  R4      RR7      w  rT\        P                  ! V4      V P                  ,          p\        P                  ! V4      VP                  ,          p\        P                  ! WxV4      p	W,          P                  V P                  4      # )z
Return modified source array so that the cumulative density function of
its values matches the cumulative density function of the template.
uT)return_inversereturn_counts)r   )dtypekindreshapenpbincountnonzerouniquecumsumsizeinterpshape)
sourcetemplate
src_lookup
src_countstmpl_countstmpl_values
src_valuessrc_quantilestmpl_quantilesinterp_a_valuess
   &&        a/var/www/html/photoedit/myenv/lib/python3.14/site-packages/skimage/exposure/histogram_matching.py_match_cumulative_cdfr      s   
 ||C^^B'
[[,
kk("2"22"67 jj-a0!.-/YYNN2t4.
*

 $&99X-=-=b-AQU#V  IIj)FKK7MYY{+hmm;Nii{KO&..v||<<    )channel_arg_positionschannel_axisc               \   V P                   VP                   8w  d   \        R4      hVe   V P                  R,          VP                  R,          8w  d   \        R4      h\        P                  ! V P                  V P
                  R7      p\        V P                  R,          4       F'  p\        V RV3,          VRV3,          4      pWSRV3&   K)  	  M\        W4      pVP
                  P                  R8X  d4   \        P                  ! V P
                  4      pVP                  VRR7      pV# )	a  Adjust an image so that its cumulative histogram matches that of another.

The adjustment is applied separately for each channel.

Parameters
----------
image : ndarray
    Input image. Can be gray-scale or in color.
reference : ndarray
    Image to match histogram of. Must have the same number of channels as
    image.
channel_axis : int or None, optional
    If None, the image is assumed to be a grayscale (single channel) image.
    Otherwise, this parameter indicates which axis of the array corresponds
    to channels.

Returns
-------
matched : ndarray
    Transformed input image.

Raises
------
ValueError
    Thrown when the number of channels in the input image and the reference
    differ.

References
----------
.. [1] http://paulbourke.net/miscellaneous/equalisation/

z:Image and reference must have the same number of channels.zENumber of channels in the input image and reference image must match!)r	   .fF)copyr   )ndim
ValueErrorr   r   emptyr	   ranger   r
   r   _supported_float_typeastype)image	referencer"   matchedchannelmatched_channel	out_dtypes   &&$    r   match_histogramsr2   !   s   D zzY^^#K
 	
 ;;r?ioob11. 
 ((5;;ekk:U[[_-G3c7l#YsG|%<O %4CL!	 . (9}}S //<	...7Nr    )r      )numpyr   _sharedr   r   channel_as_last_axisr2    r    r   <module>r8      s6     =6 &9;t ; :;r    