未定义的函数“showMatchedFeatures”“SURFPoints”类型的输入参数。

14日视图(30天)
我想从事一个项目,类似于下面的链接;作为第一步,我试图使确切的链接 //www.tatmou.com/help/vision/gs/object-detection-and-tracking.html btt5qyu ,但是当我得到这个错误编译代码
未定义的函数“showMatchedFeatures”“SURFPoints”类型的输入参数。比较误差(46)行showMatchedFeatures (boxImage, sceneImage matchedBoxPoints,…
比较是我的函数的名称。我不知道如果我的matlab版本与matlab R2012a这个错误我有。
如果真正的
函数[图片]=比较(Img)
%阅读参考图像
我= imread (“C: \ \用户用户桌面\ Matlab-Comparsion \ 2. \ jpg”);
C = rgb2gray(我);
boxImage = C;
图;imshow (boxImage);
标题(一个盒子的图片);
%的阅读目标图像
2 = imread (“C: \ \用户用户桌面\ Matlab-Comparsion \ 1. \ jpg”);
CC = rgb2gray (II);
sceneImage = CC;
图;
imshow (sceneImage);
标题(“一个混乱的场景的图像”);
%检测图像特征
boxPoints = detectSURFFeatures (boxImage);
scenePoints = detectSURFFeatures (sceneImage);
%可视化参考图像中发现的最强的特征点。
图;
imshow (boxImage);
标题(100年从盒子里最强的特征点图像);
持有;
情节(boxPoints.selectStrongest (100));
%可视化最强的目标图像中的特征点。
图;
imshow (sceneImage);
标题(300年最强的从场景图像特征点);
持有;
情节(scenePoints.selectStrongest (300));
%提取在图像兴趣点的特征描述符。
[boxFeatures, boxPoints] = extractFeatures (boxImage boxPoints);
[sceneFeatures, scenePoints] = extractFeatures (sceneImage scenePoints);
使用描述符%匹配特性。
boxPairs = matchFeatures (boxFeatures sceneFeatures);
%显示推定地匹配特性。
matchedBoxPoints = boxPoints (boxPairs (: 1):);
matchedScenePoints = scenePoints (boxPairs (:, 2):);
图;
标题(“推定地匹配点(包括异常值)”);
*%这就是编译器指示线46 *一个错误
showMatchedFeatures (boxImage sceneImage matchedBoxPoints,
matchedScenePoints,“蒙太奇”);
% estimateGeometricTransform计算转换相关的匹配点,
%,而消除离群值。这种转变让我们本地化场景中的对象。
[tform, inlierBoxPoints inlierScenePoints] = estimateGeometricTransform (matchedBoxPoints,
matchedScenePoints,仿射的);
%显示的匹配点对离群值删除
图;
showMatchedFeatures (boxImage sceneImage inlierBoxPoints,
inlierScenePoints,“蒙太奇”);
标题(“匹配点(仅内围层)”);
%的边界多边形参考图像。
boxPolygon = [1,1;%左上的
尺寸(boxImage, 2), 1;%右上的
大小(boxImage, 2),大小(boxImage, 1);%右下角
1、大小(boxImage, 1);%左下侧
1,1];%左上的再次关闭多边形
%将多边形转换为目标的坐标系统的形象。转换后的多边形表示场景中对象的位置。
newBoxPolygon = transformPointsForward (tform boxPolygon);
%显示检测到的对象。
图();
imshow (sceneImage);
持有;
线(newBoxPolygon (: 1), newBoxPolygon (:, 2),“颜色”,“y”);
标题(“检测盒”);
结束
结束

答案(4)

迪玛Lisin”class=
迪玛Lisin 2014年5月2日
showMatchedFeatures()不存在2012年。这是在2013年推出一个,如果我没记错的话。您应该能够使用一个helper函数cvexShowMatches ()。
2的评论
迪玛Lisin”class=
迪玛Lisin 2014年11月26日
你必须写自己,使用 imshowpair 情节 。你可以画出第一个点集只是通过调用 情节 。然后绘制第二点集,您需要添加第一个图片的宽度x坐标,让他们出现在第二图像。

登录置评。


神秘的恶魔”class=
神秘的恶魔 2018年2月10日
这可能是无关紧要的问题,您所希望的答案。但是,你能向我解释一下这两条线是什么意思?
matchedBoxPoints = boxPoints (boxPairs (: 1):);
matchedScenePoints = scenePoints (boxPairs (:, 2):);
非常感谢。这是一种紧迫。
1评论
焉耆刘”class=
焉耆刘 2021年9月29日
先生,可能首先是一个图像匹配特性,和第二个是其他形象马赫特性。
它是由匹配图像块。

登录置评。


焉耆刘”class=
焉耆刘 2021年9月29日
编辑:焉耆刘 2021年9月29日
先生,也许你应该更新版本的matlab
请检查下代码来得到一些信息
clc;清晰的所有;关闭所有;
%阅读参考图像
我= imread (“viprectification_deskLeft.png”);
C = rgb2gray(我);
boxImage = C;
图;imshow (boxImage);
标题(图片左边的);
%的阅读目标图像
2 = imread (“viprectification_deskRight.png”);
CC = rgb2gray (II);
sceneImage = CC;
图;
imshow (sceneImage);
标题(“图像对”);
%检测图像特征
boxPoints = detectSURFFeatures (boxImage);
scenePoints = detectSURFFeatures (sceneImage);
%可视化参考图像中发现的最强的特征点。
图;
imshow (boxImage);
标题(100年从盒子里最强的特征点图像);
持有;
情节(boxPoints.selectStrongest (100));
%可视化最强的目标图像中的特征点。
图;
imshow (sceneImage);
标题(300年最强的从场景图像特征点);
持有;
情节(scenePoints.selectStrongest (300));
%提取在图像兴趣点的特征描述符。
[boxFeatures, boxPoints] = extractFeatures (boxImage boxPoints);
[sceneFeatures, scenePoints] = extractFeatures (sceneImage scenePoints);
使用描述符%匹配特性。
boxPairs = matchFeatures (boxFeatures sceneFeatures);
%显示推定地匹配特性。
matchedBoxPoints = boxPoints (boxPairs (: 1):);
matchedScenePoints = scenePoints (boxPairs (:, 2):);
图;
标题(“推定地匹配点(包括异常值)”);
%这就是编译器指示线46 *一个错误
showMatchedFeatures (boxImage sceneImage matchedBoxPoints,
matchedScenePoints,“蒙太奇”);
% estimateGeometricTransform计算转换相关的匹配点,
%,而消除离群值。这种转变让我们本地化场景中的对象。
[tform, inlierBoxPoints inlierScenePoints] = estimateGeometricTransform (matchedBoxPoints,
matchedScenePoints,仿射的);
%显示的匹配点对离群值删除
图;
showMatchedFeatures (boxImage sceneImage inlierBoxPoints,
inlierScenePoints,“蒙太奇”);
标题(“匹配点(仅内围层)”);
%的边界多边形参考图像。
boxPolygon = [1,1;%左上的
尺寸(boxImage, 2), 1;%右上的
大小(boxImage, 2),大小(boxImage, 1);%右下角
1、大小(boxImage, 1);%左下侧
1,1];%左上的再次关闭多边形
%将多边形转换为目标的坐标系统的形象。转换后的多边形表示场景中对象的位置。
newBoxPolygon = transformPointsForward (tform boxPolygon);
%显示检测到的对象。
图();
imshow (sceneImage);
持有;
线(newBoxPolygon (: 1), newBoxPolygon (:, 2),“颜色”,“y”);
标题(“检测盒”);

焉耆刘”class=
焉耆刘 2021年9月29日
编辑:焉耆刘 2021年9月29日
先生,请检查下代码来得到一些信息
clc;清晰的所有;关闭所有;
我= imread (“cameraman.tif”);
我= imresize ((1 e3 e3),我双线性的);
T = projective2d (0.89 [1.24 - 0.002;
-0.95 - 1 0.0025;
0 0 1);
J = imwarp(我(400:800,400:800),T);
%阅读参考图像
C = J;
boxImage = C;
图;imshow (boxImage);
标题(一个盒子的图片);
%的阅读目标图像
2 =我;
CC = 2;
sceneImage = CC;
图;
imshow (sceneImage);
标题(“一个混乱的场景的图像”);
%检测图像特征
boxPoints = detectSURFFeatures (boxImage);
scenePoints = detectSURFFeatures (sceneImage);
%可视化参考图像中发现的最强的特征点。
图;
imshow (boxImage);
标题(100年从盒子里最强的特征点图像);
持有;
情节(boxPoints.selectStrongest (100));
%可视化最强的目标图像中的特征点。
图;
imshow (sceneImage);
标题(300年最强的从场景图像特征点);
持有;
情节(scenePoints.selectStrongest (300));
%提取在图像兴趣点的特征描述符。
[boxFeatures, boxPoints] = extractFeatures (boxImage boxPoints);
[sceneFeatures, scenePoints] = extractFeatures (sceneImage scenePoints);
使用描述符%匹配特性。
boxPairs = matchFeatures (boxFeatures sceneFeatures);
%显示推定地匹配特性。
matchedBoxPoints = boxPoints (boxPairs (: 1):);
matchedScenePoints = scenePoints (boxPairs (:, 2):);
图;
标题(“推定地匹配点(包括异常值)”);
%这就是编译器指示线46 *一个错误
showMatchedFeatures (boxImage sceneImage matchedBoxPoints,
matchedScenePoints,“蒙太奇”);
% estimateGeometricTransform计算转换相关的匹配点,
%,而消除离群值。这种转变让我们本地化场景中的对象。
[tform, inlierBoxPoints inlierScenePoints] = estimateGeometricTransform (matchedBoxPoints,
matchedScenePoints,仿射的);
%显示的匹配点对离群值删除
图;
showMatchedFeatures (boxImage sceneImage inlierBoxPoints,
inlierScenePoints,“蒙太奇”);
标题(“匹配点(仅内围层)”);
%的边界多边形参考图像。
boxPolygon = [1,1;%左上的
尺寸(boxImage, 2), 1;%右上的
大小(boxImage, 2),大小(boxImage, 1);%右下角
1、大小(boxImage, 1);%左下侧
1,1];%左上的再次关闭多边形
%将多边形转换为目标的坐标系统的形象。转换后的多边形表示场景中对象的位置。
newBoxPolygon = transformPointsForward (tform boxPolygon);
%显示检测到的对象。
图();
imshow (sceneImage);
持有;
线(newBoxPolygon (: 1), newBoxPolygon (:, 2),“颜色”,“y”);
标题(“检测盒”);

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!