Content Introduction - Intel's openCV libs and the wrapper Features of the wrapper Environment and IDE Installation

Common using of wrapper DLLs Sample binaries Sample sources / Visual Studio Projects Recompile the wrapper library Let's start - A short tutorial Overloading instead of default arguments Error Handling Marshalling - P/Invoke Internal wrapper function calls Table with conversions which has been used The cvtools - class Low level access for pixels and sequences Actual state of implementation and known problems Examples The "BigSample" application Features Included image processing samples How it works Optical flow sample Squares sample

History Contact and frequently Updated In own matter :-) I. Introduction - Intel's openCV Libs and the Wrapper

The OpenCV Library (or Open Computer Vision Library) is a open source computer vision library developed by Intel and first released for the open source domain in 2002. It contains many algorithms and examples for image processing and for machine vision. Some actual links to resources and information are: OpenCV-wikipedia

Provided in the form of a dynamic link library (DLL), the presented wrapper enables you to call the library function from within the modern .NET language C#. Porting my software wasn't the hardest obstacle, but I wasn't familiar with interop mechanism which was need to adopt Intel's library. After searching the net, I found two possible solutions. On one side was SharperCV and on the other EmGuCv. Both projects are quite extensive and cover a rich set on functionality and I have to acknowledge that I got many hints from it and also used some small pieces of code. The underlying reason why I decided to write my own library was to learn more about Platform invoke (P/invoke) and to create a library which is usable, where one can write method calls in a "c-style" manner. Ideally it should take as little effort as possible for a user to learn something about the wrapper and it should be sufficient to only read the original OpenCV documentation and of course some of my documentation.

The OpenCV Library has an extensive amount of highly developed algorithms (more than 400 functions, hundreds of macros, myriads of constants, etc.) so it seemed nearly impossible for a single person to encapsulate all of this. Additionally, there is a lot of overloading and default values. The idea was to write a simple HTML parser that on the one hand was able to extract all function prototypes and descriptions from the OpenCV HTML documentation, and on the other able to generate the necessary code by using predefined rules. With this, I could save a lot of time but because I did not have the time to write a perfect converter and the resulting code was not perfect, much additional handwork was necessary.

