I have set of images. Images have a simple background. I want to change that background to white using Marvin Framework and Java.
As I am new to Marvin, it is making me trouble to change the background. I also tried opencv for java but its giving unsatisfied link error.
Image Example:

To get a perfect result you'll need to find a way to remove shadows. But I think it is a good start point for you.
Algorithm:
output:
source code: