§
    )Áôg›  ã                   óZ   — d dl Z 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	dS )
é    N)Úproducté   )Úimg_as_floatc                 óV   ‡ ‡‡— dŠdŠt          j        ‰ ¦  «        ˆ ˆˆfd„¦   «         }|S )NzãSince version 0.24, the two input images are named `image0` and `image1` (instead of `image1` and `image2`, respectively). Please use `image0, image1` to avoid this warning for now, and avoid an error from version 0.26 onwards.zåStarting in version 0.24, all arguments following `image0, image1` (including `method`) will be keyword-only. Please pass `method=` in the function call to avoid this warning for now, and avoid an error from version 0.26 onwards.c                  ó4  •— t          t          | g d¢¦  «        ¦  «        D ]E\  }\  }}|dk    rt          j        ‰t          d¬¦  «         ||v rt          |› d�¦  «        ‚|||<   ŒFt          ¦   «         } d|                     ¦   «         v r‡t          j        ‰t          d¬¦  «         d|                     ¦   «         v r=d|                     ¦   «         v rt          d¦  «        ‚|                     d¦  «        |d<   |                     d¦  «        |d<    ‰| i |¤ŽS )	N)Úimage0Úimage1ÚmethodÚn_tilesé   )ÚcategoryÚ
stacklevelz0 passed both as positional and keyword argument.Úimage2r	   r   z@Three input images given; please use only `image0` and `image1`.)	Ú	enumerateÚzipÚwarningsÚwarnÚFutureWarningÚ
ValueErrorÚtupleÚkeysÚpop)ÚargsÚkwargsÚiÚvalueÚparamÚfuncÚ	wm_imagesÚ	wm_methods        €€€ú]/var/www/html/bac/bac_backend/python/env/lib/python3.11/site-packages/skimage/util/compare.pyÚwrapperz%_rename_image_params.<locals>.wrapper   sH  ø€ õ "+Ý�Ð?Ð?Ð?Ñ@Ô@ñ"
ô "
ð 
	&ð 
	&ÑˆA‰~��uð �AŠvˆvÝ”˜iµ-ÈAÐNÑNÔNÐNØ˜ˆˆÝ ØÐNÐNÐNñô ð ð !&��u‘�Ý‰wŒwˆð �v—{’{‘}”}Ð$Ð$ÝŒM˜)­mÈÐJÑJÔJÐJð ˜6Ÿ;š;™=œ=Ð(Ð(à˜vŸ{š{™}œ}Ð,Ð,Ý$ð(ñô ð ð $*§:¢:¨hÑ#7Ô#7��xÑ Ø%Ÿzšz¨(Ñ3Ô3ˆF�8Ñàˆt�TÐ$˜VÐ$Ð$Ð$ó    )Ú	functoolsÚwraps)r   r"   r   r    s   ` @@r!   Ú_rename_image_paramsr&   
   s[   øøø€ ð	%ð ð	%ð õ „_�TÑÔð%ð %ð %ð %ð %ð %ñ Ôð%ð@ €Nr#   Údiff)é   r(   )r
   r   c                ó  — |j         | j         k    rt          d¦  «        ‚t          | ¦  «        }t          |¦  «        }|dk    rt          j        ||z
  ¦  «        }�n"|dk    r
d||z   z  }�n|dk    rý|j        dk    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    rd|	||
z  |d
z   |
z  …||z  |d
z   |z  …f<   Œ/t          j
        |¦  «        }||	         ||	<   ||	          ||	 <   nt          d¦  «        ‚|S )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 : string, optional
        Method used for the comparison.
        Valid values are {'diff', 'blend', 'checkerboard'}.
        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      à?Úcheckerboardr   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_imagesr=   =   sÂ  € ðP „|�v”|Ò#Ð#ÝÐ;Ñ<Ô<Ð<å˜ÑÔ€DÝ˜ÑÔ€Dà�ÒÐÝ”V˜D 4™KÑ(Ô(ˆ
‰
Ø	�7Ò	Ð	Ø˜D 4™KÑ(ˆ
‰
Ø	�>Ò	!Ð	!ØŒ9˜Š>ˆ>Ýð'ñô ð ð œ‰ˆ�ÝŒw˜ Ð'¨Ñ/Ô/ˆÝ�F˜W QœZÑ'Ñ(Ô(ˆÝ�F˜W QœZÑ'Ñ(Ô(ˆÝ�E '¨!¤*Ñ-Ô-­u°W¸Q´ZÑ/@Ô/@ÑAÔAð 	Vð 	V‰DˆAˆqØ�A‘˜‰{˜aÒÐØQU��Q˜‘Y ! a¡%¨5¡Ð0°!°e±)¸qÀ1¹uÈ¹oÐ2MÐMÑNøÝ”] 4Ñ(Ô(ˆ
Ø œ:ˆ
�4ÑØ  $ œKˆ
�D�5ÑÐåð@ñ
ô 
ð 	
ð Ðr#   )
r$   r   Ú	itertoolsr   Únumpyr-   Údtyper   r&   r=   © r#   r!   ú<module>rB      s–   ðØ Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð à Ð Ð Ð à Ð Ð Ð Ð Ð ð0ð 0ð 0ðf Ø-3¸Vð Fð Fð Fð Fñ ÔðFð Fð Fr#   