Q:

Modifying EmguCV to add a missing function using P/Invoke

It has been a month now while I am making a robot that would explore an unknown area and would make a 3D map using the Kinect sensor. 
As I am a C# developer, I am using EmguCV as a wrapper to the OpenCV library to use its functions for the computer vision. 
For a certain purpose I would like to use the "estimateAffine3D" function provided by OpenCV but it has not been added to EmguCV yet.  Therefore I thought of using "P/Invoke" calls to use the function the way Emgu does it.  I opened the source of Emgu, found the CvInvoke class and the calib3d class.  In that I added the function like this:
  [DllImport(OPENCV_CALIB3D_LIBRARY, CallingConvention = CvInvoke. CvCallingConvention)]
  [return: MarshalAs(CvInvoke. BoolToIntMarshalType)]
  public static extern bool cvEstimateAffine3D(
     IntPtr srcpt,
     IntPtr dstpt,
     out IntPtr outp,
     out IntPtr outliers,
     double ransacThreshold = 3.0f,
     double confidence = 0.99f);

(Sorry for any obvious errors: I am just a newbie at P/Invoking)
The thing won't work at all.  If a put a breakpoint on it and visual studio hits it, it would't stop at the breakpoint, just continue! 
Please help! 
Any help would be appreciated...
Thanks! 
Best

A:

I finally ended up using a library called Mobile Robotics Programming Toolkit, and made a C++/CLI wrapper to expose functions to c#...

