addition of binary image matlab

clear all;close all;clc;
a=[0 15 135;10 100 200; 20 50 150];
b=[100 105 110; 60 80 90;40 10 120];
c=zeros(size(a));
[m,n]=size(a);
for i=1:m
for j=1:n
c=dec2bin(a(i,j),7),pause
end
end
k=zeros(size(b));
[m,n]=size(b);
for i=1:m
for j=1:n
k=dec2bin(b(i,j),7),pause
end
end
g=uint8([0000000 0001111 10000111;0001010 1100100 11001000;0010100 0110010 10010110]);
r=uint8([1100100 1101001 0001010;1111000 1010000 1011010;0101000 0001010 1111000]);
TT = bitand(g,r)
please help me additioner both binary matrix.tks :)

댓글 수: 1

Image Analyst
Image Analyst 2013년 11월 26일
편집: Image Analyst 2013년 11월 26일
What do you want to do? Your code has two dead/useless for loops, and some useless code after that. I can't figure out if you want to add two binary images, or AND them bitplane-by-bitplane. And why you'd want or need to do either one.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

태그

질문:

2013년 11월 26일

편집:

2013년 11월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by