title: Having trouble creating a class based implementation of OpenCV's mouseCallback function
body: <p>As the title suggest, I'm having some trouble implementing OpenCV's mouseCallback function in a class based C++ structure. Allow me to explain. I have defined a class called BriskMatching in which I have created a member function named mouseCallback with the correct parameters that OpenCV requires (please see the code snippet below).</p>
  
  <pre><code>**Briskmatching.h**
  
  class BriskMatching
  {
  public:
      BriskMatching();
      ~BriskMatching();
  
  public:
      void mouseCallback(int event, int x, int y, int flags, void *param);
  };
  </code></pre>
  
  <p>This is all fine, however my problem arises when I try to set this function as the designated mouse callback function through OpenCV's <code>cv::setMouseCallback</code> function.</p>
  
  <p>In my main function, I create an instance of the BriskMatching class called briskMatcher then when it comes time to set the mouse callback I attempt to do it like so...</p>
  
  <pre><code>cv::setMouseCallback("Matches", BriskMatching::mouseCallback, &amp;matchesImg);
  </code></pre>
  
  <p>Unfortunately, this throws an error.</p>
  
  <pre><code>Error   3   error C3867: 'BriskMatching::mouseCallback': function call missing argument list; use '&amp;BriskMatching::mouseCallback' to create a pointer to member c:\users\mobilef\documents\visual studio 2010\projects\opencv_objtracking\opencv_briskmatching\main.cpp 54  1   OpenCV_BriskMatching
  </code></pre>
  
  <p>I could get rid of this error by declaring the mouseCallback function as <code>static</code> in <code>BriskMatching.h</code> but then I get a whole whack of other errors since I refer to many non-static member variables in the mouseCallback function.</p>
  
  <p>So my question to you guys is this. How should I modify my code to be able to properly pass my mouseCallback function declared within the BriskMatching class to the <code>cv::setMouseCallback</code> function? </p>
  
  <p>Thanks for all your help in advanced!</p>