From: Dawn on
Here are 2 images. Original and Processed.

Original:
http://bp2.blogger.com/_dY9PPdeLapU/SCAXQJWgxYI/AAAAAAAAAKI/
oA9Pewda5rA/s320/original.bmp

Processed:
http://bp0.blogger.com/_dY9PPdeLapU/SCAYApWgxZI/AAAAAAAAAKQ/
yrSxCKYLlIs/s320/processed.bmp

I want to check the white pixels on the Processed Image
against the original. If they are white on the original,
make it black. If not keep them white.

The code I tried is like this:

>> [row, col] = find(Processed == 1); %Obtain the
coordinates of the white pixels
>> if Original(r,c) == 1 %If on the original the they are
white
Processed(r,c) = 0; %Make it black
end

Somehow the program doesn't work. It fails to remove any
pixel on the Processed Image.

Can anyone tell me what is wrong with the code?

From: Dawn on
The image links are incompletely highlighted.

Please visit:

http://dawnllc.blogspot.com/2008/05/matlab-how-to-change-
specified-pixel.html

to view the images regarding to the question.

Thanks very much.
From: us on
"Dawn ":
<SNIP a matter of logic...

one of the many solutions

% the images
a=zeros(4); % the original...
a(2,:)=1;
b=a;
b(2,[1,end])=0;
b(3,:)=1; % the processed...
% the engine
c=b;
c(a&b)=0;
% the result
a,b,c

us