title: Laplacian Matrix Calculation in C++
body: <p>I have been trying to implement the Digital Matting algorithm described in the research paper named <a href="https://ieeexplore.ieee.org/document/5459326" rel="nofollow noreferrer">Learning Based Digital Matting</a>. </p>
  
  <p>Its MATLAB Code is available <a href="https://www.mathworks.com/matlabcentral/fileexchange/31412-learning-based-digital-matting" rel="nofollow noreferrer">here</a>. I am trying to convert the MATLAB code into C++ using OpenCV 2.4.3 and UMFPACK.</p>
  
  <p>The problem is that the function named <code>getLap_iccv09_overlapping</code> (that calculates the Laplacian Matrix of input image) is not available off-the-shelf in OpenCV and I have to write my own implementation in cpp. I am getting incorrect results from my implementation.</p>
  
  <p>Is there any C/C++ library that offers <a href="https://en.wikipedia.org/wiki/Laplacian_matrix" rel="nofollow noreferrer">Laplacian Matrix calculation</a> of a matrix/image?</p>