multiplication of matrix with blocks of an image ( 3 channel)

1 view (last 30 days)
I divided an image into 8x8 blocks using mat2cell() . result was 'i' number of 8x8 matrices , say M{i} , with each M{i} in turn having 3 8x8 matrices say , ans(:,:,1) , ans(:,:,2) and ans(:,:,3) ( corresponding to 3 channels RGB of the image ). Now I need to apply haar wavelet transform ( H-matrix) on each block ( 8x8 H matrix is already available ) and I need to store the resulting matrices in another cell array if possible . To do this , when I use H*M{i} , I get the following error : " MTIMES is not fully supported for integer classes. At least one input must be scalar.To compute elementwise TIMES, use TIMES (.*) instead." I want to perform matrix multiplication and not element wise . Any help on this is greatly appreciated . Thanks.
  1 Comment
Azzi Abdelmalek
Azzi Abdelmalek on 1 Apr 2016
You can make your question more readable. Just describe the nature and the size of your matrix, then ask what kind of operation you want to achieve.

Sign in to comment.

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 1 Apr 2016
a=randi(5,2,2,3)
b=randi(5,2,2,3)
c=a.*b

Community Treasure Hunt

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

Start Hunting!