how to recombine 4x4 nonoverlapping blocks into original matrix

1 次查看(过去 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 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签


Translated by