title: I need to modify a Sobel kernel for diagonal edge detection. OpenCV and C++
body: <p>I need to apply these two kernels on an image.</p>
  
  <p>+1 0 0
  0 0 0
  0 0 -1</p>
  
  <p>and
  0 0 +1
  0 0 0
  -1 0 0 </p>
  
  <p>And then combine the two output images. But I have no idea how to write the loops/ apply filters to an image in general. </p>