I try to convert 2d image to 1d and the filter as well than I want to filter that image with the 1d filter and getting the same corresponding pixel responses as in the 2d convolving.
I have done
I1 = I(:)
filter1 = filter(:);
response = imfilter(I1,filter1,'conv')
response2d = imfilter(I,filter,'conv');
but response
and response2d
are not same with the matching entries.
How could solve that problem? Any suggestion?