Select foreground region for background removal

Hello,
On app, like teams, how to select the foreground region with a click in order to make the background removal with OpenCV
Thank you,