Page 1 of 1

HOW TO CHANGE BACKGROUND COLOR TO BLACK

PostPosted: Fri Nov 24, 2017 6:31 pm
by stylish066
Hi,actually i want to detect coins from real images so in order to detect coins i want to change background color to black .I have used #colorfilter to change my background color to black, it works only with dark background color (like dark brow) but if background color is white then its does not work background color remain same. i used this code
{
ColorFiltering colorFilter = new ColorFiltering();
colorFilter.Red = new AForge.IntRange(0,90);
colorFilter.Green = new AForge.IntRange(0,90);
colorFilter.Blue = new AForge.IntRange(0, 90);
colorFilter.FillOutsideRange = false;
colorFilter.ApplyInPlace(imgInput.Bitmap);
}
but i want to change automatically background color to black whether the orignal background color is light or dark
could somebody send me whole code.
thanks in advance :)Image