Comments (7)
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.
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.
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.
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.
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.
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.
That's a great offer. Thanks a lot!
I released new packages in the last hour.
from opencvsharp.
Related Issues (20)
- ubuntu22, net6.0 use OpenCvSharp4 throw exception: Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies. HOT 9
- VideoCapture opens wrong camera
- PNG Images isn't working for osx arm HOT 2
- RaspberryPi 4b. Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies
- NuGet package name for Ubuntu contains a typo(?) HOT 1
- where is `cv2.createBackgroundSubtractorMOG2()` function? HOT 1
- [Error]System.DllNotFoundException
- 'Could not load type 'OpenCvSharp.VideoCapture' from assembly 'OpenCVSharp'
- How to reflect changes in the opencvsharp on opencv_files?
- CornerMinEigenVal() changes format of src input array HOT 3
- InputArray.Create() for Point3d HOT 1
- Whether there are plans to implement open3D
- MatchTemplate results are inconsistent or incorrect HOT 1
- 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
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.