??? Error using ==> times Matrix dimensions must agree.

1 vue (au cours des 30 derniers jours)
ankita
ankita le 30 Avr 2013
I am doing lsb watermarking, in which when i am calculating Normalized correlation, I m getting the above error.
NC = sum(sum(bin_img .* share12))/ sum(sum(bin_img .* bin_img))
where bin_img is original watermark
Cdata 64*64 logical
colormap 2*3 double
And share12 is recovered share (recovered as a part of visual secret sharing)
cdata 64* 128 logical
colormap 2*3 double
when i m trying to resize the share12 as the size of bin_img, I am getting the error.
??? Error using ==> iptcheckinput
Function IMRESIZE expected its second input, [MROWS NCOLS], to be
positive.
I m not able to find the problem, plzz do help .....
  2 commentaires
Wayne King
Wayne King le 30 Avr 2013
You need to show us the relevant part of the code where imresize() is being called. It's also giving you a very good idea of what the problem is from the error message.
ankita
ankita le 1 Mai 2013
// code part where, i using imresize()
share12 = im2bw(share12);
Ms=size(bin_img,1); %Height
Ns=size(bin_img,2);
share12 = imresize(share12,[Ms,Ns]);
imwrite(sh,'share12.bmp');

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 1 Mai 2013
bin_img is empty, so the size is 0 which is not positive.
  1 commentaire
ankita
ankita le 3 Mai 2013
thnk you sir, You solved my problem.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by