Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# OpenCV
I need to convert the opencv (c /c++) program into a dll file. I want to use that dll in c# windows form Application.
I tried some methods which is given by some sites but while adding the references in window forms applications I got an error.
 
This is my program
 
#include "stdafx.h"
#include "cv.h"

 
#include "highgui.h"
#include <stdio.h>

 
void  main(const char*filename)
{
if  (filename ==0)
    {
        printf("The image not loaded\n");
        return -1;
    }
    IplImage* input_im = 0;
    input_im = cvLoadImage(filename);
    cvNamedWindow("InputImage",CV_WINDOW_AUTOSIZE);
    cvShowImage("InputImage",input_im);
    cvWaitKey(0);
    cvDestroyWindow("InputImage");
    cvReleaseImage(&input_im);
 
}
 
When i complied this program its compile within not errors. But When i strated to debugging it shows error as follow error - Unable to start program 'c:\users\my\destop\cam\estlib.dill
 
I don't know where made a mistake.Please help me
Thank you
Posted 27-Jul-12 22:26pm
Edited 28-Jul-12 4:50am
Wes Aday89.9K
v3
Comments
Wes Aday at 28-Jul-12 10:52am
   
Sounds more like you have your DLL project set as the startup project since you can't run a DLL.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You should have a look at the Emgu CV library which basically already does what you need:
http://www.emgu.com/wiki/index.php/Main_Page[^]
  Permalink  
Comments
sampathbc123 at 28-Jul-12 10:46am
   
Thank u for ur comment.But I want to convert the opencv (c /c++) program into a dll file .help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 547
1 ChauhanAjay 170
2 CHill60 130
3 Maciej Los 125
4 RyanDev 108
0 Sergey Alexandrovich Kryukov 9,735
1 OriginalGriff 6,989
2 CPallini 5,825
3 George Jonsson 4,017
4 Gihan Liyanage 3,266


Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 28 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100