GithubHelp home page GithubHelp logo

Comments (7)

shimat avatar shimat commented on May 13, 2024

Maybe not. OpenCvSharp depends on target platform of native OpenCV DLL.
When your machine is x86 and native OpenCV libraries are x86, you can use AnyCPU configuration. The program will work successfully. But it will crash on other x64 machine.
I think it is recommended to specify target platform.

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 13, 2024

Please, look to the Tesseract (https://github.com/charlesw/tesseract) soltuion. This library also has separated native binary for x86 and x64: https://github.com/charlesw/tesseract/tree/master/src/lib/TesseractOcr
But the core of the library dynamically loads binary for target platform with help of the WindowsLibraryLoader (https://github.com/charlesw/tesseract/blob/master/src/Tesseract/Interop/WindowsLibraryLoader.cs). This way works perfectly for AnyCPU. So, can you try to apply similar approach in OpenCvSharp. That would be really cool.

from opencvsharp.

shimat avatar shimat commented on May 13, 2024

The Tesseract wrapper implementation is excellent and informative for me. Thank you for your information.

To support Mono is a concern. This function must be enabled only for original .NET Framework on Windows.

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 13, 2024

Ok, I see. However, what if we supplement the Tesseract.Interop approach by cross-platform feature from this post: http://dimitry-i.blogspot.ru/2013/01/mononet-how-to-dynamically-load-native.html
What do you think?

from opencvsharp.

shimat avatar shimat commented on May 13, 2024

Thank you for your additional information. The implementation seems to work fine.

My next fear factor is whether it works on other *nix OS, e.g. BSD, MacOSX. But frankly speaking, my priority of supporting Mono is low. I will care little for Mono at least for a while.

I schedule to release new packages with AnyCPU-support only for Windows in a few days.

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 13, 2024

I schedule to release new packages with AnyCPU-support only for Windows in a few days.

Great!

My next fear factor is whether it works on other *nix OS, e.g. BSD, MacOSX.

I'm now trying to implement this feature (cross-platrfomed LibraryLoader for x86 and x64) for Tesseract (charlesw/tesseract#23 (comment)). In the successful case, I can make pull-request in OpenCvSharp.

from opencvsharp.

shimat avatar shimat commented on May 13, 2024

That's a great offer. Thanks a lot!

I released new packages in the last hour.

from opencvsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.