필터 지우기
필터 지우기

how can i retain rgb color to segmented image (binary)?

조회 수: 2 (최근 30일)
si sam
si sam 2015년 11월 9일
편집: Thorsten 2015년 11월 10일
i have a result of background substraction (binary image) from the rgb input image (origin)...i wanna retain colors to the object extracted

답변 (3개)

Thorsten
Thorsten 2015년 11월 9일
편집: Thorsten 2015년 11월 10일
If the binary image B is 1 where the object is in image I, use
O = I.*B;
If the image has more layers than B, you can use
O = bsxfun(@times, I, B);

bayrem rem
bayrem rem 2015년 11월 9일
this is the message error

bayrem rem
bayrem rem 2015년 11월 9일
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 11월 10일
Then your v and your w are not the same size.
Is one of them 2 dimensional and the other 3 dimensional?
Thorsten
Thorsten 2015년 11월 10일
편집: Thorsten 2015년 11월 10일
I added a solution to this case in my original answer. If something is unclear or does not work, please use comments instead of posting new answers.

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by