. There is no support for exceptions (still not). .). the most important macros. Use trackbars in a child window. constructors.CvReleaseImage(.NET Framework 1. In every case. see cvtools) The conversion to and from drawing types like Bitmap is integrated in the Library and casting operator/function to and from Bitmap are available.: cvlib. cvlib.0 IV.g. Features of the Wrapper The wrapper is provided in the form of a dynamic link library (DLL) All exported methods (e. it is necessary to download the original Intel OpenCV DLLs from the official website at sourceforge or you use the provided link.762 (SP. III. Callbacks are handled by predefined delegates.g.. / 2.converter that would enable me easily wrap classes like ml (machine learning) too. Therefore some lines have been simply copied. Installation I decided to divide this section into several parts depending on what you want to do. cvCanny. a lot of bugs could be fixed till now. This is simply done by call to the appropriate OpenCV functions. cvlib.1.. e. IplImage img.).050727-7600) Microsoft .. CvMat mat). Many thanks here to the community.. mouse callbacks and error handlers in a familiar way. the provided mechanisms of the OpenCV Library can be used.CV_LOAD_IMAGE_COLOR). For error handling..).0 / 3.050727.g.g.Actually I learnt to use the swig . Environment and IDE Visual Studio 2005 Standard Edition Version 8.. Due to requests I now added support for iterations (for example iteration through CvSeq or trees) and low level access without using unsafe code. A few special function arguments are passed by IntPtr. II.Functionname(. and for casting additional support is available (a second tools library. The user has to take care of freeing the unmanaged memory. constant definitions and callbacks are visible through on class. (e. A huge set of samples are available and because of the big resonance. All structure definitions are usable in a familiar way (e.

zip" from the above links and openCV libs (DLLs) for example from here. For the wrapper DLLs. For the wrapper DLLs. if not already done. you will get Debug and Release folder for each sample one more". This can possibly crash your application. Extract zips in a folder of your choice. and bin\Release directories. Each sample source zip contains a complete Visual Studio solution. Extract the zip files in a folder of your choice.6 below: Usage of sample sources / Visual Studio Projects) 2. 3. Go to the project folders of Visual Studio and create bin\" from the above links and openCV libs (DLLs) for example from here. you will get Debug and Release folder for each sample source one more" from the above links and openCV libs (DLLs) for example from here. Run the sample. Select the sample you want and extract. Select either debug DLLs or release versions from the folders and copy it to your project Debug or Release folder. "samples_bin. Sample Sources / Visual Studio Projects Download "cvlib_bin. If you want to try out the Camera Calibration (within the 'bigexample application') there are some images in the folder beside the EXE folder. It is important not to mix debug and release". Extract both zips in a folder of your choice. Add a reference to the wrapper DLL in your Visual Studio project reference tab (how to: look at section 3.1. . Sample Binaries Download "cvlib_bin. "samples_src. Copy the RELEASE versions of the wrapper DLL and all RELEASE openCV DLLs to the sample folders that contain the EXE file. You can use this for teaching and one for undistorting demonstration. Select the sample you want and extract. Common Using of the Wrapper DLLs Download "cvlib_bin. if not already done.

Don't forget to report your extensions or fixes to the community :-) V. Go to your studio environment for a project and look at the left side for references. For your own projects. Your first step is to create a Windows Form application and add all DLLs and a reference to the wrapper as described above in the install section. Also copy the XML" from the above links and extract to a directory of your choice. It will then later be extended with error handling.csproj" file to open Visual Studio project. Create the event handler for the buttons (by double clicking on the control).cs where you want to use the library. The one button is simply to exit the application the other is intended to load an image file in your application. a track bar and it will be shown as to how to retrieve mouse coordinates from the extern OpenCV window. click with the right mouse button and choose "Add Reference". go to the bin/debug folder of your project (depending on whether you are in the debug or release modus) and add only the cvlib. Recompile the Wrapper Library Download "cvlib_src. Let's Start . Add an "openFileDialog" Control from the Toolbox. In the "Open File" button eventhandler. The example illustrates how to implement a simply canny edge detector with its image output in a picture box control and an OpenCV image window. From the menu.dll.Visual Studio project which is provided within the downloads if you don't want to code the small GUI. you also need to add a using-reference ("using OpenCV ") at the top of your *. Change what you want in the code. 4.Copy the DLLs from "cvlib_bin" to the debug and release folder you have just created. Double click "openCV. you can use the "SmallExample" . Add two buttons and a picture box control to your form. select the "Browse" tab page. add the following code: Collapse . Compile the library in debug or release mode.A Short Tutorial For this tutorial. if you want to read the methods tool tip messages generated by the VS intellisense feature.

In the next step. we will add the edge detector. create an external window and show the image in this window. In the file event handler we load an image from file. cvlib. // Create external window cvlib. Type the prefix "cvlib.Image = (Bitmap)img.CvLoadImage(openFileDialog. we first have to create a grey level image and apply a color conversion and we will keep in mind that we now have a second image that has to be released. Because we hold our image in a class variable. But to achieve this. Most of openCV operations start with the prefix "cv". it's quite simple to use the library calls. You are responsible for doing this any time an image has to be released (or any other unmanaged memory) by using the desired calls (see below).CvShowImage( "MyWindow".CV_LOAD_IMAGE_COLOR).private void buttonFile_Click(object sender. to release the unmanaged memory (the IplImage.OK) { // Load image from file img = cvlib.CvNamedWindow("MyWindow". This is because openCV lib expects a pointer to that datatype and wants to perform read and/or write operations to that object. In difference to the original library calls in the wrapper.CV_WINDOW_AUTOSIZE)." and after the dot. one can select the required operation from the list that appears (In Visual Studio with intellisense on). // Show the image in external Window cvlib. all operators start with an uppercase letter. As you can see. we will release the memory in the forms Close event (not shown here). ref img ). at the moment. EventArgs e) { IplImage img if (openFileDialog1. Quite often we pass an argument by reference keyword. Maybe you noticed that I didn't take care. .pictureBox1. // Show the image additional in the Picture Box Control this.FileName. } } It is assumed that the Visual Studio Code Generator adds the name "openFileDialog1" for the file dialog. and disposing the bitmap image).ShowDialog() == DialogResult. cvlib.

// color conversion cvlib.ShowDialog() == DialogResult. img. if (openFileDialog1. 3). // apply the operator cvlib. 100.CV_LOAD_IMAGE_COLOR). cvlib. cvlib. .CvLoadImage(openFileDialog. // Show the input image in the Picture Box Control this.height).CV_WINDOW_AUTOSIZE). 100. EventArgs e) { IplImage img.CvNamedWindow("MyWindow". } } Now you are ready to run the application to see the results. Did it work? I hope. gray.FileName.CvShowImage( "MyWindow".Image = (Bitmap)img. (int)cvlib. ref gray.CV_BGR2GRAY). ref gray. 1). // Show the edge image in external Window cvlib. ref gray ).width.IPL_DEPTH_8U. // create grey channel image gray = cvlib. // Create external window cvlib.OK) { // Load image from file img = cvlib.pictureBox1.Collapse private void buttonFile_Click(object sender.CvCanny(ref gray. cvlib.CvCreateImage(new CvSize(img.CvCvtColor(ref img.

OnTrackbarChangeCallback(OnChange). We will display the mouse coordinates in a label.. Collapse public partial class Form1 : Form { .OnMouseCallback onMouse.dll predefined delegates are already implemented.OnTrackbarChangeCallback onChange.. public Form1() { InitializeComponent().. Because the C# language uses so called delegates for receiving events. private cvlib.. . onMouse = new cvlib. ... } .OnMouseCallback(OnMouse). private cvlib. we must follow these conventions. so one has only to instantiate it. So please add a label control for the text output anywhere on your form window.... In the presented cvlib. onChange = new cvlib. .We are now going to add a track bar control to the external window and receive mouse events. } . We do this by adding two members and allocate it in the forms constructor..

Text = "Event: " + evnt. Feel free to select a name of your choice.Text = value. The names for the handlers (method names) are not restricted. int flags. } . "OnChange" will be called if a trackbar event occurs.ToString() + "\nFlags: " + flags.ToString() + "\ny=" + y. I used "OnChange" and "OnMouse".ToString() + "\nx=" + x. In the example.ToString(). int x. IntPtr param) { labelValue. More important than the names of the eventhandlers are their parameter lists.Now we can add eventhandler for the callbacks. Collapse // this Method is called when Trackbar value changed private void OnChange(int value) { // Set the labels text with trackbar value labelValue. Either you watch the line that will pop up when you typed in the opening brace (in Visual Studio with intellisense on) or you get it from the OpenCV documentation.ToString(). "OnMouse" when the mouse has been moved. } // This Method is called when the mouse is moved around the child window private void OnMouse(int evnt. int y.

So I decided to only support a few combinations and ..OK) { ..add . if (openFileDialog1. onChange). VI. ref value. Extend your File Dialog Method now with the following lines: Collapse // Position of the trackbar int value = 0.CV_WINDOW_AUTOSIZE).CvNamedWindow("MyWindow".. "MyWindow".CvSetMouseCallback("MyWindow". } The identifier for the callback routines are passed as parameters without the ref keyword.y" variables. This leads to a problem in C# because default arguments are not supported and due to the possible numbers of combinations of structure types and default values.ShowDialog() == DialogResult. Overloading Instead of Default Arguments One of the features of the openVC lib is the possibility of overloading and default arguments. 100. // Create external window cvlib. cvlib. the window name "MyWindow" is an additional parameter.. I put the processing stuff in a separate method called Process() and moved the creation of the external window in the forms constructor.add // Set the mouse callback eventhandler cvlib. Within the example code. TrackbarName is the leading string of the ruler and specifies its function.CvCreateTrackbar ("TrackbarName". onMouse. // < -. // Create the trackbar cvlib. Because OpenCV identifies the relationships between windows by strings. IntPtr. will be updated every time the mouse has been moved. for example. // -.The "x.Zero).

different methods to get information if an error occurs. a message box pops up by default and depending on which button you choose (cancel. The first decision you have to make is regarding the error mode. The first way is to ask for the Error status.CvGetErrStatus() and react. but no error handler is called. or you get informed about errors within a callback. when the program is internally terminated some unwanted behaviour can occur and of course this can also happen if you continue because some values are undefined. It is useful for debugging. Error Handling The OpenCV Library offers two major. User may check error code after calling CxCore function with cvlib. that. The stack is unwinded (it is done w/o using C++ exception mechanism). as the error is signalled immediately after it occurs. VII. You have three options (some text copied from the OpenCV-documentation): Leaf The program is terminated after error handler is called. OpenCV does not support exceptions. there is a way to distinguish whether you want to continue program execution or suspend the application. . This is the default value. ignore) the application exits or crashes in most cases and the try-catch block is ignored. but the error handler is called. However. try again. It is important to know. So if you put a try-catch block and a error happens in a function call. Silent Similar to Parent mode. You can define your own error handler or use the predefined handler (see below) Parent The program is not terminated. The following example shows how to allocate data for the CvMat component. Furthermore.added partial overloading for default values. for production systems other two methods may be preferable as they provide more control. Maybe I will build a better support for the ubiquitous CvArr type if I will get a good idea to do this.

RedirectError(. } private void buttonFile_Click(object sender.. // create a instance and pass your error handler method name onError = new cvlib. The usage is similar to a mouse or trackbar callback (with a delegate).CvGetErrStatus() and react..CV_ErrModeParent). Collapse public partial class Form1 : Form { // define the error delegate member cvlib. // redirect the error to use your error handler against the predefined handler // (Message Box) cvlib.CvRedirectError(onError).If you use Silent mode.OK) .CvSetErrMode(cvlib..OnErrorCallbackDelegate(OnError). For defining you own error handler (this is suggested) you have to redirect the error by using the cvlib. EventArgs e) { ..) method where you pass your own error handler as an argument. // advise the CvLib to work in Parent mode (call error handler but don't exit) cvlib.ShowDialog() == DialogResult.OnErrorCallback onError. The following code snippet illustrates the variants (using the example from above). // Constructor public Form1() { InitializeComponent(). you may check after calling a function with cvlib. if (openFileDialog1.

CvCanny(ref gray.CvReleaseImage(ref img). 100. string func_name.CvGetErrStatus() != 0) { // do some clean up cvlib. ref gray. string file_name.. int line) { MessageBox. } } . string err_msg. // check for error (variant 1) if (cvlib... // return for example or throw exception return.{ . 100. // apply the operator cvlib. 3). // !! important set error status back cvlib.. } // your error handler private int OnError(int status.CvSetErrStatus(0).Show( "Status: " + cvlib.CvErrorStr(status) + "\nIn Function: " + func_name + "\nMessage: " + err_msg + .

MessageBoxIcon.PointerToStructure conversion. avoid this!! return 0. otherwise the image is scaled /// to fit the window. "CV-Error".P/Invoke 1.cs for illustration: Collapse /// <summary> /// The function cvShowImage shows the image /// in the specified window. classes like the ml class are still not supported at moment. it is converted to the desired structure definition by using the Marshal.OK.Error). Marshalling .CvReleaseImage(.</param> . the DllImportAttribute class has been used. Structures (like the IPL image structure) passed by reference to avoid read / write access violations. The returned pointer is saved as an additional parameter in the structure definitions and used for releasing the allocated memory when the corresponding release call is processed (like cvlib. Internal Wrapper Function Calls Most of wrapper internal DLL-calls follow simple rules. If the called function returns a structure pointer. use the functions available in the cvtool class. Because this class can handle only static library functions. MessageBoxButtons.)).ToString(). Strings are converted by using the desired convention (LPStr). To converts these arguments. Void* pointers are passed by IntPtr. } VIII.. To access the unmanaged functions. All primitive data types including one dimensional arrays are passed directly or by reference. // a return value 0 means application is suspended. The next lines shows a short extract from the highgui.. If the window was created /// with CV_WINDOW_AUTOSIZE flag then the image is shown /// with its original size."\nIn File: " + file_name + "\nOn Line: " + line. /// </summary> /// <param name="name">The name of the window.

uint64. uint. float. int[] for reading/writing one dimensional float* ref float.LPStr)] String function reads a string. ref IplImage image) { cvShowImage(name. Struct** ref IntPtr Most in case that data will be deallocated.</param> public static void CvShowImage( string name. ref IplImage image).Ansi. int[] arrays int. 2.LPStr)] String name. float[] ref for reading/writing single value./// <param name="image">The image to be shown. It is regarded only to the arguments in method calls for the OpenCV library and has not been tested for common Windows API calls. ref image). IntPtr For structs that contains pointers like IplImage (ref) and arrays of structs (cvtools should be used for conversion). UInt64. What is explained is HOW the arguments are passed and gives hints when the cvtool-class can be used for adapting. uint. } [DllImport(HIGHGUI_LIBRARY)] private static extern void cvShowImage([MarshalAs(UnmanagedType. CharSet = CharSet. float[] for reading/writing one dimensional arrays Struct struct For structs that contains only primitive datatypes for reading like CvPoint Struct* ref struct. In cases that the char* [MarshalAs(UnmanagedType. double Random Number Generator int* ref int. double uint64 = cvRNG is the seed for the ref for reading/writing single value. . API-Type Passed in C# as (input and/or output argument) Explanation/Hints int. float. Table with Conversions that has been used The table shows the used analogies for declaration of OpneCV API types in C#.

out GCHandle[] handles) Convert1DArrToPtr(byte[] arr. "Interop-Marshalling". it is very simple to handle the c-pointer types. Marshalling data with Platform invoke" and "Datatypes for Platform invoke". the changes in values within the unmanaged memory will be visible in the managed environment. void* CharSet = CharSet. byte[] arr) . In cases that the function allocates a string and IntPtr Use cvtools. out GCHandle handle) ConvertStructureToPtr(object structure. For most of the methods. out GCHandle handle) Convert1DArrToPtr(int[] arr. The cvtool Class By using the methods of the cvtool class.char* ref StringBuilder returns it. out GCHandle handle) Convert1DArrToPtr(double[] arr.PointerToStructure conversion has been used or the return values are passed unchanged to the caller. Type typeOfStructure) ConvertPtrToArray(IntPtr data. or pass structure by using the ref keyword void** ref IntPtr There are additional return value conversions. The follow listing shows the available conversion routines. out GCHandle handle) Convert1DArrToPtr(CvPoint2D32f[] arr. out GCHandle[] handles) Convert2DArrToPtr(int[][] arr. 3.Ansi. Convert2DArrToPtr(byte[][] arr.NET Framework documentation under the Keywords "Programing with .Convert2DArrayToPtr(). out GCHandle handle) ConvertPtrToStructure(IntPtr p. "Communication with unmanaged code". out GCHandle handle) Convert1DArrToPtr(float[] arr. Mostly the Marshal.Convert1DArrayToPtr() or the desired function Use cvtools. out GCHandle[] handles) Convert2DArrToPtr(double[][] arr. out GCHandle[] handles) Convert2DArrToPtr(float[][] arr.NET Framework". Microsoft describes the analogies in the .

cvlib. 2. 0. the OpenCV Library offers some macros. For accessing raw data.4). 3. cvlib. // set data cvlib. It will be shown how to access and manipulate either Image/Matrix data by using macros or by directly accessing the raw data by either using safe or unsafe code. 0. 1. For unsafe operations it is necessary to turn on this option in Visual Studio.. int[] arr) ReleaseHandels(GCHandle[] h) ReleaseHandel(GCHandle h) IX. 0 . You can do this by clicking the check on the "allow unsafe code" checkbox in the build tab of your project options. This are: CvPtr*D CvSet*D CvGet*D CvGetReal*D CvSetReal*D Here are the first examples of how to read/write data by using one of the macros: Collapse // Create a matrix CvMat m = cvlib. float[] arr) ConvertPtrToArray(IntPtr data.ConvertPtrToArray(IntPtr data. 12.CvSetReal2D(ref m. // read data at index 0.CvSetReal2D(ref m. 0. . Low Level Access for Pixels and Sequences Low level operations are illustrated in the next sample.CV_64FC1).4). double[] arr) ConvertPtrToArray(IntPtr data..CvCreateMat(3.

Notice that members of the cvtools class output a Handle to connected memory. 4. 3. 10. 4. 5. . 0).ReleaseHandel(h). 8.. 7.CvGetReal2D(ref m. 9.double res = cvlib.. cvlib. 4. After releasing the handle. The second example shows how to allocate data for the CvMat Component. 6.. out h).CV_64FC1.1. 3.. Release the handle not earlier than you don't need the memory anymore. cvlib.CV_64FC1). // fill our matrix with data cvlib. // dispose cvtools.2. Collapse // a array with doubles double[] a = { 1.Convert1DArrToPtr(a. 0. 12 }. cvlib.CV_AUTO_STEP). the memory is available for the garbage collector. // do anything with the matrix //. //.CvInitMatHeader(ref ma.CvCreateMat(3. cvtools. // the garbage collector will not touch the double array GCHandle h. 2. 11. // create a matrix with 3 rows and 4 columns CvMat ma = cvlib. // as long as the handle (h) is not disposed.

CV_CHAIN_APPROX_SIMPLE.ConvertPtrToStructure(p. cvlib. . cvlib.CV_POLY_APPROX_DP. The next sample source shows how to achieve this goal. 0)). ref storage. // Do anything with that pointer for example find contours cvlib.SizeOf(typeof(CvContour)). // Get the next contour element contours = (CvSeq)cvtools. 10. typeof(CvSeq)).SizeOf(typeof(CvContour)). ref storage. Collapse // Create a Sequence .Zero) { // Do anything with the partial contour for example approximate polygonal CvSeq result = cvlib. // Get a pointer to the sequence GCHandle h. IntPtr p = cvtools.CvFindContours(ref gray.Now we want to iterate through a sequence. 0). Marshal. // iterate while (p != IntPtr.ConvertStructureToPtr(contours. ref p.CV_RETR_LIST. Marshal. new CvPoint(0. say that will be a set of contours CvSeq contours = new CvSeq().CvApproxPoly (p. out h). cvlib.

