0

I am using vs 2013 and I have a opencvsharp 2* from nuget I have these codes:

 public List<IplImage> text = new List<IplImage>();
 ...
 IplImage bit = text[0];
 picturebox.Image = text[0].ToBitmap();

But this lines not accepted :

picturebox.Image = text[0].ToBitmap();

ToBitmap is never come Any helps?

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87
j.doe
  • 327
  • 7
  • 22

1 Answers1

1

Use OpenCvSharp3, Mat instance and OpenCvSharp.Extensions.BitmapConverter.ToBitmap() extension method. OpenCvSharp2 project is obsolete.

Relevant quote from OpenCvSharp2 README.md:

#OpenCvSharp 2.4.10 Cross platform wrapper of OpenCV 2.4.10 for .NET Framework.

This project is deprecated. The latest release is available in OpenCvSharp.

See OpenCV: IplImage versus Mat, which to use? thread and Mat - The Basic Image Container docs page.

Community
  • 1
  • 1
Leonid Vasilev
  • 11,910
  • 4
  • 36
  • 50
  • Thank you but when I install opencvsharp3 from nuget I have dll errors – j.doe Aug 07 '17 at 10:29
  • Please check [OpenCVSharp: Unable to load DLL 'OpenCvSharpExtern](https://stackoverflow.com/questions/44105973/opencvsharp-unable-to-load-dll-opencvsharpextern) discussion and [OpenCvSharp3 requirements](https://github.com/shimat/opencvsharp#requirements). OpenCvSharp uses Visual C++ 2015 Redistributable Package. Do you have it installed? – Leonid Vasilev Aug 07 '17 at 10:41
  • hm unfortunaly I am using vs2013 – j.doe Aug 07 '17 at 12:09
  • 1
    You can install Visual C++ 2015 Redistributable Package separately. OpenCvSharp3 requirements page has a link to it. – Leonid Vasilev Aug 07 '17 at 12:27
  • Hi @Lenoid Vasilyev I install opencvsharp3 succesfully and I rewrite my code for it But some codes is not work Can you control my code please Before opencvsharp3 my code has good result butnow not good result because I cant compile 2 code lines – j.doe Aug 07 '17 at 13:41
  • Were you able to successfully assign your image to a `picturebox.Image` property? If so, please accept this answer and ask another question about your current issue. You may want to check [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) guide. – Leonid Vasilev Aug 07 '17 at 14:52