这是我编码我的图像和相同图像的16 * 16补丁的编码。我现在改变了我的编码。但是我只得到满是白色像素的图像?这是我改变的编码
clear all
close all
I=imread('E:\double.jpg');
subplot(3,2,1);
imshow(I);
title('Original');
%gray conversion
J = rgb2gray(I);
subplot(3,2,2);
imshow(J);
title('Gray');
K = double(J);
%size of the image
[A B]=size(J);
%patch definition
patch_size = 16;
temp = J(1:patch_size, 1:patch_size);
subplot(3,2,3);
imshow(temp);
title('kernel');
temp1 = double(temp);
C = conv2(temp1,K);
subplot(3,2,4);
imshow(C);
title('Convolved image');