Suppose we have a colour image (IplImage image) and want to fill a rectangular area with top left at P(10.. This is similar to: image[y * imageWidthStep + x]. } } .ToInt32(). imageWidthStep may be shorter than actual image width because of boxing or an ROI. y++) { byte* dst = (((byte*)(baseAddress + image. The image data base address is given by the imageData IntPtr class. Finally we will show how to colorize an image area by using unsafe access. } cvtools. dst[0] = 0. x 100.p = contours.h_next. 100).widthStep * y))[x * 3])... 10) and width and height = (100. Collapse unsafe { . } . // iterate for (int x = 10.ReleaseHandel(h). dst[1] = 0. x++) { for (int y = 10. dst[2] = 255. y 100. We will get the actual address for writing data by offsetting this base address. // get base address int baseAddress = image.imageData..

} } . typeof(float))..PtrToStructure(new IntPtr(baseAddress + baseAddress . // iterate for (int x = 10. y++) { float result = (float)Marshal. // get base address int baseAddress = image. Collapse . x 100.At least a similar example like the above but without unsafe access and reading a float.. y 100.imageData. Notice the "4 * x" that means the float datatype is internally represented by 4 bytes of data..ToInt32(). x++) { for (int y = 10. X Actual State of Implementation and Known Problems cxcore is most complete cv is most complete highgui is most complete Machine learning and cvaux is open There is a problem deallocation CvMemStorage reported by Carsten C: ..widthStep * y + 4 * x).

// Do some funny things with the sequence cvlib. for (int i = 0. Marshal.SizeOf(typeof(CvPoint)). Examples 1. The "BigSample" Application .Collapse for (int i = 0. CvSeq sequence = cvlib.CvReleaseMemStorage(ref parentStorage). XI.CvReleaseMemStorage(ref storage). Marshal. // == seems not to be needed } cvlib.CvCreateSeq(0.CvCreateMemStorage(0). i++) { CvMemStorage storage = cvlib.CvCreateMemStorage(0). i 100000. Marshal.SizeOf(typeof (CvPoint)).CvCreateSeq(0. // Do some funny things with the sequence cvlib.CvCreateChildMemStorage(ref parentStorage). Marshal.CvClearMemStorage(ref storage). ref storage). CvSeq sequence = cvlib. i++) { CvMemStorage storage = cvlib.CvReleaseMemStorage(ref storage). // == does actually not release sequence } Here is the solution (Thanks Carsten): Collapse CvMemStorage parentStorage = cvlib.SizeOf(typeof (CvSeq)). ref storage). // == needed cvlib. i 100000.SizeOf(typeof(CvSeq)).

Simple real time processing of your own code.Features Load and save images of different image formats supported by the OpenCV Library. Display live video from webcam or file by using HighGUI functions. Choose from a set of image processing operators which are directly adapted from the samples distributed with latest OpenCV package. See how to implement a non modl dynamic configurable dialog Included Image Processing Samples Canny Edge detector Dilate filter Erosion filter Harris corner detector Sobel filter Laplace filter Watershed Transformation Pyramid Segmentation Calibration (Teach) Calibration (Correct) HAAR Classifier (Faces) Contour finder Hough Lines Hough Circles Convert2Gray Line Approximation Ellipse Approximation .

all properties and methods are arranged by regions. The 'operations' combo-box SelectedIndexChanged-Method has been placed within the "Process Menu" region. you should first collapse all definitions to get a good overview. Every time the index is changed. this method creates a dynamic dialogbox with corresponding controls adequate to the selected image processing task. definitions are: Process Run Process Menu Video Start / Stop / Timer Under "Process Run" you will find the eventhandler that is executed when the "Run" button was pushed. Inside the mainForm.Several Histograms Equalize Histogram Hue-Sat Histogram Good Features to Track Singular Value Transformation Matrix Multiplication Perspective Transform Random number Generator demo All Moments and Hu Moments Flood Fill Template Matching How It Works The presented application is intended for reference or to be a good starting place to build your own Application. The if-constructs check for the actual selected entry in the 'operations' combo-box and branches to the corresponding image processing method. Most importantly. . Within Visual Studio IDE.cs file.

zzn. Each of the functions takes only one parameter. Depending on the selected mode. the actual. License This article. don't hesitate to contact me. additional samples.0.0.3. February. So it is simple to find the corresponding code for reuse. the resulting image of an operation will be displayed in a new tab or the actual tab page. 2009: Library updated.For every image processing operation.. August. along with any associated source code and files. CodeProject article updated XIII Contact and Frequently Updated cvlib@cardijn. (please use email above). 2008: Library first published v 1. XII History v 1.. loaded image in IPL Homepage XIV In Own Matter If you need help or advice or assistance in a project on any area of image processing. is licensed under The Code Project Open License (CPOL) About the Author Mummin . I wrote a separated class placed in different files.0.

Sign up to vote on this title
UsefulNot useful