Change background with infoFlow function

hi, i use this function [infoFlow] that extract my image from background, now i want change background- how i can do this ?

cv::alphamat::infoFlow(Input, Trimap, Output);

// 1) Input 2) Trimap 3) Output [ infoFlow function ] 4,5) background changed

Information Flow Alpha Matting

I found an answer to my problem, but I’m not sure it’s a good way.
I uploaded the file to my blog, someone had time to see it and found a better and more correct solution, please tell me. Thankful
https://up.dmf313.ir/alphamat.rar

result :