
    #
3j                     *    S SK JrJrJr  S SKrSS jrg)    )grid_coordinatessparse_conv_matrixweights_to_laplacianNc                     U R                   SS u  p#SU-  S-   n[        X2[        R                  " XD45      5      n[	        U5      $ )a>  This function returns a Laplacian matrix with all weights equal to one.

Parameters
----------
image: numpy.ndarray
    Image with shape :math:`h\times w \times 3`
radius: int
    Radius of local window size, defaults to 1, i.e. only adjacent pixels are considered.
   The size of the local window is given as :math:`(2 r + 1)^2`, where :math:`r` denotes         the radius. A larger radius might lead to violated color line constraints, but also
   favors further propagation of information within the image.

Returns
-------
L: scipy.sparse.spmatrix
    Matting Laplacian
N      )shaper   nponesr   )imageradiusheightwidthwindow_sizeWs         _/home/wildlama/miniconda3/lib/python3.13/site-packages/pymatting/laplacian/uniform_laplacian.pyuniform_laplacianr   	   sE    " KKOMFf*q.K5"'';2L*MNA""    )r   )pymatting.util.utilr   r   r   numpyr
   r    r   r   <module>r      s    
 #r   