# Revision history [back]

assuming, those trimaps contain a single channel of [0,1,2] values, it's no wonder, that it looks "all black".

you could try to increase the contrast, e.g. like:

imshow("trimap", trimap*80);


assuming, those trimaps contain a single channel of [0,1,2] values, it's no wonder, that it looks "all black".

to visualize them, you could try to increase the contrast, e.g. like:

imshow("trimap", trimap*80);


to mask out the backgound, using those trimaps, you would build a mask, using the resp. label (let's assume, 0 for bg):

Mat mask = (trimap==0);