how to recombine 4x4 nonoverlapping blocks into original matrix

2 次查看(过去 30 天)
the program for dividing the matrix is
clc;
close all;
clear all;
I=imread('C:\Users\user\Pictures\lenna.jpg');
I=rgb2gray(I);
A=imresize(I,[128,128]);
% disp(A);
% imshow(A);
[r c]=size(A);
b=4;
k=0;
for i=1:(r/b)
for j=1:(c/b)
Block(:,:,k+j)=A((b*(i-1)+1:b*(i-1)+b),(b*(j-1)+1:b*(j-1)+b));
end
size(Block(:,:,k+j))
k=k+(r/b);
end
pls send the code to recombine these 4x4matrix

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by