title: cvSobel problems - opencv
body: <p>i've got the code below:</p>
  
  <pre><code> // Image Processing.cpp : Defines the entry point for the console application.
   //
   //Save an available image.
   #include "stdafx.h"
   #include "cv.h"
   #include "highgui.h"
   #include "cxcore.h"
  /*
  The purpose of this program is to show an example of THRESHOLDING.
  */
  
  int _tmain(int argc, _TCHAR* argv[])
  {
  IplImage* src = cvLoadImage("D:\\document\\Study\\university of     technology\\semester_8\\Computer Vision\\Pics for test\\black-white 4.jpg");
  IplImage* dst = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,3);
  IplImage* temp1 = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
  IplImage* temp2 = cvCreateImage(cvGetSize(src),IPL_DEPTH_8U,1);
  cvCvtColor(src,temp1,CV_RGB2GRAY);
  cvSobel(temp1,temp2,0,1,3);
  cvMerge(temp2,temp2,temp2,NULL,dst);
  cvNamedWindow("src",1);
  cvNamedWindow("dst",1);
  
  cvShowImage("src",src);
  cvShowImage("dst",temp2);
  
  cvWaitKey(0);
  
  cvReleaseImage(&amp;src);
  //cvReleaseImage(&amp;dst);
  cvDestroyAllWindows();
  return 0;
  }
  </code></pre>
  
  <p>when i run it, there's an warning as the picture below:
  <img src="https://i.stack.imgur.com/WhGLn.png" alt="enter image description here"> </p>
  
  <p>but if i still click on "countinue" button, the result is displayed!
  <img src="https://i.stack.imgur.com/5NZ7L.jpg" alt="enter image description here"></p>
  
  <p>hope someone can give me an explaination !</p>