在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kyamagu/mexopencv开源软件地址(OpenSource Url):https://github.com/kyamagu/mexopencv开源编程语言(OpenSource Language):MATLAB 64.1%开源软件介绍(OpenSource Introduction):mexopencvCollection and development kit of MATLAB MEX functions for OpenCV library. The package provides MATLAB MEX functions that interface with hundreds of OpenCV APIs. Also the package contains a C++ class that converts between MATLAB's native data type and OpenCV data types. The package is suitable for fast prototyping of OpenCV application in MATLAB, use of OpenCV as an external toolbox in MATLAB, and development of custom MEX functions. The current version of mexopencv is compatible with OpenCV 3.4.1. For previous OpenCV 3.x versions, checkout the corresponding tags: For OpenCV 2.x, checkout these older branches: Consult the wiki for help. Table of ContentsStructureThe project tree is organized as follows:
BuildPrerequisite Depending on your platform, you also need the required build tools:
Refer to the Refer to the wiki for detailed build instructions. OpenCVCurrently, mexopencv targets the final 3.4.1 stable version of OpenCV. You
must build it against this exact version, rather than using the bleeding-edge
dev-version of DO NOT use the "master" branch of LinuxFirst make sure you have OpenCV 3.4.1 installed in the system:
At this point, you should make sure that the
If you have all the prerequisites, go to the mexopencv directory and type:
This will build and place all MEX functions inside
You can also work with Octave instead of MATLAB by specifying:
To enable support for contributed modules, you must build OpenCV from both
Finally you can test mexopencv functionality:
Developer documentation can be generated with Doxygen if installed:
This will create HTML files under Refer to the wiki for detailed instructions on how to compile OpenCV for both MATLAB and Octave. OS XCurrently, the recommended approach to install OpenCV in OS X is Homebrew. Install Homebrew first, and do the following to install OpenCV 3:
Otherwise, you can build OpenCV from source, similar to the Linux case. If you have all the prerequisites, go to the mexopencv directory and run (modifying the options as needed):
Replace the path to MATLAB with your version. This will build and place all
MEX functions inside WindowsRefer to the wiki for detailed instructions on how to compile OpenCV on Windows, and build mexopencv against it. In a nutshell, execute the following in MATLAB to compile mexopencv:
Replace the path above with the location where OpenCV binaries are installed
(i.e location specified in Contrib modules are enabled as:
If you have previously compiled mexopencv with a different configuration, don't forget to clean old artifacts before building:
UsageOnce MEX functions are compiled, you can add path to the project directory and
call MEX functions within MATLAB using package name addpath('/path/to/mexopencv');
addpath('/path/to/mexopencv/opencv_contrib');
% recommended
out = cv.filter2D(img, kern); % with package name 'cv'
% not recommended
import cv.*;
out = filter2D(img, kern); % no need to specify 'cv' after imported Note that some functions such as Check a list of functions available by >> help cv; % shows list of functions in package 'cv'
>> help cv.VideoCapture; % shows documentation of VideoCapture Look at the Documentationmexopencv includes a simple documentation utility that generates HTML help
files for MATLAB. The following command creates HTML user documentation
under addpath('/path/to/mexopencv/utils');
MDoc; On-line documentation is available. Unit TestingYou can test the functionality of compiled files by addpath('/path/to/mexopencv/test');
UnitTest; Look at the LicenseThe code may be redistributed under the BSD 3-Clause license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论