
    0-Ph                         d dl Zd dlmZmZ d dlmZ d dlmZ d dl	m
Z
mZ  ej        d d gd dgd dgd dgddgddgddgddgddgdd gdd gdd gd d gg          Zd	 Zd
 ZdS )    N)approximate_polygonsubdivide_polygon)_SUBDIVISION_MASKS)testing)assert_array_equalassert_equal         c                     t          t          d          } t          | t          dd d f                    t          t          d          } t          | t          dd d f                    t          t          dd d f         d          } t          | t          dd d f                    t          t          d          } t          | t                     t          t          d          } t          | t                     d S )Ng?)r   r      	      g@)r   r   r   )
r   r	   r         r      r      r   r   )r   squarer   )outs    b/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/skimage/measure/tests/test_polygon.pytest_approximate_polygonr      s    
fc
*
*CsF#3QQQ#67888
fc
*
*CsF:qqq=1222
f%Eqqq%HI3
O
OCsF#3QQQ#67888
fb
)
)CsF###
fa
(
(CsF#####    c                  &   t           } t           d d         }t           d d         }t          d          D ]M}| ||}}}t          dd          D ]2}t          t          |         d                   }t	          ||          } t          | d         | d                    t          | j        d         d|j        d         z  dz
             t	          ||          }t          |j        d         d|j        d         |z
  dz   z             t	          ||d          }t          |d         |d                    t          |d         |d                    t          |j        d         d|j        d         |z
  dz   z             4Ot          j	        t                    5  t	          t           d           d d d            n# 1 swxY w Y   t          j	        t                    5  t	          t           d           d d d            d S # 1 swxY w Y   d S )	Nr   
   r	   r   r   r
   T   )r   rangelenr   r   r   r   shaper   raises
ValueError)	new_square1new_square2new_square3_square1square2square3degreemask_lens	            r   test_subdivide_polygonr+   ,   sx   K"+K"+K2YY V V$/k'Aqkk 	V 	VF-f5a899H+GV<<K{2A???*1-q7=3C/Ca/GHHH+GV<<K*1-qGM!4Dx4ORS4S/TUUU+GVTBBKQ444R'"+666*1-qGM!4Dx4ORS4S/TUUUU	V" 

	#	# % %&!$$$% % % % % % % % % % % % % % %	
	#	# % %&!$$$% % % % % % % % % % % % % % % % % %s$   F??GG#HH
H
)numpynpskimage.measurer   r   skimage.measure._polygonr   skimage._sharedr   skimage._shared.testingr   r   arrayr   r   r+    r   r   <module>r4      s       B B B B B B B B 7 7 7 7 7 7 # # # # # # D D D D D D D D 
	
A	
A	
A	
A	
A	
A	
A	
A	
A	
A	
A	
A	
A
 
&$ $ $ % % % % %r   