o
    h                     @   sd   d dl mZ d dlmZ d dlmZmZ d dlmZ d dl	m
Z
 dd Zdd	 Zd
d Zdd ZdS )    )assert_array_equal)rgb2gray)	astronautcells3d)gaussian)blur_effectc                  C   sz   t  } t| dd}tt| ddddd}tt| ddddd}d|  kr*dk s-J  J ||  k r8|k s;J  J dS )z7Test that the blur metric increases with more blurring.channel_axis   )sigmar
      r   N)r   r   r   imageB0B1B2 r   a/var/www/html/scripts/venv/lib/python3.10/site-packages/skimage/measure/tests/test_blur_effect.pytest_blur_effect	   s    r   c                  C   sj   t  } t| ddd}t| dd}t| ddd}d|  kr"dk s%J  J ||  kr0|ks3J  J dS )	z\Test that the blur metric decreases with increasing size of the
    re-blurring filter.
       r   )h_sizer
   r	      r   r   N)r   r   r   r   r   r   test_blur_effect_h_size   s    r   c                  C   sr   t  } t| dd}tt| }t| ddd}tt| dd}d|  kr)dk s,J  J ||ks2J t|| dS )zWTest that passing an RGB image is equivalent to passing its grayscale
    version.
    r   r	   N)r
   reduce_func)r   r   r   )r   r   r   r   )r   r   r   B0_arrB1_arrr   r   r   test_blur_effect_channel_axis!   s   r   c                  C   s   t  dddddddf } t| }tt| dd}tt| dd}d|  kr.dk s1J  J ||  k r<|k s?J  J dS )z.Test that the blur metric works on a 3D image.Nr   )r   r   r   )r   r   r   )image_3dr   r   r   r   r   r   test_blur_effect_3d/   s    r   N)numpy.testingr   skimage.colorr   skimage.datar   r   skimage.filtersr   skimage.measurer   r   r   r   r   r   r   r   r   <module>   s    