how can xor first pixel with second and second with third and so on (for binary image)

1 view (last 30 days)
image=imread('lena.jpg');
bin_image=dec2bin(image);
i have attached the pdf of my question kindly review
  2 Comments
juveria fatima
juveria fatima on 1 Sep 2018
kindly go through the pdf u will understand what i want to do bitxor(first column with second column) then bitxor(third with fourth)as follows for full image and then atlast i have to get back my original image

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 1 Sep 2018
Edited: KALYAN ACHARJYA on 1 Sep 2018
image=imread('image_name.image_format'); %e.g. im1.jpg
bw_image=im2bw(rgb2gray(image));
[row colm]=size(bw_image);
for i=1:row-1
for j=1:colm-1
new_image(i,j)=xor(bw_image(i,j),bw_image(i+1,j+1));
end
end
imshow(c);
  15 Comments
Abubakar Abba
Abubakar Abba on 1 Aug 2021
Why imshow(c);? I didnt see any variable c from the code. i think it should be imshow(new_image)

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!