This is an good online app to crop your figures from the background.
You just upload your image, and start editing. The foreground figure has to be masked (on green) from background (on red). That’s all.
If you want to refine mask, there are some configuration tools to get a better cropping.