title: Iterate over pixels of an image with emgu cv
body: <p>I want to iterate over all pixel of an image and compare with a search pattern. With best performance possible and in C#. I found emgu cv, a wrapper for Intels opencv. But I don't know how to use emgu properly. Does anybody know how I can do this? What is the data Property of Image? Is this the imagedata? If yes, which value is what? Thanks</p>
  
  <h3>Update:</h3>
  
  <p>I coded my function in C# and it worked well, but way too slow! I had already an algorhytm in c which I translated into C#. C# is 3 to 4 TIMES slower than c! (My function iterates over almost every pixel of an image to seek a shape in an image. -> Hugh Transformation)</p>
  
  <p>Well, I heard that unsafe code could be faster because it does not check array boundries and stuff. Is that true? Runs unsafe code directly on the physically machine?</p>
  
  <p>Anyway, I tried to put unsafe code into my function. But I was not able to get a pointer to my 3D-array or to access the 3D-array with the pointer. How can I rewrite this code from above with unsafe code? And would this bring an additional performance boost or even run as fast as c-code?</p>