using Luxoria.Algorithm.GrabCut;
class Program
{
static void Main()
{
GrabCut grabCut = new GrabCut();
grabCut.Exec("image.jpg", "output.jpg", 678, 499, 1653, 1493, 5);
// Where :
// "image.jpg" is the input image path,
// "output.jpg" is the output image path,
// 678, 499, 1653, 1493 are the rectangle coordinates (x, y, width, height),
// 5 is the margin from (0 to 100) (default set to 0)
// Custom foreground & background masks
GrabCut grabCut = new GrabCut();
grabCut.Exec("image.jpg", "output.jpg", 678, 499, 1653, 1493, 5, false, Color.White, Color.Black);
// Where :
// "image.jpg" is the input image path,
// "output.jpg" is the output image path,
// 678, 499, 1653, 1493 are the rectangle coordinates (x, y, width, height),
// 5 is the margin from (0 to 100) (default set to 0),
// false is being used to indicate that custom colors are provided,
// Color.White is the foreground color,
// Color.Black is the background color
}
}