21 lines
366 B
Mathematica
21 lines
366 B
Mathematica
|
close all
|
|||
|
clear
|
|||
|
clc
|
|||
|
disp('====E4_2_17.m====');
|
|||
|
|
|||
|
X=uint8([0 0 1 1
|
|||
|
0 0 2 3])
|
|||
|
Y=uint8([0 1 0 1
|
|||
|
0 2 0 3])
|
|||
|
Z=xor(X,Y)
|
|||
|
|
|||
|
I1=imread('A.bmp');
|
|||
|
I2=imread('B.bmp');
|
|||
|
I3=im2bw(I1);
|
|||
|
I4=im2bw(I2);
|
|||
|
I5=xor(I3,I4);
|
|||
|
|
|||
|
subplot(1,3,1),imshow(I3),xlabel('<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD>A');
|
|||
|
subplot(1,3,2),imshow(I4),xlabel('<EFBFBD><EFBFBD>b<EFBFBD><EFBFBD>B');
|
|||
|
subplot(1,3,3),imshow(I5),xlabel('<EFBFBD><EFBFBD>c<EFBFBD><EFBFBD>A XOR B');
|