Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I have two images taken by projecting laser light onto a agar plate. We have taken images at starting point and after an interval of 20 minutes, where we cultured bacteria on it. Then we applied imsubtract(a,b), (b,a) both giving different answers ?

조회 수: 1 (최근 30일)
a=imread('im5.jpg');
b=imread('im7.jpg');
c=imsubtract(a,b):
imshow(c)
d=imsubtract(b,a);
imshow(d)
after that in the output side we got greenish and red color image. Here we used a red color laser light. My question is, is that greenish color represents bacterial colony or anything else. Why the output is changing after interchanging these a,b to b,a in 'imsubtract' function? Following are the images: mat1 - for imsubtract(a,b) and mat2 - for imsubtract(b,a).

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 12월 20일
편집: KALYAN ACHARJYA 2018년 12월 20일
Yes, how you expect that both gives the same results?
A-B !=B-A (!=>Not Equal)
Note: Subtraction and division functions are Not Commutative.
In your case
imsubtract(a,b)=a-b
and
imsubtract(b,a)=b-a
Both are not same.
  댓글 수: 2
GUDIVADA ROKESH  KUMAR
GUDIVADA ROKESH KUMAR 2018년 12월 20일
Thank you for your response. But I attached the output images, from that could you tell me what resembles these green colored area in it.
KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 12월 20일
편집: madhan ravi 2018년 12월 20일
I have answered, what you have asked in the question. I hope you also agreed that both subtraction results are not same.
Though I will try- Define the following

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by