how can I resolve the error related to corr2 in my code ??

3 ビュー (過去 30 日間)
NAVNEET NAYAN
NAVNEET NAYAN 2017 年 3 月 22 日
コメント済み: NAVNEET NAYAN 2017 年 3 月 22 日
my code is:
clc;
clear all;
close all;
tic;
i1 = imread('G:\testing\abrupt\ed1ac\1.jpg');
i2 = imread('G:\testing\abrupt\ed1ac\2.jpg');
c = corr2(i1,i2);
toc;
and the following error is coming :
[a,b] = ParseInputs(varargin{:});
Error in correlation (line 7) c = corr2(i1,i2); please tell me how to solve this issue??

採用された回答

KSSV
KSSV 2017 年 3 月 22 日
corr2 takes matrices as inputs. In your case i1, i2 are 3D matrices. Try
c = corr2(i1(:,:,1),i2(:,:,1));
Alos note that i1 and i2 should be of same size. If they are not of same size, use imresize to make them into same dimensions.
  1 件のコメント
NAVNEET NAYAN
NAVNEET NAYAN 2017 年 3 月 22 日
yeah... it's working now... Thanks a lot KSSV.....

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by