title: Image Sharpening Using Laplacian Filter
body: <p>I was trying to sharpening on some standard image from Gonzalez books. Below are some code that I have tried but it doesn't get closer to the results of the sharpened image.</p>
  
  <pre><code>cvSmooth(grayImg, grayImg, CV_GAUSSIAN, 3, 0, 0, 0);
  
  IplImage* laplaceImg = cvCreateImage(cvGetSize(oriImg), IPL_DEPTH_16S, 1);
  
  IplImage* abs_laplaceImg = cvCreateImage(cvGetSize(oriImg), IPL_DEPTH_8U, 1);
  
  cvLaplace(grayImg, laplaceImg, 3);
  
  cvConvertScaleAbs(laplaceImg, abs_laplaceImg, 1, 0);
  
  IplImage* dstImg = cvCreateImage(cvGetSize(oriImg), IPL_DEPTH_8U, 1);
  cvAdd(abs_laplaceImg, grayImg, dstImg, NULL); 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/3xzkY.jpg" alt="Before Sharpening"> Before Sharpening</p>
  
  <p><img src="https://i.stack.imgur.com/cAq0m.jpg" alt="My Sharpening Result"> My Sharpening Result </p>
  
  <p><img src="https://i.stack.imgur.com/mNFGm.jpg" alt="Desired Result"> Desired Result</p>
  
  <p><img src="https://i.stack.imgur.com/iPNkk.jpg" alt="Absolute Laplace"> Absolute Laplace</p>