opencv (c /c++) プログラムを dll ファイルに変換する必要があります。その dll を C# Windows フォーム アプリケーションで使用したいと考えています。
一部のサイトで提供されている方法をいくつか試しましたが、ウィンドウフォームアプリケーションに参照を追加しているときにエラーが発生しました。
どこで間違えたのかわからない。
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
ここにサンプルコードを添付しました。私を助けてください。
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);
}