Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Pixels and Object Tracking : Emgu CV or Aforge.Net? which one is faster and easier?

I am new to Image Processing and Machine Vision. I am going to write a simple app which works with multipage TIFF files and does some object tracking on them. I implemented the whole story in Mathematica 8 and now I'm going to write a real application in C# with a WPF skin. What API is the best for me? Aforge.Net or Emgu CV? and from where should I start?

like image 325
MostafaMV Avatar asked Nov 06 '22 00:11

MostafaMV


1 Answers

You can even just use plain ol' C#; I did my image processing code using the ideas from http://coolthingoftheday.blogspot.com/2008/04/lock-your-bits-faster-c-bitmap.html and http://www.codeproject.com/KB/GDI-plus/pointerlessimageproc.aspx. Basically, you copy the array of data (for a bitmap, TIFF, etc) to your own managed array, manipulate the managed array, then copy the data back when you're done. I recommend using integer math and a bit of bitshifting if you're interesting in speed; these two optimizations gave me a combined 70-fold speedup over plain GetPixel and SetPixel.

Also, I recommend using bitmaps for simplicity's sake initially; you can change to TIFF if you need the memory compression or if cache misses are a concern.

like image 149
GGulati Avatar answered Nov 11 '22 08:11

GGulati