Ë
     \;j’  ã                   óJ   — d dl Z d dlmZ d dlZddlmZ d„ Zedddœd	„«       Zy)
é    N)Úproducté   )Úimg_as_floatc                 óB   ‡ — t        j                  ‰ «      ˆ fd„«       }|S )Nc                  óš   •— t        t        | g d¢«      «      D ]  \  }\  }}||v rt        |› d�«      ‚|||<   Œ! t        «       }  ‰| i |¤ŽS )N)Úimage0Úimage1ÚmethodÚn_tilesz0 passed both as positional and keyword argument.)Ú	enumerateÚzipÚ
ValueErrorÚtuple)ÚargsÚkwargsÚiÚvalueÚparamÚfuncs        €ú]G:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\skimage/util/compare.pyÚwrapperz%_rename_image_params.<locals>.wrapper
   sm   ø€ ô "+Ü�Ò?Ó@ö"
ÑˆA‰~��uð ˜‰Ü Ø�gÐMÐNóð ð !&��u’ð"
ô ‹wˆá�TÐ$˜VÑ$Ð$ó    )Ú	functoolsÚwraps)r   r   s   ` r   Ú_rename_image_paramsr   	   s%   ø€ Ü‡_�_�TÓó%ó ð%ð €Nr   Údiff)é   r   )r
   r   c                ó´  — |j                   | j                   k7  rt        d«      ‚t        | «      }t        |«      }|dk(  rt        j                  ||z
  «      }|S |dk(  r
d||z   z  }|S |dk(  rá|j
                  dk7  rt        d«      ‚|j                   \  }}t        j                  ||fd«      }	t        ||d	   z  «      }
t        ||d
   z  «      }t        t        |d	   «      t        |d
   «      «      D ].  \  }}||z   dz  d	k(  sŒd|	||
z  |d
z   |
z  …||z  |d
z   |z  …f<   Œ0 t        j                  |«      }||	   ||	<   ||	    ||	 <   |S t        d«      ‚)a²  
    Return an image showing the differences between two images.

    .. versionadded:: 0.16

    Parameters
    ----------
    image0, image1 : ndarray, shape (M, N)
        Images to process, must be of the same shape.

        .. versionchanged:: 0.24
            `image1` and `image2` were renamed into `image0` and `image1`
            respectively.
    method : {'diff', 'blend', 'checkerboard'}, optional
        Method used for the comparison.
        Details are provided in the note section.

        .. versionchanged:: 0.24
            This parameter and following ones are keyword-only.
    n_tiles : tuple, optional
        Used only for the `checkerboard` method. Specifies the number
        of tiles (row, column) to divide the image.

    Returns
    -------
    comparison : ndarray, shape (M, N)
        Image showing the differences.

    Notes
    -----
    ``'diff'`` computes the absolute difference between the two images.
    ``'blend'`` computes the mean value.
    ``'checkerboard'`` makes tiles of dimension `n_tiles` that display
    alternatively the first and the second image. Note that images must be
    2-dimensional to be compared with the checkerboard method.
    z Images must have the same shape.r   Úblendg      à?Úcheckerboardé   zIImages must be 2-dimensional to be compared with the checkerboard method.Fr   r   TzKWrong value for `method`. Must be either "diff", "blend" or "checkerboard".)Úshaper   r   ÚnpÚabsÚndimÚfullÚintr   ÚrangeÚ
zeros_like)r   r	   r
   r   Úimg1Úimg2Ú
comparisonÚshapexÚshapeyÚmaskÚstepxÚstepyr   Újs                 r   Úcompare_imagesr3      sž  € ðN ‡|�|�v—|‘|Ò#ÜÐ;Ó<Ð<ä˜Ó€DÜ˜Ó€Dà�ÒÜ—V‘V˜D 4™KÓ(ˆ
ð0 Ðð/ 
�7Ò	Ø˜D 4™KÑ(ˆ
ð, Ðð+ 
�>Ò	!Ø�9‰9˜Š>Üð'óð ð Ÿ™‰ˆ�Ü�w‰w˜ Ð'¨Ó/ˆÜ�F˜W Q™ZÑ'Ó(ˆÜ�F˜W Q™ZÑ'Ó(ˆÜœE '¨!¡*Ó-¬u°W¸Q±ZÓ/@ÖA‰DˆAˆqØ�A‘˜‰{˜aÓØQU��Q˜‘Y ! a¡%¨5¡Ð0°!°e±)¸qÀ1¹uÈ¹oÐ2MÐMÒNð Bô —]‘] 4Ó(ˆ
Ø ™:ˆ
�4ÑØ  $ ™Kˆ
�D�5Ñð Ðô	 ð@ó
ð 	
r   )	r   Ú	itertoolsr   Únumpyr#   Údtyper   r   r3   © r   r   Ú<module>r8      s1   ðÛ Ý ã å òð( Ø-3¸Vó Eó ñEr   