Giter VIP home page Giter VIP logo

Comments (14)

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

New version of the library: https://github.com/AndreyAkinshin/InteropDotNet
Also I did cross-platform AnyCPU support for .NET Tesseract wrapper: charlesw/tesseract#107
It really works =)

from opencvsharp.

shimat avatar shimat commented on May 23, 2024

I am sorry for the late reply. Your new solution is so great. Thank you.

I have a question. To use your solution, I understand that release package should be bundled with Win32 library (.dll) and Unix library (.so). I think a .so file that built in Linux probably does not work in BSD. So I have to bundle a package with many library files for all platforms. This is not realistic. Is this understanding mistaken?

In general, Unix platforms have some powerful package managers (e.g. apt, yum, homebrew, ...). For example, the command apt-get install libopencv-dev puts all OpenCV library files to our environment and sets the path to them. So, DllImport can load library file without any care. I think there are few motivation points to distribute *.so library files.

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

This is not a problem. I can implement any logic for library name resolving. Please, look to the LoadLibrary method of the LibraryLoader class. That's all we need. So, I can implement new logic myself if you tell me what you want for each platform.

from opencvsharp.

shimat avatar shimat commented on May 23, 2024

I understand the name resolving logic. It is cool.

My fear is that I need to prepare many many OpenCV library files for all platforms on every OpenCV version upgrade. This is a different problem from your system.

By the way, the Mono's DllMap system seems to have name resolving system that is similar to your project.

<configuration>
    <dllmap dll="libc">
        <dllentry dll="libdifferent.so" name="somefunction" target="differentfunction" />
        <dllentry os="solaris,freebsd" dll="libanother.so" name="somefunction" target="differentfunction" />
    </dllmap>
</configuration>

http://www.mono-project.com/Config_DllMap

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

My fear is that I need to prepare many many OpenCV library files for all platforms on every OpenCV version upgrade.

Ok, I get it. I think that it is not a problem to use installed opencv library from specific os system folder.

By the way, the Mono's DllMap system seems to have name resolving system that is similar to your project.

I met a problem with native dependences between libraries when I tried apply the DllMap aproach for Tesseract wrapper. If you can use DllMap for OpenCvSharp, it will be so great. In this case you can use DllMap for Mono and WindowsLibraryLoader for MS .NET Runtime. But if you also meet some problems, I am ready to update my InteropDotNet library for you needs.

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

Any updates? What is the expected time for Linux support?

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

Any updates?

from opencvsharp.

shimat avatar shimat commented on May 23, 2024

I am very sorry for the late reply 🙇

I am sorry but I think it has little significance because Mono's DllMap works fine on my environment (Debian wheezy & MacOSX). DllMap config files are already attached to the OpenCvSharp release packages.

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

Ok, I will try it. But now I have some troubles with OpenCvSharpExtern building under Debian. There is an error:

CMake Error at OpenCvSharpExtern/CMakeLists.txt:73 (add_library):
  Cannot find source file:

    CvANN_MLP.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

What should I do? Can you provide ready binaries of the OpenCvSharpExtern library for popular Linux distributives (like Debian)?

from opencvsharp.

AndreyAkinshin avatar AndreyAkinshin commented on May 23, 2024

Debian wheezy — the same problems.

My steps:

  1. Install clear version of Debian wheezy
  2. Install opencv 2.4.9 (via this script: https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_9.sh )
  3. Download last version of OpenCvSharp:
git clone https://github.com/shimat/opencvsharp.git 

to opencvsharp directory.
4. Run

cmake .

from the opencvsharp/src directory.
5. Get the same error:

CMake Error at OpenCvSharpExtern/CMakeLists.txt:73 (add_library):
  Cannot find source file:

    CvANN_MLP.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

What am I doing wrong?

from opencvsharp.

eAi avatar eAi commented on May 23, 2024

I'm having the same issue building on OS X 10.9 - I'd love to know what I'm doing wrong as I've been banging my head against this wall for quite a while now!

from opencvsharp.

shimat avatar shimat commented on May 23, 2024

Thank you. The CMake configuration was fixed: 83caebd

from opencvsharp.

wind39 avatar wind39 commented on May 23, 2024

Please forgive me and correct me if I'm wrong.

This cross-platform approach means my application would have all opencv .so (or .dll, for Windows) files in the bin folder, so the user wouldn't need to install opencv on his machine?

Assuming the size of my application is not an issue, did I get it right? Is there a way to do it with OpenCvSharp?

Thanks in advance! :)

from opencvsharp.

shimat avatar shimat commented on May 23, 2024

I fixed Cmake config problems of OpenCvSharpExtern. (please discuss this issue in #10)

win39> I guess you are right. but I do not know much about shared library in unix.

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.