필터 지우기
필터 지우기

summation of binary images

조회 수: 7 (최근 30일)
Elysi Cochin
Elysi Cochin 2013년 9월 6일
if i have 5 binary images.... how to compute the summation of all binary images and normalization of the pixel value.. please do reply how to write the matlab code.... please do reply.....

채택된 답변

Image Analyst
Image Analyst 2013년 9월 6일
편집: Image Analyst 2013년 9월 7일
Not sure if you mean
sumImage = (double(bw1) + double(bw2) + double(bw3) + double(bw4) + double(bw5)) / 5;
or if you mean the union of all of them with the result remaining a binary image:
binaryImage = bw1 | bw2 | bw3 | bw4 | bw5;
Which is it? Or a better question would be, why do you want this image? What are you going to do with it?

추가 답변 (1개)

Geert
Geert 2013년 9월 6일
편집: Geert 2013년 9월 6일
If you would have 5 binary images stored in the variables Im1, Im2, Im3, Im4 and Im5, than you can get the summation by the command:
ImSum = Im1 + Im2 + Im3 + Im4 + Im5;
The new image ( ImSum ) will probably no longer be binary. You can normalize it to have its mean equal to 1 by the command
ImSum = ImSum/(mean(ImSum(:)));
Is this what you were looking for? You should try to be more specific in your question, i.e. post an example of what you are looking for or provide us with more details...
  댓글 수: 3
Image Analyst
Image Analyst 2013년 9월 7일
Then you'd better use my answer, Geert's formula does give ImSum as a double, but the max value is still 1, not 5 since the casting to double is done after the sum, not to each image before the sum, thus the sums are clipped to 1.
Elysi Cochin
Elysi Cochin 2013년 9월 9일
ok sir... thank u all....

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

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by