Subtracting Image from it modified self (by setting zero least significant bit of pixels)
Show older comments
We have a homework of which we need to set the least significant bit of every pixel to zero and then subtract the new image from the original. Here is an example of what I want to do directly from the book.

The code I am trying to use cannot produce image (C) instead it produces a black image.This is my attempt: could anybody point out what im doing wrong please?
raw = imgetfile;
A = imread (raw);
for k = 0:7
B = bitset(A, 8-k, 0);
end
C = imsubtract (A,B);
Accepted Answer
More Answers (1)
Dexian
on 25 Nov 2014
0 votes
How to set MSB=0?What the code in MATLAB?
Categories
Find more on Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!