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 given by some sites but while adding the references in window forms applications I got an error.
I don't know where made a mistake.
A reference to “D:\WindowsFormApplication4\windowsForrmsApllications4\bin\debug\testdll.dll”
Could not be added. Please make sure that the file is accessible and that it is a valid assembly or COM Component
Here with I have attached my sample code. Please help me.
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);
}