我对MATLAB版本的R2012b有一个问题。insertShape
和detectMinEigenFeatures
都是“计算机视觉系统工具箱”的功能。我安装了“计算机视觉系统工具箱”。这是ver
的输出,显示了安装的所有工具箱。
MATLAB Version: 8.0.0.783 (R2012b)
MATLAB License Number: 724504
Operating System: Microsoft Windows 7 Version 6.2 (Build 9200)
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Version 8.0 (R2012b)
Simulink Version 8.0 (R2012b)
Bioinformatics Toolbox Version 4.2 (R2012b)
Computer Vision System Toolbox Version 5.1 (R2012b)
Curve Fitting Toolbox Version 3.3 (R2012b)
DSP System Toolbox Version 8.3 (R2012b)
Fuzzy Logic Toolbox Version 2.2.16 (R2012b)
Global Optimization Toolbox Version 3.2.2 (R2012b)
Image Processing Toolbox Version 8.1 (R2012b)
MATLAB Builder NE Version 4.1.2 (R2012b)
MATLAB Compiler Version 4.18 (R2012b)
MATLAB Report Generator Version 3.13 (R2012b)
Mapping Toolbox Version 3.6 (R2012b)
Neural Network Toolbox Version 8.0 (R2012b)
Optimization Toolbox Version 6.2.1 (R2012b)
Parallel Computing Toolbox Version 6.1 (R2012b)
Signal Processing Toolbox Version 6.18 (R2012b)
Spreadsheet Link EX Version 3.1.6 (R2012b)
Statistics Toolbox Version 8.1 (R2012b)
System Identification Toolbox Version 8.1 (R2012b)
Wavelet Toolbox
我测试的代码如下:
%Create System objects for reading and displaying video and for drawing a bounding box of the object.
videoFileReader = vision.VideoFileReader('visionface.avi');
videoPlayer = vision.VideoPlayer('Position', [100, 100, 680, 520]);
%Read the first video frame, which contains the object, define the region.
objectFrame = step(videoFileReader);
objectRegion = [264, 122, 93, 93];
%As an alternative, you can use the following commands to select the object region using a mouse. The object must occupy the majority of the region.
figure; imshow(objectFrame);
objectRegion=round(getPosition(imrect))
%Show initial frame with a red bounding box.
objectImage = insertShape(objectFrame, 'Rectangle', objectRegion,'Color', 'red');
figure; imshow(objectImage); title('Yellow box shows object region');
%Detect interest points in the object region.
points = detectMinEigenFeatures(rgb2gray(objectFrame), 'ROI', objectRegion);
当我运行这段代码时,我会得到以下错误:
未定义函数“insertShape”和“detectMinEigenFeatures”用于输入“单”和“双”类型的参数
有什么问题吗?
发布于 2013-10-17 14:09:56
在R2012b中有一个解决办法。您可以使用vision.CornerDetector系统对象,它还实现了最小特征值角点检测算法.
https://stackoverflow.com/questions/15938154
复制相似问题