필터 지우기
필터 지우기

Obtain trimap of the image

조회 수: 4 (최근 30일)
Nataliya
Nataliya 2015년 2월 8일
편집: Image Analyst 2015년 2월 8일
Most image matting algorithms need image and trimap of the image as input. My question is how to get the trimap of the image? Is their any matlab command for that or any code... Please help. Thanks
  댓글 수: 3
Nataliya
Nataliya 2015년 2월 8일
I can use canny edge detector code to create the mask. But please guide how to get the trimap out of it
Erik S.
Erik S. 2015년 2월 8일
Which function are you using for image matting?

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

답변 (1개)

Image Analyst
Image Analyst 2015년 2월 8일
편집: Image Analyst 2015년 2월 8일
I've never heard of that term before. I had to look it up and found this: "trimap--a pre-segmented image consisting of three regions of foreground (what you want to cut out), background and unknown. Partial opacity values are then computed only for pixels inside the unknown region."
Normally people just call that the segmentation, segmented image, or classified image. Anyway, as I would hope that you realize. That TOTALLY depends on your image and what you consider to be foreground and background. So the algorithm to produce the "trimap" of course will vary also. But you forgot to attach your image and I can't answer any more until you do. Usually people give us an image to look at if they want image processing advice - it only makes sense. Use the green and brown picture icon, when you fix your post, to insert an image.
In the meantime, several methods are shown in my File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by