Comparing abs value of matrices?

Hi, Im trying to add the absolute value of three matrices together and compare it to the sum of abs of another three matrices to see which gives the greatest value. I.e.
waveb1=abs(cHback1)+abs(cVback1)+abs(cDback1);
wavef1=abs(cHfront1)+abs(cVfront1)+abs(cDfront1);
block1=max(waveb1,wavef1);
%%If waveb1 is the max I want back1, else front1
if block1-wavef1==0
'back1'
else
'front1'
end
I'd appreciate any feedback, thanks

Answers (1)

Walter Roberson
Walter Roberson on 13 Mar 2011
You have a difficulty that there is a different possible answer for each point. Are you trying to find an aggregate answer or one answer per matrix entry?

3 Comments

What I have done is broken down two images,of a similar scene at different focus, into blocks of 8by8pixels.
I have then taken the haar wavelet transform of each block.
I'm now trying to determine which image block has sharper(or greatest detail) to determine which block I should use from each image to get one image containing the best possible image.
I hope this isn't to confusing. I'm very new to matlab and coding.
In that case you need an aggregate measure, something that summarizes the closeness over the entire block. For example, comparing sum(waveb1(:)) to sum(wavef1(:)) or perhaps the sum of squares instead just the plain sum.
Thanks I'll give that a try now

Sign in to comment.

Categories

Asked:

on 13 Mar 2011

Community Treasure Hunt

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

Start Hunting!