how to combine the blocks

4 vues (au cours des 30 derniers jours)
Sharen H
Sharen H le 20 Juil 2013
clc
clear all
x=
[2 3 4 5
2 3 4 5
1 2 3 4
1 2 3 4]
[r c]=size(x);
bs=2; % Block Size (8x8)
nob=(r/bs)*(c/bs); % Total number of 8x8 Blocks
% Dividing the image into 2x2 Blocks
kk=0;
for i=1:(r/bs)
for j=1:(c/bs)
Block(:,:,kk+j)=x((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs));
BlockM=Block(:,:,kk+j);
BlockMM=mean(BlockM(:));
Block(:,:,kk+j)=BlockMM
end
kk=kk+(r/bs);
end
i have divided the matrix into blocks of 2x2 size and i have stored it in Block(:,:,i) separately. can any one please help me to combine into original matrix thanks in advance
  1 commentaire
Andrei Bobrov
Andrei Bobrov le 20 Juil 2013
see your question

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by