我试图从MathWorks公司的网站得到这个Matlab的例子与倍频4.0.0工作:Matlab与八度兼容性 - 计算机视觉差异?
http://www.mathworks.com/help/vision/examples/motion-based-multiple-object-tracking.html
我做什么我到目前为止,一个GitHub的宝库,它主要是一个重新格式化上述MathWorks的版本链接:
https://github.com/MicrocontrollersAndMore/Matlab_Octave_Multiple_Object_Tracking
只是到目前为止我所作出的变化是:
订做一个单独的主.m文件运行multiObjectTracking.m
- 由于我没有MathWorks使用的'atrium.avi'文件,因此我将代码中的VideoFileReader行更改为使用'768x576.avi',它随附于的OpenCV( '768x576.avi' 也上传到上述链接的GitHub库)
-Minor间距和注释改变
- 增加 “PKG负载图像;”在main.m和multiObjectTracking.m的开头,在几个测试Octave计算机视觉程序中,我这样做似乎是必要的,否则我会得到一个错误的影响,“库图像已安装但未加载”
目前,当我运行该程序,我得到以下错误:
error: 'vision' undefined near line 38 column 18
error: called from
multiObjectTracking>setupSystemObjects at line 38 column 16
multiObjectTracking at line 14 column 7
main at line 14 column 1
在功能换句话说:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function obj = setupSystemObjects()
% initialize Video I/O, create objects for reading a video from a file, drawing the tracked objects in each frame, and playing the video
obj.reader = vision.VideoFileReader('768x576.avi'); % create a video file reader
obj.videoPlayer = vision.VideoPlayer('Position', [20, 400, 700, 400]); % create two video players, one to display the video,
obj.maskPlayer = vision.VideoPlayer('Position', [740, 400, 700, 400]); % and one to display the foreground mask
% Create System objects for foreground detection and blob analysis
% The foreground detector is used to segment moving objects from the background. It outputs a binary mask, where the pixel value
% of 1 corresponds to the foreground and the value of 0 corresponds to the background
obj.detector = vision.ForegroundDetector('NumGaussians', 3, 'NumTrainingFrames', 40, 'MinimumBackgroundRatio', 0.7);
% Connected groups of foreground pixels are likely to correspond to moving objects. The blob analysis System object is used to find such groups
% (called 'blobs' or 'connected components'), and compute their characteristics, such as area, centroid, and the bounding box.
obj.blobAnalyser = vision.BlobAnalysis('BoundingBoxOutputPort', true, 'AreaOutputPort', true, 'CentroidOutputPort', true, 'MinimumBlobArea', 400);
end
的“愿景”的对象不被认可。
这是我的理解,'视觉'是Matlab的工具箱的一部分,但我无法证实这一点,因为我没有访问Matlab。
因此,这里是我的问题至今:
-Is有一个八度相当于“愿景”对象?
- 我应该注意哪些其他差异才能使这个Matlab程序在Octave下运行?
我一直在尝试使用以下站点:
http://www.peterkovesi.com/matlabfns/
但不是很成功,到目前为止获得这些例子的工作或为导向,以Matlab来倍频翻译我试图。
Octave专家或那些已经获得计算机视觉在Matlab和Octave中工作的人的任何帮助将不胜感激。
感谢您的信息。所以,我现在有的其他问题是: - 你认为将上述Matlab程序翻译成Octave是一项无望的任务吗? 在Octave的“图像”包中寻找,它的功能似乎与Matlab中的“视觉”类似,它们是非常接近还是完全不同? (继续下一篇文章,我用完了字符......) – cdahms
- 我在OpenCV C++和Visual Basic(使用Emgu CV作为OpenCV的包装器)中非常流利。在一个屏幕上阅读Matlab示例,并将其转换成OpenCV C++/VB在我的其他屏幕上,尽管我无法运行Matlab示例,会更好吗?或者你会建议我不断尝试将Matlab示例首先转换为可用的八度示例? 在这一点上,我的意图是跳过Octave并直接转换为C++或VB,因为我的Octave体验非常小。 (继续下一篇文章,我再次用完字符......) – cdahms
再次感谢迄今为止的信息,我不希望任何人将我的Matlab程序一行一行地转换成Octave,当然,这是由我来做的,但如果你可以提出一些建议,以提供进一步的方向,将非常感激,谢谢! – cdahms