title: openCV filter image - replace kernel with local maximum
body: <p><strong>Some details about my problem:</strong></p>
  
  <p>I'm trying to realize corner detector in openCV (another algorithm, that are built-in: Canny, Harris, etc).</p>
  
  <p>I've got a matrix filled with the response values. The biggest response value is - the biggest  probability of corner detected is.</p>
  
  <p>I have a problem, that in neighborhood of a point there are few corners detected (but there is only one). I need to reduce number of false-detected corners.</p>
  
  <p><strong>Exact problem:</strong></p>
  
  <p>I need to walk through the matrix with a kernel, calculate maximum value of every kernel, leave max value, but others values in kernel make equal zero.</p>
  
  <p>Are there build-in openCV functions to do this?</p>