I'm trying to remove the background from an image that has either one coin or one bill.
I try this code:
BackgroundSubtractorMOG BGS = new BackgroundSubtractorMOG();
BGS.apply(src, dest,0.1);
the result was an black image.
How can I do that in java using opencv?
The image will be captured from the camera and so it could have background ,I want to remove the background ,, the image could be like that :