error : Cannot find an exact (case-sensitive) match for 'insertshape'

15 次查看(过去 30 天)
clc;
clear;
close all;
a=imread('C:\Users\m m\Videos\2.jpg');
I=rgb2gray(a);
figure
imshow(I);
[Ir Ic ]= size(I)
aa=imread('C:\Users\m m\Videos\1.jpg');
T=rgb2gray(aa);
figure
imshow(T);
[Tr Tc ]= size(T);
R = normxcorr2(I,T)
R = imcrop(R,[Tc Tr Ic Ir]);
[r c v] = find(R==(max(max(R))))
RGB = insertshape(I, 'rectangle',[c r Tc Tr],'linewidth',3);
figure
imshow(RGB)
error:
Cannot find an exact (case-sensitive) match for
'insertshape'
The closest match is: insertShape in C:\Program
Files\MATLAB\R2013a\toolbox\vision\vision\insertShape.m
Error in Untitled2 (line 18)
RGB = insertshape(I, 'rectangle',[c r Tc
Tr],'linewidth',3);

采纳的回答

Walter Roberson
Walter Roberson 2018-9-28
Mathworks has never had a function named insertshape .
If there was ever a File Exchange contribution that defined a function named insertshape then that contribution is long gone.
I do not find any third party toolboxes for use with MATLAB that define insertshape, but perhaps I overlooked one.
You will need to either track down the insertshape routine that you were using before, or else you will need to write your own insertshape routine to do whatever it is you expect that call to do.
You might want to start by examining the MATLAB insertShape() routine, which has a calling sequence very similar to your insertshape() call.
insertshape
^
|
v
insertShape
You might perhaps want to experiment with the following code and see how it works for you:
function varargout = insertshape(varargin)
if nargout > 0
[varargout{:}] = insertShape(varargin{:});
else
insertShape(varargin{:});
end

更多回答(0 个)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by