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

조회 수: 16 (최근 30일)
siddhant badwar
siddhant badwar 2018년 9월 28일
편집: DGM 2023년 9월 12일
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