Comments (14)
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.
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.
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.
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.
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.
Any updates? What is the expected time for Linux support?
from opencvsharp.
Any updates?
from opencvsharp.
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.
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.
Debian wheezy — the same problems.
My steps:
- Install clear version of Debian wheezy
- Install opencv 2.4.9 (via this script: https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_9.sh )
- 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.
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.
Thank you. The CMake configuration was fixed: 83caebd
from opencvsharp.
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.
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)
- OpenCV Wrapper Bug: Zero Frame Rate and Count with Special Characters in Filename
- Does an LMSolver equivalent exist in OpenCvSharp?
- Need Help for Warpping and Deskewing
- Parameters for EstimateTransform(IEnumerable<Mat> images, Rect[][] rois)
- Upgrade to OpenCV 4.9 HOT 2
- Size.Zero deleted in 4.9 causing code breaking HOT 1
- Cv2.MinMaxLoc causes Memory leak HOT 4
- Hi I have a problem Exception Info: System.AccessViolationException at OpenCvSharp.Internal.NativeMethods.core_Mat_copyTo_toMat1(IntPtr, IntPtr)
- Linux ARM64 (Native bindings for Linux ARM64) HOT 6
- Unable to find an entry point named 'videoio_VideoWriter_fourcc' in shared library 'OpenCvSharpExtern'. HOT 15
- Feature Request EstimateAffine3D
- opencvsharp4 is missing NuGet package README file
- opencvsharp4.runtime.win is missing NuGet package README file
- opencvsharp4.extensions is missing NuGet package README file
- opencvsharp4.windows is missing NuGet package README file
- opencvsharp4.wpfextensions is missing NuGet package README file
- Setup HOT 1
- how to split r,g,b channel image from Mat data pointer HOT 1
- License boiler plate still not filled in
- Where is Rect.Empty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencvsharp.