why the output image lines are doubled?
2 views (last 30 days)
I have the following image1 as an input for my code,
The code is:
mdl = 'TwoVoltsTanhtestmodel2';
rgbImage = imread('/home/salibensuleiman/Documents/MATLAB/Escher/Escher/image1.png');
[rows, columns, numberOfColorChannels] = size(rgbImage);
if numberOfColorChannels > 1
grayImage = rgbImage(:, :, 1); % Take red channel.
grayImage = rgbImage; % It's already gray scale.
binaryImage = grayImage < 128;
subplot(2, 2, 2);
The rest of the code is a parallel processing for this image which I did not include it here for simplicity.
The output image is attached.
I noticed the lines are doubled although my code is just checking the pixels one by one if the neighbours are for example 1 they keep it one otherwise change it to zero.