
    i                         d dl Z	 d dlZdZej                  dk\  rej
                  e_        ddZesej                  Z	ddZe	e_        yy#  dZY %xY w)    NTz3.0.0Fc                 P    dz  dz  fd}| j                  |      S )a  
    Returns a filter that will blurr a moving part (a head ?) of
    the frames. The position of the blur at time t is
    defined by (fx(t), fy(t)), the radius of the blurring
    by ``r_zone`` and the intensity of the blurring by ``r_blur``.
    Requires OpenCV for the circling and the blurring.
    Automatically deals with the case where part of the image goes
    offscreen.
          c                 R    | |      }|j                   \  }}}t         |            t         |            }}t        d|z
        t        |z   |      }	}t        d|z
        t        |z   |      }}
||
z
  |	|z
  f}t	        j
                  |      j                  d      }t        j                  |fddt        j                         t	        j                  dd|z  gz        }||
|||	f   }t        j                  |f      }||z  d|z
  |z  z   ||
|||	f<   |S )	Nr   uint8   )lineTyper   gp?   )shapeintmaxminnpzerosastypecv2circleCV_AAdstackblur)gftimhwdxyx1x2y1y2region_sizemaskorigblurredfxfyr_blurr_zones                   W/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/moviepy/video/fx/headblur.pyflzheadblur.<locals>.fl   s,   U!A"Q%jRU!AahAfHQ2AahAfHQ2eBrEkxx$++G4

4&&#rII	' yyWdN++,"R%B,((4 01<1T64-72b5"R%<	    )r-   )clipr(   r)   r+   r*   r-   s    ```` r,   headblurr0      s+     ~&
v( 772;r.   c                     t        d      )Nzfx painting needs opencv)IOError)r/   r(   r)   r+   r*   s        r,   r0   r0   6   s    011r.   )N)
numpyr   r   headblur_possible__version__LINE_AAr   r0   __doc__doc r.   r,   <module>r:      se    
'!sy!L 


C2 H Ws   &A A