IMAGE Processing(matrix comparision)
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hi All,
if i have two matrix to be compared, and i dont want perticular element to be compaered, how do i do that in matlab..??
for Ex
A=[1 8 8
7 6 *
9 9 9]
B=[3 5 6
5 6 5
9 0 9]
as u can see a '*' symbol in matrix a, so while comparing A and B i dont want to compare the element at the '*' postion in A, with the corrosponding B's element..
please help me in this regard,
Thank You in advance.
[EDITED: Code formatted, Jan Simon]
댓글 수: 2
Chandra Kurniawan
2011년 12월 16일
Actually, you cannot put '*' in numeric array.
You can use other array to define the position of '*'
Eq :
pos = [2 3];
Muthuraj V
2011년 12월 22일
답변 (1개)
Jan
2011년 12월 16일
What exactly does "compare" mean? It would be easier to create an answer, if this detail need not to be guessed.
Perhaps:
mask = logical([1, 1, 1; 1, 1, 0; 1, 1, 1]);
isequal(A(mask), B(mask))
댓글 수: 5
Muthuraj V
2011년 12월 22일
Image Analyst
2011년 12월 24일
I thought Jan's answer sounds exactly like what you want. It compares all elements for equality except the (0,2) elements which it ignores. Isn't that exactly what you want?
Muthuraj V
2011년 12월 27일
Walter Roberson
2011년 12월 27일
http://www.mathworks.com/help/techdoc/math/f1-85462.html#bq7egb6-1
Muthuraj V
2011년 12월 30일
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!