Comments (4)
How reproducible is it? Does it happen to other videos/a camera? Please note that directly calling VideoCapture_() while keeping an instance of cv.VideoCapture in matlab would break its functionality.
from mexopencv.
The cv.VideoCapture
class is just a wrapper around the MEX-function VidepCapture_
, at the same time it uses the MATLAB OOP system to handle the lifetime of the underlying C++ object (delete
function is called when object goes out of scope or explicitly cleared).
So if works when calling the MEX-function directly, it should also work for the class wrapper. Try to call cap.isOpened()
after you open the video.
Side note: pause
is sometimes required if you are opening an actual camera device, I doubt it's needed with a video file stored on disk.
from mexopencv.
I found the problem. I copied all the OpenCV DLL's into the private folder where the MEX files are. This works for most MEX files, only not for the one who dynamically loads the FFMPEG DLL, because this one try's to load the FFMPEG DLL at it's current location and that is of course not the private directory.
The fix was to add some extra lines to my startup script in Matlab:
pathval = getenv('PATH');
opencv_dllpath = fullfile(pwd, '+cv', 'private');
if( isempty(strfind(pathval, opencv_dllpath))
setenv('PATH', [getenv('PATH') ';' opencv_dllpath]);
end
from mexopencv.
Did you follow the steps in the README file, the bin
folder containing the OpenCV DLLs must be put on the system PATH environment variable. That way dynamic loading of libraries works..
If you want to place local copies of the DLLs and skip the PATH
, you must do so in both the +cv
and the +cv/private
folders
from mexopencv.
Related Issues (20)
- Mexopencv using MatLab Runtime
- Using homebrew to install OpenCV==3.4.1
- windows opencv3.4.1 cmake
- Setting up mexopencv for matlab 2018b HOT 2
- No output from cv.getBuildInformation() in Octave 5.1.0
- maybe bug about the queryIdx and trainIdx
- ld: symbol(s) not found for architecture x86_64
- Invalid MEX-file : Missing dependent shared libraries
- [error 3] gcc >= 4.4 g++ >= 4.4 is installed
- v3.2.0 and xfeatures2d HOT 1
- mexopencv not compiling HOT 2
- error in setup opencv and mexopencv
- how Mac to mexopencv HOT 1
- [lib/mexopencv_features2d.o] Error 255 HOT 1
- MxArray::toMoments out of order arguments to cv::Moments
- Consider leveraging MATLAB in your CI
- MATLAB Error: Unrecognized function or variable 'FeaturesFinder_'.
- why can't I use the 'cv.detectMarkers' function???
- Hi all, I have a big problem when I am using matlab R2021a to builed mexopencv. HOT 1
- mexopencv building error
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 mexopencv.